Raised This Month: $51 Target: $400
 12% 

Bug or something like that


Post New Thread Reply   
 
Thread Tools Display Modes
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
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-28-2011 , 17:01   Re: Bug or something like that
Reply With Quote #2

PHP Code:
new const Sounds[14][] = 

    
"next-version/double_kill.wav"
    
"next-version/triple_kill.wav"
    
"next-version/mega_kill.wav"
PHP Code:
        else if(Streak[Attacker] >= 2
            
client_cmd(0,"spk %s",Sounds[Streak[Attacker]]) 
How strange is it !!!!!!
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
#8 SickneSS
BANNED
Join Date: Sep 2008
Location: Here
Old 01-28-2011 , 17:14   Re: Bug or something like that
Reply With Quote #3

Quote:
Originally Posted by ConnorMcLeod View Post
PHP Code:
new const Sounds[14][] = 

    
"next-version/double_kill.wav"
    
"next-version/triple_kill.wav"
    
"next-version/mega_kill.wav"
PHP Code:
        else if(Streak[Attacker] >= 2
            
client_cmd(0,"spk %s",Sounds[Streak[Attacker]]) 
How strange is it !!!!!!
Sorry ,I am Stupid :p...by the way,you said How strange is it!,I am not like u making plugins,but,I try to do the best what I can,if you have a suggestion to how to made my code more efficient,please,tell me.

Code..
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");
    
register_event("TextMsg","EventGameWill","a","2&#Game_w");
}

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);
            
            if(
IsHeadShot)
                
set_task(0.30,"cmdHeadShot");
            
            
IsFirstBlood false;
        }
            
        if(
IsHeadShot && Streak[Attacker] <= 1)
            
client_cmd(0,"spk %s",HeadShot);
            
        if(
Streak[Attacker] >= 2)
        {
            
client_cmd(0,"spk %s",Sounds[Streak[Attacker]-2]);
            
            if(
IsHeadShot)
                
set_task(0.30,"cmdHeadShot");
        }
    }
    return 
PLUGIN_CONTINUE;
}

public 
cmdHeadShot()
    
client_cmd(0,"spk %s",HeadShot);

public 
EventGameWill()
{
    for(new 
1;<= MaxPlayers;i++)
        
Streak[i] = 0;
        
    
IsFirstBlood true;

#8 SickneSS is offline
Send a message via MSN to #8 SickneSS Send a message via Skype™ to #8 SickneSS
Reply



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 19:03.


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