Hello
my code is compile miss
compile.exe :
PHP Code:
warning 203: symbol is never used: "sound_damege"
sound.sma :
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <fakemeta>
new const sound_damage[] =
{
"player/damage_1.wav",
"player/damage_2.wav",
"player/damage_3.wav"
}
public plugin_init()
{
register_plugin("PLUGIN", "VERSION", "AUTHOR")
register_forward(FM_EmitSound, "forward_fm_emitsound")
}
public plugin_precache()
{
new new_sound = random_num(0, sizeof(sound_damage))
precache_model(new_sound)
}
public forward_fm_emitsound(id, iChannel, sample[], Float:fVolume, Float:fAttenuation, iFlags, iPitch)
{
if(is_user_alive(id))
{
if(cs_get_user_team(id) == CS_TEAM_CT)
{
if(equali(sample, "weapons/bhit_flesh-1.wav") || equali(sample, "weapons/bhit_flesh-2.wav") || equali(sample, "weapons/bhit_flesh-3.wav"))
{
new new_sound = random_num(0, sizeof(sound_damage))
engfunc(EngFunc_EmitSound, id, CHAN_STATIC, new_sound, 1.0, ATTN_NORM, 0, PITCH_NORM)
}
}
}
}
Best Regards,