I'd like to use the tasks for Countdown C4 but there is an error
Description: This Plugin is for Bomb(C4) when you plant a bomb a tasks was set to the cound Down With sounds and hudmessages
if you are planting or defusing bomb the plugin show a hudmessages
if the round is end or restart the tasks will remove
The error in this function: I change Many Thinks But it dosn't work
PHP Code:
public bomb_planting(planter) {
new PLname[32]
new randim = random_num(0,1)
if(!get_pcvar_num(g_Cvar))
return PLUGIN_CONTINUE
get_user_name(planter, PLname, 31)
set_hudmessage(0, 0, 255, -1.0, -1.0, 0, 2.0, 1.0)
show_hudmessage(0, "%s is planting The bomb", PLname)
switch(randim)
{
case 0: client_cmd(0,"spk im_gonna_go_plant_the_bomb.wav")
case 1: client_cmd(0,"spk misc/im_gonna_go_plant.wav")
}
return PLUGIN_HANDLED
}
// called when the bomb is planted
public bomb_planted(planter) {
new Name[32];
if(!get_pcvar_num(g_Cvar))
return PLUGIN_CONTINUE
get_user_name(planter, Name, 31)
set_hudmessage(255,0,0,-1.0,-1.0,0,0.3,1.0)
show_hudmessage(0, "Bomb has been planted from %s", Name)
new bomb
bomb = fm_find_ent_by_model(-1, "grenade", "models/w_c4.mdl")
new float:ftime = cs_get_c4_explode_time(bomb)
new float:ftm1 = ftime - 9.0
new float:ftm2 = ftime - 8.0
new float:ftm3 = ftime - 7.0
new float:ftm4 = ftime - 6.0
new float:ftm5 = ftime - 5.0
new float:ftm6 = ftime - 4.0
new float:ftm7 = ftime - 3.0
new float:ftm8 = ftime - 2.0
new float:ftm9 = ftime - 1.0
get_user_name(planter, PName, 31)
set_hudmessage(255, 0,0, -1.0, 0.17, 0, 0.9, 1.0)
show_hudmessage(0, "Bomb Explode! Good Job %s", PName)
switch(randam)
{
case 0: client_cmd(0,"spk misc/good_one_sir2.wav")
case 1: client_cmd(0,"spk misc/good_job_team.wav")
case 2: client_cmd(0,"spk misc/good_one_sir.wav")
}
return PLUGIN_HANDLED
}
// called when the defuser is defusing the bomb
public bomb_defusing(defuser) {
new DName[32];
new rando = random_num(0,2)
if(!get_pcvar_num(g_Cvar))
return PLUGIN_CONTINUE
get_user_name(defuser, DName, 31)
set_hudmessage(0, 0, 255, -1.0, -1.0, 0, 2.0, 1.0)
show_hudmessage(0, "%s is Defusing The bomb", DName)
switch(rando)
{
case 0: client_cmd(0,"spk misc/defusing_bomb.wav")
case 1: client_cmd(0,"spk misc/defusing.wav")
case 2: client_cmd(0, "spk defusing_bomb_now.wav")
}
return PLUGIN_CONTINUE
}
// called when the defuser complete
public bomb_defused(defuser) {
new DefName[32]
new randem = random_num(0,2)
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team
Warning: Tag mismatch on line 86
Warning: Tag mismatch on line 87
Warning: Tag mismatch on line 88
Warning: Tag mismatch on line 89
Warning: Tag mismatch on line 90
Warning: Tag mismatch on line 91
Warning: Tag mismatch on line 92
Warning: Tag mismatch on line 93
Warning: Tag mismatch on line 94
Warning: Tag mismatch on line 97
Warning: Tag mismatch on line 97
Warning: Tag mismatch on line 98
Warning: Tag mismatch on line 99
Warning: Tag mismatch on line 100
Warning: Tag mismatch on line 101
Warning: Tag mismatch on line 102
Warning: Tag mismatch on line 103
Warning: Tag mismatch on line 104
Warning: Tag mismatch on line 105
Header size: 908 bytes
Code size: 7724 bytes
Data size: 4384 bytes
Stack/heap size: 16384 bytes; estimated max. usage=780 cells (3120 bytes)
Total requirements: 29400 bytes
19 Warnings.
Done.
get_user_name(planter, PName, 31) set_hudmessage(255, 0,0, -1.0, 0.17, 0, 0.9, 1.0) show_hudmessage(0, "Bomb Explode! Good Job %s", PName) switch(randam) { case 0: client_cmd(0,"spk misc/good_one_sir2.wav") case 1: client_cmd(0,"spk misc/good_job_team.wav") case 2: client_cmd(0,"spk misc/good_one_sir.wav") }
return PLUGIN_HANDLED } // called when the defuser is defusing the bomb public bomb_defusing(defuser) { new DName[32]; new rando = random_num(0,2)
if(!get_pcvar_num(g_Cvar)) return PLUGIN_CONTINUE
get_user_name(defuser, DName, 31) set_hudmessage(0, 0, 255, -1.0, -1.0, 0, 2.0, 1.0) show_hudmessage(0, "%s is Defusing The bomb", DName) switch(rando) { case 0: client_cmd(0,"spk misc/defusing_bomb.wav") case 1: client_cmd(0,"spk misc/defusing.wav") case 2: client_cmd(0, "spk defusing_bomb_now.wav") } return PLUGIN_CONTINUE } // called when the defuser complete public bomb_defused(defuser) { new DefName[32] new randem = random_num(0,2)
get_user_name(planter, PName, 31) set_hudmessage(255, 0,0, -1.0, 0.17, 0, 0.9, 1.0) show_hudmessage(0, "Bomb Explode! Good Job %s", PName) switch(randam) { case 0: client_cmd(0,"spk misc/good_one_sir2.wav") case 1: client_cmd(0,"spk misc/good_job_team.wav") case 2: client_cmd(0,"spk misc/good_one_sir.wav") }
return PLUGIN_HANDLED } // called when the defuser is defusing the bomb public bomb_defusing(defuser) { new DName[32]; new rando = random_num(0,2)
if(!get_pcvar_num(g_Cvar)) return PLUGIN_CONTINUE
get_user_name(defuser, DName, 31) set_hudmessage(0, 0, 255, -1.0, -1.0, 0, 2.0, 1.0) show_hudmessage(0, "%s is Defusing The bomb", DName) switch(rando) { case 0: client_cmd(0,"spk misc/defusing_bomb.wav") case 1: client_cmd(0,"spk misc/defusing.wav") case 2: client_cmd(0,"spk misc/defusing_bomb_now.wav") } return PLUGIN_CONTINUE } // called when the defuser complete public bomb_defused(defuser) { new DefName[32] new randem = random_num(0,2)