Firestorm
07-09-2006, 11:13 AM
// This plugin will give special rewards for flagpoints
// and objectives.
//
//
// REWARDS:
// ========
//
// 1.) Health refillment
// 2.) X ammo for weapon currently in hand
// 3.) FG42 with 999shots (any map, any team)
// 4.) X seconds godmode while glowing in team's color
// 5.) X ammo, +X kills, -X deaths
// 6.) X seconds invisibile/silent
//
// You can sort the row in which they are given yourself
// and you can even completely disable rewards that you don't
// want to use.
//
// Plugin detects if a reward was reached at the end of a round
// and gives the award after respawn, so it's not lost.
// CVARs (for amxx.cfg):
// =====================
//
// dod_sr_enabled <1/0> = enable/disable DoD ScoreRewards
//
// dod_sr_hudannounce <1/0> = sets way rewards are announced
// 1 by hudmessage
// 2 by chatmessage
//
// dod_sr_cyclerewards <1/0> = enable/disable continously
// starting again after getting
// the last reward
//
// dod_sr_lastreward <reward#> = define # of last reward in the row,
// after this reward the scorecount is
// reset if you're using the cycle feature
//
// dod_sr_givebullets <amount> = amount of bullets to give
// (Reward #2 & #5)
//
// dod_sr_giveshells <amount> = amount of shells to give
// (Reward #2 & #5)
//
// dod_sr_givenades <amount> = amount of nades to give
// (Reward #2 & #5)
//
// dod_sr_godtime <time> = time in sec for godmode
// (Reward #4)
//
// dod_sr_increasekills <amount> = kills to add
// (Reward #5)
//
// dod_sr_decreasedeaths <amount> = deaths to remove
// (Reward #5)
//
// dod_sr_silenttime <time> = time in sec for silentmode
// (Reward #6)
//
//
//
// set amount of flagcaps for normal maps:
// dod_reward1, dod_reward2, dod_reward3, dod_reward4, dod_reward5, dod_reward6
//
// set amount of objectives for para maps:
// dod_para1, dod_para2, dod_para3, dod_para4, dod_para5, dod_para6
//
// Only flagcaptures are counted, not flagpoints, same for
// objectives on para maps!
//
// so set the dod_para* cvars low and the dod_reward* cvars high
// (or just leave it like it is with the standard values)
// CHANGELOG:
// ==========
//
// - 30.09.2004 Version 1.0alpha
// Initial Alpha
//
// - 16.10.2004 Version 1.5beta
// cleaned the code, added a reward, fixed minor bugs
//
// - 23.10.2004 Version 1.6beta
// when giving the FG42, player gets knife/spade, pistol
// and a grenade as well.
// as the mills bomb isn't a valid weapon to give,
// british soldiers get a stickgrenade.
//
// - 17.02.2005 Version 1.7beta
// * fixed fullfilled objectives on dod_glider
// not being counted for allies
// * fixed oversight that players with a grenade
// in their hand would get 999 of them on Reward2
// * fixed oversight that deaths could become negative
// on Reward5
// * removed some double code
//
// - 23.02.2005 Version 1.8beta
// * added features:
// - added cvar to enable/disable the plugin
// - added cvars for amount of ammo to give on Reward2 for
// = bullets
// = grenades
// = shells
// - added cvar for godmode time on Reward4
// - added cvars for amount of kills/deaths
// to increase/decrease on Reward5
// - added cvar for silentmode time on Reward6
// * changes:
// - removed minvalue check
//
// - 26.02.2005 Version 1.9beta
// * added features:
// - added cvar to whether cycle the rewards or just stop
// after all rewards were given.
// - added cvar to define the last reward in your row, so
// if you're using the cycle feature, the plugin knows when
// to reset. that way you don't have to use all rewards and
// not in the numerical row either. you're free to change
// the row in which the rewards are given even if you use the cycle
// feature. you can leave out rewards that you don't want to use
// as well, just be sure to set the cvar to the number of the reward
// that's last in your row.
// * added cvars:
// - dod_sr_cyclerewards <1/0> = enable/disable starting from the
// beginning after giving the last reward in row.
// - dod_sr_lastreward <1/2/3/4/5/6> = define last reward in your row.
// * example 1:
// - dod_reward1 10
// - dod_reward2 20
// - dod_reward3 30
// - dod_reward4 40
// - dod_reward5 50
// - dod_reward6 60
// - dod_sr_cyclerewards 1
// - dod_sr_lastreward 6
// -> after getting reward #6 the scorecount for that player is zeroed
// and the rewards for him start from the beginning again.
// * example 2:
// - dod_reward1 0
// - dod_reward2 0
// - dod_reward3 10
// - dod_reward4 0
// - dod_reward5 0
// - dod_reward6 0
// - dod_sr_cyclerewards 1
// - dod_sr_lastreward 3
// -> after getting reward #3 the scorecount for that player is zeroed
// and the rewards for him start from the beginning again.
// -> in this case reward #3 is the only reward given as the others are
// disabled, so players will always receive reward #3 every 10 flagcaps.
// that way you can only use one reward.
// * notes:
// - the plugin is highly customizable now, just fit it to your needs and
// enjoy it!
//
// - 05.03.2005 Version 1.95beta
// * added feature:
// - the way the plugin announces given rewards can be chosen now.
// either hudmessages or simple chatmessages can be used by setting
// the new cvar "dod_sr_hudannounce" to either
// 1 = hudmessage OR
// 2 = chatmessage
//
// - 11.03.2005 Version 1.95beta2
// * changed feature:
// - moved the hudmessage to the center-bottom of the screen, so it doesn't
// interfer with the crosshair
//
// - 27.03.2005 Version 1.95beta3
// * bugfixes:
// - rewards that are set to "0" (disabled) aren't given to random people
// that have 0 flagpoints anymore.
// - fixed "godmode" and "silentmode" bugs on respawn/fullcap
//
// - 08.04.2005 Version 1.96beta
// Bugfix:
// * british soldiers get the mills bomb
// instead of a stickgrenade now.
// (Reward #3)
// thanks to SidLuke for the fix!
// and objectives.
//
//
// REWARDS:
// ========
//
// 1.) Health refillment
// 2.) X ammo for weapon currently in hand
// 3.) FG42 with 999shots (any map, any team)
// 4.) X seconds godmode while glowing in team's color
// 5.) X ammo, +X kills, -X deaths
// 6.) X seconds invisibile/silent
//
// You can sort the row in which they are given yourself
// and you can even completely disable rewards that you don't
// want to use.
//
// Plugin detects if a reward was reached at the end of a round
// and gives the award after respawn, so it's not lost.
// CVARs (for amxx.cfg):
// =====================
//
// dod_sr_enabled <1/0> = enable/disable DoD ScoreRewards
//
// dod_sr_hudannounce <1/0> = sets way rewards are announced
// 1 by hudmessage
// 2 by chatmessage
//
// dod_sr_cyclerewards <1/0> = enable/disable continously
// starting again after getting
// the last reward
//
// dod_sr_lastreward <reward#> = define # of last reward in the row,
// after this reward the scorecount is
// reset if you're using the cycle feature
//
// dod_sr_givebullets <amount> = amount of bullets to give
// (Reward #2 & #5)
//
// dod_sr_giveshells <amount> = amount of shells to give
// (Reward #2 & #5)
//
// dod_sr_givenades <amount> = amount of nades to give
// (Reward #2 & #5)
//
// dod_sr_godtime <time> = time in sec for godmode
// (Reward #4)
//
// dod_sr_increasekills <amount> = kills to add
// (Reward #5)
//
// dod_sr_decreasedeaths <amount> = deaths to remove
// (Reward #5)
//
// dod_sr_silenttime <time> = time in sec for silentmode
// (Reward #6)
//
//
//
// set amount of flagcaps for normal maps:
// dod_reward1, dod_reward2, dod_reward3, dod_reward4, dod_reward5, dod_reward6
//
// set amount of objectives for para maps:
// dod_para1, dod_para2, dod_para3, dod_para4, dod_para5, dod_para6
//
// Only flagcaptures are counted, not flagpoints, same for
// objectives on para maps!
//
// so set the dod_para* cvars low and the dod_reward* cvars high
// (or just leave it like it is with the standard values)
// CHANGELOG:
// ==========
//
// - 30.09.2004 Version 1.0alpha
// Initial Alpha
//
// - 16.10.2004 Version 1.5beta
// cleaned the code, added a reward, fixed minor bugs
//
// - 23.10.2004 Version 1.6beta
// when giving the FG42, player gets knife/spade, pistol
// and a grenade as well.
// as the mills bomb isn't a valid weapon to give,
// british soldiers get a stickgrenade.
//
// - 17.02.2005 Version 1.7beta
// * fixed fullfilled objectives on dod_glider
// not being counted for allies
// * fixed oversight that players with a grenade
// in their hand would get 999 of them on Reward2
// * fixed oversight that deaths could become negative
// on Reward5
// * removed some double code
//
// - 23.02.2005 Version 1.8beta
// * added features:
// - added cvar to enable/disable the plugin
// - added cvars for amount of ammo to give on Reward2 for
// = bullets
// = grenades
// = shells
// - added cvar for godmode time on Reward4
// - added cvars for amount of kills/deaths
// to increase/decrease on Reward5
// - added cvar for silentmode time on Reward6
// * changes:
// - removed minvalue check
//
// - 26.02.2005 Version 1.9beta
// * added features:
// - added cvar to whether cycle the rewards or just stop
// after all rewards were given.
// - added cvar to define the last reward in your row, so
// if you're using the cycle feature, the plugin knows when
// to reset. that way you don't have to use all rewards and
// not in the numerical row either. you're free to change
// the row in which the rewards are given even if you use the cycle
// feature. you can leave out rewards that you don't want to use
// as well, just be sure to set the cvar to the number of the reward
// that's last in your row.
// * added cvars:
// - dod_sr_cyclerewards <1/0> = enable/disable starting from the
// beginning after giving the last reward in row.
// - dod_sr_lastreward <1/2/3/4/5/6> = define last reward in your row.
// * example 1:
// - dod_reward1 10
// - dod_reward2 20
// - dod_reward3 30
// - dod_reward4 40
// - dod_reward5 50
// - dod_reward6 60
// - dod_sr_cyclerewards 1
// - dod_sr_lastreward 6
// -> after getting reward #6 the scorecount for that player is zeroed
// and the rewards for him start from the beginning again.
// * example 2:
// - dod_reward1 0
// - dod_reward2 0
// - dod_reward3 10
// - dod_reward4 0
// - dod_reward5 0
// - dod_reward6 0
// - dod_sr_cyclerewards 1
// - dod_sr_lastreward 3
// -> after getting reward #3 the scorecount for that player is zeroed
// and the rewards for him start from the beginning again.
// -> in this case reward #3 is the only reward given as the others are
// disabled, so players will always receive reward #3 every 10 flagcaps.
// that way you can only use one reward.
// * notes:
// - the plugin is highly customizable now, just fit it to your needs and
// enjoy it!
//
// - 05.03.2005 Version 1.95beta
// * added feature:
// - the way the plugin announces given rewards can be chosen now.
// either hudmessages or simple chatmessages can be used by setting
// the new cvar "dod_sr_hudannounce" to either
// 1 = hudmessage OR
// 2 = chatmessage
//
// - 11.03.2005 Version 1.95beta2
// * changed feature:
// - moved the hudmessage to the center-bottom of the screen, so it doesn't
// interfer with the crosshair
//
// - 27.03.2005 Version 1.95beta3
// * bugfixes:
// - rewards that are set to "0" (disabled) aren't given to random people
// that have 0 flagpoints anymore.
// - fixed "godmode" and "silentmode" bugs on respawn/fullcap
//
// - 08.04.2005 Version 1.96beta
// Bugfix:
// * british soldiers get the mills bomb
// instead of a stickgrenade now.
// (Reward #3)
// thanks to SidLuke for the fix!