קוד:#include <amxmodx> #include <amxmisc> #include <csx> #include <fun> #define PLUGIN "Bomb Game" #define VERSION "1.0" #define AUTHOR "Starsailor" new BombPlanted=0 new BombDefused=0 new BombExplode = 0 new BombCount[33] new DefCount[33] new MINBOMBS = 3 new g_enable new g_giveawp forward bomb_planting(planter); forward bomb_planted(planter); forward bomb_explode(); forward bomb_defusing(defuser); forward bomb_defused(defuser); new const PLAMSG[] ="WoW %s has planted %d times the bomb!!" new const DEFMSG[] ="WoW %s has defused %d times the bomb!!" new const BOMBPLANTINGMSG[] = "%s is planting the bomb!!" new const BOMBDEFMSG[] = "%s has defused the bomb!!" new const BOMBDEFUMSG[] = "%s is defusing the bomb!!" new const BOMBPLTEDMSG[] = "%s has planted the bomb!!" new const BOMBDETMSG[] = "The bomb has exploded!!" public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_clcmd("say_team /bombinfo","bomb_info"); register_clcmd("say /bombinfo","bomb_info"); g_enable = register_cvar("bg_enable","1") g_giveawp = register_cvar("bg_giveawp","1") } public bomb_planting(id) { new plantername[32] get_user_name(id,plantername,31) if(get_pcvar_num(g_enable) == 1) { set_hudmessage(255, 0, 0, -1.0, 0.2, 0, 6.0, 12.0) show_hudmessage(0, BOMBPLANTINGMSG, plantername) } } public bomb_planted(id) { new plantername[32] get_user_name(id,plantername,31) if(get_pcvar_num(g_enable) == 1){ set_hudmessage(255, 0, 0, -1.0, 0.2, 1, 6.0, 6.0) show_hudmessage(0, BOMBPLTEDMSG, plantername) BombPlanted=(BombPlanted+1) BombCount[id]=( BombCount[id]+1) if(BombCount[id]>= MINBOMBS){ set_hudmessage(255, 0, 0, -1.0, 0.5, 1, 6.0, 6.0) show_hudmessage(0, PLAMSG, plantername,BombCount[id]) if(get_pcvar_num(g_giveawp)==1){ give_item(id,"weapon_awp") give_item(id,"ammo_338magnum") give_item(id,"ammo_338magnum") give_item(id,"ammo_338magnum") client_print(id,print_chat,"You have won an AWP for planting the bomb %d times",BombCount[id]) } } } } public bomb_explode() { if(get_pcvar_num(g_enable) == 1) { set_hudmessage(255, 0, 0, -1.0, 0.2, 1, 6.0, 5.0) show_hudmessage(0, BOMBDETMSG) BombExplode=(BombExplode+1) } } public bomb_defused(id) { new defname[32] get_user_name(id,defname,31) if(get_pcvar_num(g_enable) == 1){ set_hudmessage(255, 0, 0, -1.0, 0.2, 1, 6.0, 5.0) show_hudmessage(0, BOMBDEFMSG, defname) BombDefused=(BombDefused+1) DefCount[id]=(DefCount[id]+1) if(DefCount[id]>= MINBOMBS){ set_hudmessage(255, 0, 0, -1.0, 0.5, 1, 6.0, 6.0) show_hudmessage(0, DEFMSG, defname,DefCount[id]) if(get_pcvar_num(g_giveawp)==1){ give_item(id,"weapon_awp") give_item(id,"ammo_338magnum") give_item(id,"ammo_338magnum") give_item(id,"ammo_338magnum") client_print(id,print_chat,"You have won an AWP for defusing the bomb %d times",DefCount[id]) } } } } public bomb_defusing(id) { new defname[32] get_user_name(id,defname,31) if(get_pcvar_num(g_enable) == 1){ set_hudmessage(255, 0,0, -1.0, 0.2, 1, 6.0, 7.0) show_hudmessage(0, BOMBDEFUMSG, defname) } } public bomb_info(id) { if (get_pcvar_num(g_enable)==1){ client_print(id,print_chat,"BOMBS Planted: %d ",BombPlanted); client_print(id,print_chat,"BOMBS Defused: %d",BombDefused); client_print(id,print_chat,"BOMBS Exploded: %d ",BombExplode); } }





הירשם כדי להגיב לנושא