First of all you might be asking why I did this. I did this because the other version had lots of bugs and hasn't been updated, even though he promised updating it this summer(the summer of '10 is over 'I am a dissapoint...' ) http://forums.alliedmods.net/showthread.php?t=110229

New stuff and fixes:
-Melee Weapons!-Smoker Cloud Damage Support
-Bile The World point harvesting prevention
-Prevents harvesting points by healing your team mates by making sure you didn't heal them while they were green health
-Points for defibbing your team mates
-Points for killing tank solo
-Allows carrying over of points on any mode you want
-Smaller plugin
-A few less Cvars
-Uncommon Horde!
-At The bottom of the plugin I included a history .zip that includes all versions except the current one.

Points System public commands
!buy
!buystuff
!points
!repeatbuy buys the last thing that the confirm menu was displayed for.
!listmodules lists all modules currently loaded into points system.
!listmelee lists all valid melee weapons.
Admin(slay flag) commands for Points System only.
!heal (if you only use !heal it will heal you if you use !heal <target> it will heal that person or target group)
!setpoints <target> [points] This sets a client's points to whatever you want
!givepoints <target> [points] This gives client's the amount of points you want

Modules
!usepoints Enabler Module: Current version 1.1 Min Version: 1.6.6
What it does:
Enables players to use !usepoints over !buy
Registers sm_usepoints as a command.

Documentation for the natives included with Points System. Look at current modules to see how to implement them.

PHP Code:

#include <ps_natives>

at the beginning of any module for Points System.

PHP Code:

#if defined _ps_included_ #endinput#endif#define _ps_included_

/** * Gets the version of PS * * @return current version of ps system in form of a float */native Float:PS_GetVersion();

// How many points does an uncommon mob cost// -// Default: "12"l4d2_points_umob "12"

// How many points does a witch cost// -// Default: "20"l4d2_points_witch "20"

// How many witchs' to be allwed spawned per team// -// Default: "3"l4d2_points_witch_limit "3"

// How many points does burning a witch earn// -// Default: "1"l4d2_points_witchburn "1"

// How many points does crowning a witch earn// -// Default: "2"l4d2_points_witchcrown "2"

// How many points does killing a witch earn// -// Default: "4"l4d2_points_witchkill "4"

Issues:
The hurt points are a bit messed up for spitter and smoker, they currently will only get the Multiple Damage points instead of their respective spit and smoker cloud points.

History:
Note: If there are new cvars in any version delete your .cfg when updating.

Code:

