Hello!
Can someone tell me whats wrong here?
When the user the dies while holding a nade the 'Fire in the hole' sound plays without him even throwing the nade.
PHP Code:
public message()
{
if(!get_cvar_num("amx_custom_radio"))
return PLUGIN_CONTINUE
if(get_msg_args() != 4 || get_msg_argtype(2) != ARG_STRING || get_msg_argtype(4) != ARG_STRING)
{
return PLUGIN_CONTINUE
}
new arg2[16]
get_msg_arg_string(2, arg2, 15)
if(!equal(arg2, "#Game_radio"))
{
return PLUGIN_CONTINUE
}
new arg4[20]
get_msg_arg_string(4, arg4, 19)
if(equal(arg4, "#Fire_in_the_hole"))
{
set_msg_arg_string(4, CRfireinhole)
return PLUGIN_CONTINUE
}
return PLUGIN_CONTINUE
}
public msg_audio()
{
if(!get_cvar_num("amx_custom_radio"))
return PLUGIN_CONTINUE
if(get_msg_args() != 3 || get_msg_argtype(2) != ARG_STRING) {
return PLUGIN_CONTINUE
}
new arg2[20]
get_msg_arg_string(2, arg2, 19)
if(equal(arg2[1], "!MRAD_FIREINHOLE"))
{
return PLUGIN_HANDLED
}
return PLUGIN_CONTINUE
}
public grenade_throw(id,ent,wid)
{
if(!get_cvar_num("amx_custom_radio"))
return PLUGIN_CONTINUE
new players[32],total, team_name[10]
get_user_team(id,team_name, 9)
get_players(players, total ,"ce", team_name) // No bots and Match team name
new name[32]
get_user_name(id,name,31)
for(new a=0; a < total; ++a)
{
client_cmd(players[a], "spk radio/custom/ct_fireinhole.wav")
if (get_cvar_num("amx_real_radio"))
{
emit_sound(id, CHAN_VOICE, "radio/custom/ct_fireinhole.wav" , 0.9, ATTN_STATIC, 0, PITCH_NORM)
}
}
return PLUGIN_HANDLED
}