View Single Post
Author Message
#8 SickneSS
BANNED
Join Date: Sep 2008
Location: Here
Old 01-28-2011 , 16:52   Bug or something like that
Reply With Quote #1

I just wondering why the sounds double_kill and triple_kill is not played in game,the sounds starts with mega_kill and continue from there,some help?..

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

#include <amxmodx>
#include <amxmisc>

#pragma semicolon 1

/* Definition */
#define IsPlayer(%1)    (1 <= %1 <= MaxPlayers)

/* Sounds */
new const FirstBlood[] = "next-version/firstblood.wav";
new const 
HeadShot[] = "next-version/headshot.wav";

new const 
Sounds[14][] =
{
    
"next-version/double_kill.wav",
    
"next-version/triple_kill.wav",
    
"next-version/mega_kill.wav",
    
"next-version/ultra_kill.wav",
    
"next-version/monster_kill.wav",
    
"next-version/rampage.wav",
    
"next-version/ownage.wav",
    
"next-version/killing_spree.wav",
    
"next-version/dominating.wav",
    
"next-version/whicked_sick.wav",
    
"next-version/unstoppable.wav",
    
"next-version/holyshit.wav",
    
"next-version/godlike.wav",
    
"next-version/combowhore.wav"
};

/* Array */
new Streak[33];

/* Players */
new MaxPlayers;

/* Boolean */
new bool:IsFirstBlood;

    
public 
plugin_precache()
{    
    
precache_sound(FirstBlood);
    
precache_sound(HeadShot);
    
    for(new 
0;sizeof Sounds;i++)
        
precache_sound(Sounds[i]);    
    
    
IsFirstBlood true;
}
    
public 
plugin_init()
{
    
/* Plugin Registration */
    
register_plugin("[NV] Ultimate Sounds","0.0.1","#8 SickneSS");
    
    
/* Players */
    
MaxPlayers get_maxplayers();
    
    
/* Event */
    
register_event("DeathMsg","EventDeathMsg","a");
}

public 
client_putinserver(id)
    
Streak[id] = 0;
    
public 
client_disconnect(id)
    
Streak[id] = 0;

public 
EventDeathMsg()
{
    new 
Attacker read_data(1);
    new 
Victim read_data(2);
    new 
IsHeadShot read_data(3);
    
    if(
Attacker != Victim && IsPlayer(Attacker))
    {
        
Streak[Attacker]++;
        
Streak[Victim] = 0;
        
        if(
IsFirstBlood)
        {
            
client_cmd(0,"spk %s",FirstBlood);
            
IsFirstBlood false;
        }
        
        if(
IsHeadShot && Streak[Attacker] <= 1)
            
client_cmd(0,"spk %s",HeadShot);
        else if(
IsHeadShot && Streak[Attacker] >= 2)
        {
            
client_cmd(0,"spk %s",Sounds[Streak[Attacker]]);
            
set_task(0.30,"cmdHeadShot");
        }
        else if(
Streak[Attacker] >= 2)
            
client_cmd(0,"spk %s",Sounds[Streak[Attacker]]);
    }
    return 
PLUGIN_CONTINUE;
}

public 
cmdHeadShot()
    
client_cmd(0,"spk %s",HeadShot); 
#8 SickneSS is offline
Send a message via MSN to #8 SickneSS Send a message via Skype™ to #8 SickneSS