I'm using one old AMX plugin, and want to make it work on my server. So here is what I have (done some changes):
Code:
#include <amxmodx>
#define SOUNDS_NUM 8
new sounds_list[SOUNDS_NUM][] = {"misc/hostages/getouttahere.wav", "misc/hostages/illfollow.wav", "misc/hostages/youlead.wav", "misc/hostages/letsdoit.wav", "misc/hostages/letsgo.wav", "misc/hostages/letshurry.wav", "misc/hostages/letsmove.wav", "misc/hostages/okletsgo.wav"}
public plugin_precache()
{
precache_sound("misc/hostages/getouttahere.wav")
precache_sound("misc/hostages/illfollow.wav")
precache_sound("misc/hostages/youlead.wav")
precache_sound("misc/hostages/letsdoit.wav")
precache_sound("misc/hostages/letsgo.wav")
precache_sound("misc/hostages/letshurry.wav")
precache_sound("misc/hostages/letsmove.wav")
precache_sound("misc/hostages/okletsgo.wav")
}
public plugin_init()
{
register_plugin("Hostage Sounds", "x.x", "xxxxx")
return PLUGIN_CONTINUE
}
public EmitSound(entity, channel, const sample[])
{
if(equal(sample, "hostage/hos1.wav") || equal(sample, "hostage/hos2.wav")
|| equal(sample, "hostage/hos3.wav") || equal(sample, "hostage/hos4.wav")
|| equal(sample, "hostage/hos5.wav") || equal(sample, "hostage/hos6.wav")
|| equal(sample, "hostage/hos7.wav"))
{
emit_sound(entity, CHAN_VOICE, sounds_list[random_num(0, SOUNDS_NUM-1)], 1.0, ATTN_NORM, 0, PITCH_NORM)
return PLUGIN_HANDLED
}
return PLUGIN_CONTINUE
}
Tested, but hostages still use hos...wav instead new ones. What is wrong?
__________________