Raised This Month: $ Target: $400
 0% 

Grenade Kill


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Mifuntm
Senior Member
Join Date: Feb 2008
Location: in space...
Old 01-28-2009 , 06:25   Grenade Kill
Reply With Quote #1

Code:
/* Plugin generated by AMXX-Studio */

#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(0, "spk misc/grenadekill")
}
 
public plugin_precache()
        precache_sound("misc/grenadekill.wav")


This plugin work fine but if someone get killed by HeGrenade sound "grenadekill.wav" its playing for all players connected to the server.
Please help, and change code to playback sound only for victim.
example: if i get killed by HeGrenade plugin play this sound but only for me.
Thanks.
Mifuntm is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:44.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode