Hello
Kill num is displayed as "You kill"
and
Kill snd is no played
please fix to my code
best regards,
PHP Code:
#include <amxmodx>
new kill_num[32]
public plugin_init()
{
register_plugin("PLUGIN", "PLUGIN", "AUTHOR")
register_event("DeathMsg", "event_death", "a", "1>0")
}
public plugin_precache()
{
precache_sound("amxx_sound/kill1.wav")
precache_sound("amxx_sound/kill2.wav")
precache_sound("amxx_sound/kill3.wav")
precache_sound("amxx_sound/kill4.wav")
precache_sound("amxx_sound/kill5.wav")
precache_sound("amxx_sound/kill6.wav")
precache_sound("amxx_sound/kill7.wav")
precache_sound("amxx_sound/kill8.wav")
precache_sound("amxx_sound/kill9.wav")
precache_sound("amxx_sound/kill10.wav")
precache_sound("amxx_sound/kill11.wav")
precache_sound("amxx_sound/kill12.wav")
precache_sound("amxx_sound/kill13.wav")
precache_sound("amxx_sound/kill14.wav")
}
public client_connect(id)
{
kill_num[id] = 0
}
public client_disconnect(id)
{
kill_num[id] = 0
}
public event_death()
{
static iKiller, iVictim
iKiller = read_data(1)
iVictim = read_data(2)
if(iKiller != iVictim)
{
kill_num[iKiller]++
kill_num[iVictim] = 0
client_print(iKiller, print_center, "You %s kill", kill_num[iKiller])
client_cmd(iKiller, "spk amxx_sound/kill%s.wav", kill_num[iKiller])
}
}