Raised This Month: $ Target: $400
 0% 

Plugin Sounds Count


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
smiley92
Senior Member
Join Date: Jun 2011
Location: Romania
Old 10-12-2013 , 06:27   Plugin Sounds Count
Reply With Quote #1

Hi alliedmoders.
I played on a server that had some interesting sounds.I have the sound pack and I want someone to make me that plugin.

Plugin that said, do this:
At the end of each round saying who lead and how many lead.
The score can pe draw, and for that is a sound in pack "egalitate.wav".

Maybe in plugin must to be and space after each word, "gol..wav" and that plugin I want to say so:
"Tero / Counter lead with x to y" where x and y is counting, if is egalite to play sound: "Is equality".

And an Attachments is pack with that sounds.
Attached Files
File Type: zip sounds.zip (981.1 KB, 54 views)
smiley92 is offline
Old 10-13-2013, 06:16
smiley92
This message has been deleted by YamiKaitou. Reason: wait 14 days before you bump
RapZzw3rR
Member
Join Date: May 2012
Location: Romania
Old 10-13-2013 , 15:02   Re: Plugin Sounds Count
Reply With Quote #2

PHP Code:
#include <amxmodx>
#include <cshack>

#pragma semicolon 1

#define TERO            1
#define CT            2
#define MAX_ROUNDS        59

static const

    
PLUGIN[ ] =        "Lead Team",
    
VERSION[ ] =        "0.0.1",
    
AUTHOR[ ] =        "Rap^^";


new const 
g_szSounds[7][ ] =
{
    
"terro.wav",
    
"counter.wav",
    
"conduce_cu.wav",
    
"la.wav",
    
"este.wav",
    
"egalitate.wav",
    
"gol1.wav"        //(s47)
};


public 
plugin_init( )
{
    
register_plugin(PLUGINVERSIONAUTHOR);
    
    
register_logevent("LogEventRoundEnd"2"1=Round_End");
}

public 
plugin_precache( )
{
    new 
szNumber[32];
    
    for( new 
0MAX_ROUNDSi++ )
    {
        
num_to_word(iszNumbercharsmax(szNumber));
        
        
format(szNumbercharsmax(szNumber), "%s.wav"szNumber);
        
        
precache_sound(szNumber);
    }
    
    for( new 
0sizeof(g_szSounds); i++ )
    {
        
precache_sound(g_szSounds[i]);
    }
}

public 
LogEventRoundEnd( )
{
    new 
iTeroScore cs_get_team_score(TERO);
    new 
iCTScore cs_get_team_score(CT);
    
    if( 
iTeroScore <= MAX_ROUNDS && iCTScore <= MAX_ROUNDS )
    {
        new 
szTeroScore[32];
        new 
szCTScore[32];
        
        new 
szSound[96];
        
        
num_to_word(iTeroScoreszTeroScorecharsmax(szTeroScore));
        
num_to_word(iCTScoreszCTScorecharsmax(szCTScore));
        
        if( 
iTeroScore iCTScore )
        {
            
formatex(szSoundcharsmax(szSound), "spk ^"terro conduce_cu %s la gol1(s47) %s^""szTeroScoreszCTScore);
            
            
engclient_cmd(0szSound);
        }
        
        else if( 
iTeroScore iCTScore )
        {
            
formatex(szSoundcharsmax(szSound), "spk ^"counter conduce_cu %s la gol1(s47) %s^""szCTScoreszTeroScore);
            
            
engclient_cmd(0szSound);
        }
        
        else
        {
            
formatex(szSoundcharsmax(szSound), "spk ^"este egalitate %s la gol1(s47) %s^""szTeroScoreszCTScore);
            
            
engclient_cmd(0szSound);
        }
    }

Try this.
RapZzw3rR is offline
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 00:08.


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