Quote:
Originally Posted by Dores
Also, it's spk, not speak, and you don't need to put quotes(") around the sound.
|
Hey,
u mean me?
PHP Code:
#include <amxmodx>
#include <amxmisc>
new g_Enable
public plugin_init()
{
register_plugin("Grenade Kill", "1.0", "hleV")
g_Enable = register_cvar("gk_enable", "1")
register_event("DeathMsg", "playerDeath", "a", "1>0")
}
public playerDeath()
{
new killer = read_data(1)
new victim = read_data(2)
new weapon[8]
read_data(4, weapon, 7)
if (get_pcvar_num(g_Enable) && killer != victim && equal(weapon, "grenade"))
client_cmd(victim, "spk misc/grenadekill")
}
public plugin_precache()
precache_sound("misc/grenadekill.wav")
I think its now right.. i edited ma first post
__________________