-1.0 "Venus Soccoro" - Initial Release
-1.1 "Picard Mesa" - Fixed Tank and Witch not resetting for each team.
-1.1.1 "Picard Mesa" - Fixed Melee menu on Hard Rain
-1.1.2 "Kira La Silla" - Fixed points not carrying over and not resetting on finale win.
New Cvar's l4d2_points_headshots l4d2_points_headshots_value
-1.2 "Occult Soccoro" - Added admin commands !setpoints !givepoints !heal
-1.2.1 "Occult Soccoro" - Added l4d2_points_start
-1.2.5 "Cygnus Peak" - Added Uncommon Mob and fixed -1 not disabling items.
Now tells player item is disabled when trying to buy it
-1.2.6 "Plateau" - Added !repeatbuy
-1.2.9 "Paene" - Multiple fixes for !repeatbuy, new cvar l4d2_points_defib_action (to fix problem http://forums.alliedmods.net/showpost.php?p=1261100&postcount=39).
And l4d2_points_ledge, and l4d2_points_bile_tank
Also !buy as a shorter option to !buystuff(both buy and buystuff work),
and added missing bot checks.
Fixed it so winning a finale resets points.
-1.3.0 "Pastry" - Fixes clients able to bile tank multiple times for points
all clients now earn points for killing the tank.
-1.3.1 "Pastry" - Fixed survivors not getting points for killing the tank.
-1.3.2 "Pastry" - Reverted back to giving only the killer of the tank points. :oops:
-1.3.3 "Pastry" - Fixed survivors not getting points for killing tank for real this time.
-1.3.5 "Fortis" - Added some client checks for tank death.
Added ammo and full heal, which have cvars:
l4d2_points_survivor_heal and l4d2_points_refill
-1.3.6 "Klon" - Less damage required for smoker cloud damage points.
Uncommons spawned with uncommon mob purchasable will now use z_common_limit.
more client checks for certain events.
Precache issue with M60 is hopefully fixed.
-1.3.7 "Klon" - Fixed possible issue with points not resetting when a client disconnects.
Misc code cleanup
-1.3.8 "Lactose" - Fixed client points resetting regardless of settings.
-1.3.9 "Lactose" - Fixed clients earning points for killing the tank when points system was disabled.
Plugin title in myinfo changed to L4D2 only as L4D was never supported.
-1.4.0 "Initia Nova" - Fixed plugin not respecting tank and witch limits(problem was not reported until I looked over it)
-1.5.0 "Libero" - Print to chat error after tank death finally fixed.
A bit of code cleanup
And now it finally removes the pill buffer of a player healed by the sm_heal command :mrgreen:
-1.5.1 "Libero" - Fixed infected being able to earn points by hurting each other. :oops:
-1.5.2 "Libero" - *Sigh* fixed plugin giving points for killing tanks even when disabled.
-1.5.3 "Libero" - Added request to add cvar to multiply cost of infected healing if player is a tank(l4d2_points_tank_heal_mult)
-1.5.4 By Caps Lock Fuck Yeah
Added l4d2_points protect to define how many points a survivor earns for protecting a team mate.
-1.5.5 "Tradictio" - Modified how protect points are earned, you must now earn a few protects before you are given the points
(l4d2_points_protect default changed to 2)
Fixed client checks for buy commands to prevent errors.
Also fixed a small typo with earning points while spitter.
Remember to delete the .cfg file before updating
-1.5.6 "Tradictio" - Fixed unable to buy silenced smg.
Added melee lists for The Sacrifice and No Mercy so only melee weapons that are available are buyable.
-1.5.7 "Tradictio" - Fixed refilling m60/grenade launcher ammo.
Pill/Adrenaline buffer removed when using full heal to prevent health values greater than 100.
-1.5.8 "Tradictio" - Fixed issue with invalid ent index when refilling ammo.
-1.5.9 "Ol' Bessy" - Fixed exploit that removed cheat flags of all commands that are related to points system that could be done when using sm_repeatbuy.
All commands in Points System now have sm_ in front of them.
Fixed players not being able to earn points for burning the tank.
Misc code fixes.
Changed points earned by protecting survivors to 1. UPDATE YOUR CFG FILE.
15 new natives to support modules for this plugin have been added!
-1.6.0 "Ol' Bessy" - Fixed refilling m60 ammo, suicide, and uncommon mob with repeat buy.
-1.6.1 "Ol' Bessy" - Fixed CSS weapons causing no damage, when first spawned.
-1.6.2 "Verlossing" - Added new CVAR l4d2_points_notify Weapons will no longer show up on the menu if their cost is -1 Fixed some code.
Added 2 new forwards though currently untested/broken.
Changed PS_RegisterModule(); to return a bool.
-1.6.3 "Verlossing" -
Fixed a few notifications that would still show and add points to a player even if points were disabled on that current game mode.
Fixed witch not spawning when bought.
-1.6.6 "Loquere" -
You must have SourceMod 1.4.0+ to use this plugin now.
Fixed OnPSLoaded();
Fixed OnPSUnloaded();
Remove late load bool from OnPSLoaded();
Added maxlength param for PS_GetItem() and PS_GetBought()
Points System can now automatically pick up all valid melee weapons, no more hard coded melee list menus. In accordance with this sm_listmelee command has been implemented.
Added command filter targets.
Added 2 translation files, feel free to show me your translations.
l4d2_points_heal_warning added. No more hard coded warning for healing a friend when they don't need it.
l4d2_points_knife Added this for servers which have knife enabled.
Special infected now count for headshot bonus.
Fixed dumb mistake with checking if a player is alive.
Fixed plugin setting an item as bought even if the player didn't have funds to purchase an item.
Discontinued BESS module until I rewrite it. The current available version will not work properly with this version.
1.6.7 "Loquere" -
Fixed conflicting translations
1.6.8 "Loquere" -
Added support for hunting_knife and riotshield for servers that use custom melee scripts.
Riotshield uses l4d2_points_shield
Switched over to adt_arrays for module storing
The custom targets included with this plugin now have translations
Changed the forwards to be ET_Ignore hooks
Fixed broken events for Hunter, Charger, and Jockey(the "attacker" event key changed to "userid")
Optimized a bunch of events.
You must now earn 6 protects before you are given protect points.
Improved how commands reply to actions
Changed how uncommon mobs spawn
When you buy a special infected you should now be given it, instead of it being randomly given to anybody.
This needs Testing.
1.6.8 "Loquere" R2 -
Fixed some command reply text
Changed how infected spawning works, hopefully fixes a few things.
1.6.8 "Loquere" R3 -
Fixed riotshield using incorrect cvar.
Fixed Fixed explosive ammo pack not having correct translation.
1.6.9 "Dimette" -
Turned the modules side of the plugin into an adt array.
Changed a few things about when plugin is failed to load.
Basic Spit Detection incorporated (breaks the already broken smoker cloud detection :bacon!:)

Credits:
-Caps Lock Fuck Yeah
- Found out how to award points for protecting team mates
- Wrote 1.5.4
-JackieChan
- Showed some code for detecting spit.

Instructions:
For the base plugin that includes the menu based Points system, download points_system.zip below. Our modules are always prefixed with "ps_" by default modules that are currently supported are packaged with the zip file

*Modules require that the base l4d2_points_system is installed.

Extract l4d2_points_system.zip and place the files/folders that come out in
<game directory>\addons\sourcemod\Next compile the plugins by dragging the .sp files to compile.exe within
<game directory>\addons\sourcemod\scripting
Then go to sourcemod\scripting\compiled\ and move the new .smx files to sourcemod\plugins\

Note:As of 1.3.9 the history zip attached at the bottom has been removed, use the Google code page from now on.

Redownload 1.6.6 please.

Google Code Page ~Discontinued as of 1.6.6, I will now be using BitBucket to make it easier to keep track of changes.

If you're playing versus or realism versus no the points don't carry over they're determined by this cvar l4d2_points_reset_mapchange "versus,teamversus" leave that empty if you want points to carry over.

Could you add another feature to this system? My idea is a variant of the previous system's headshot idea.

How many points does killing a certain amount of infected WITH headshots earn
How many kills you need to earn a head hunter bounty

There seems to be a problem, I left the reset convar alone, and it still resets the points on the next map in campaign. Is this an actual error or is it doing this because my server is changed for 8-player campaign?

Also could you have it so that ALL points reset after being rescued in a campaign?

I'd also like to see the admin /heal and !heal chat triggers to give themselfs full health, like in the other points plugin. Although maybe for this one, change it so that it heals yourself with /heal, but also so you can target someone with /heal @all and the like.

Quote:

Originally Posted by siangc

I like the menu, but I miss some of the admin commands.
sm_clientgivepoints
sm_clientsetpoints
can you add those?