This plugin recreates the Deathstreaks system from Call of Duty
To clear up any misconceptions about this plugin, this plugin ONLY TRACKS deathstreaks (amount of deaths without getting a kill) (and killstreaks)
This plugin is also equipped with natives so you don't have to keep remaking the same death tracking system, over and over again, in many plugins when you have one plugin to do the job for you.
EDIT: added Killstreak support so it can cover all source engine games.
For those that don't know, a
killstreak is "A reward based system for getting kills without dying" (
http://callofduty.wikia.com/wiki/Killstreaks) while a
deathstreak is "A system based on dying multiple times without getting a kill" (
http://callofduty.wikia.com/wiki/Deathstreak)
Instructions: Simply use any of the natives in any of your RTD/Reward-giving plugins and that's it.
Example Code
PHP Code:
if (GetDeathstreak(client) >= 5) GodModeForTenSecondsLol;
switch ( GetDeathstreak(client) )
{
case 7: code-here;
}
SetDeathstreak(client, 2);
NATIVES
PHP Code:
/**
* Returns the deathstreaks of a client.
*
* @param client Client index.
*
* @return deathstreaks.
*/
native int GetDeathstreak(int client);
/**
* Sets the deathstreaks of a client.
*
* @param client Client index.
*
* @param integer int number.
*/
native void SetDeathstreak(int client, int integer);
/**
* Returns the killstreaks of a client.
*
* @param client Client index.
*
* @return killstreaks.
*/
native int GetKillstreak(int client);
/**
* Sets the killstreaks of a client.
*
* @param client Client index.
* @param number int number.
*
*/
native void SetKillstreak(int client, int number);
Changelog
PHP Code:
12/29/2014 - 1.0.3 - converted to new syntax, REQUIRES SM 1.7+ TO WORK.
8/18/2014 - 1.0.2 - added killstreak support too and supporting natives.
8/17/2014 - 1.0.1 - made it workable for all games that support sourcemod.
8/17/2014 - 1.0.0 - release