Raised This Month: $ Target: $400
 0% 

show kill count and play kill sound


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
RuRuRu612754
Senior Member
Join Date: Sep 2011
Old 06-29-2012 , 03:04   show kill count and play kill sound
Reply With Quote #1

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 
iKilleriVictim
        
        iKiller 
read_data(1)
        
iVictim read_data(2)
        
        if(
iKiller != iVictim)
        {
        
kill_num[iKiller]++
        
kill_num[iVictim] = 0

        client_print
(iKillerprint_center"You %s kill"kill_num[iKiller])
        
client_cmd(iKiller"spk amxx_sound/kill%s.wav"kill_num[iKiller])
    }

RuRuRu612754 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 15:12.


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