Code: Select all
/* * Bomb Events - Money Rewards** Author : DarkSider | ultimate.ro* Version : 0.1*** This Plugin will give rewards in money to people who :* - Are plantig the bomb & if bomb explodes successfully , the planter will receive another bonus ;* - Are defusing the bomb .** CVARS :* - bombplanted_bonus => Money gived to bomb planter (Default : 3000) ;* - bombdefused_bonus => Money gived to bomb defuser (Default : 3000) ;* - bombexplode_bonus => Money gived to bomb planter if bomb explodes successfully (Default : 2000) ;* You can modify these CVARS in game , logged as admin , by command amx_cvar cvarname value .** Required Modules :* - CSTRIKE* - CSX** AMXX Version :* It requires AmxMoDX 1.70 or higher !** Credits : - SAMURAI16 .** Tested on CS 1.6 Server with AmxMoDX 1.75a .**/ #include <amxmodx>#include <amxmisc>#include <cstrike>#include <csx> #define PLUGIN "Bomb Events - Money Rewards"#define VERSION "0.1"#define AUTHOR "DarkSider" new pBonusnew dBonusnew eBonus public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_event("TextMsg", "bomb_planted", "a", "2&%!MRAD_BOMBPL") register_event("TextMsg", "bomb_defused", "a", "2&%!MRAD_BOMBDEF") register_event("TextMsg", "bomb_explode", "a", "2&#Target_B") pBonus = register_cvar("bombplanted_bonus","900") dBonus = register_cvar("bombdefused_bonus","1500") eBonus = register_cvar("bombexplode_bonus","900")} public bomb_planted(id){ { new money = cs_get_user_money(id) new got = get_pcvar_num(pBonus) cs_set_user_money(id, money + got) client_print(id,print_center,"You've received %$ for planting the bomb !", get_pcvar_num(pBonus)) }} public bomb_defused(id){ { new money = cs_get_user_money(id) new got = get_pcvar_num(dBonus) cs_set_user_money(id, money + got) client_print(id,print_center,"You've received %$ for defusing the bomb !", get_pcvar_num(dBonus)) }} public bomb_explode(id){ { new money = cs_get_user_money(id) new got = get_pcvar_num(eBonus) cs_set_user_money(id, money + got) client_print(id,print_center,"You've received %$ because the bomb planted by you exploded successfully !", get_pcvar_num(eBonus)) }}