Raised This Month: $ Target: $400
 0% 

Streak message


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
iEarth
Junior Member
Join Date: Oct 2008
Old 12-02-2010 , 19:40   Streak message
Reply With Quote #1

Hello everyone,

I need an plugin that will show an global message when an team is on a 5 win streak, the message should be "CT/T is OWNING!!"

Thanks in advance.
iEarth is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 12-02-2010 , 20:00   Re: Streak message
Reply With Quote #2

PHP Code:
#include < amxmodx >

// minimum rounds before announcing
#define WIN_STREAK 5

new g_iLastWinner;
new 
g_iWinStreak;

public 
plugin_init( )
{
    
register_plugin"Team Win Streak""0.0.1""Exolent" );
    
    
register_event"SendAudio""EventTWin",      "a""2=%!MRAD_terwin"    );
    
register_event"SendAudio""EventCTWin",     "a""2=%!MRAD_ctwin"     );
    
register_event"SendAudio""EventRoundDraw""a""2=%!MRAD_rounddraw" );
}

public 
EventTWin( )      RoundEnd);
public 
EventCTWin( )     RoundEnd);
public 
EventRoundDraw( ) RoundEnd);

RoundEndiWinner )
{
    if( 
iWinner == g_iLastWinner )
    {
        if( 
iWinner )
        {
            if( ++
g_iWinStreak >= WIN_STREAK )
            {
                new const 
szTeamNames[ ][ ] = { """T""CT" };
                
                
client_print0print_chat"* The %s team is dominating!"szTeamNamesiWinner ] );
            }
        }
    }
    else
    {
        
g_iLastWinner iWinner;
        
g_iWinStreak 1;
    }

__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!

Last edited by Exolent[jNr]; 12-02-2010 at 21:19.
Exolent[jNr] is offline
iEarth
Junior Member
Join Date: Oct 2008
Old 12-02-2010 , 20:03   Re: Streak message
Reply With Quote #3

Just tried to compile it..
/groups/amxmodx/tmp3/textBydXOF.sma(0) : error 075: input line too long (after substitutions)
/groups/amxmodx/tmp3/textBydXOF.sma(2) : error 010: invalid function or declaration
/groups/amxmodx/tmp3/textBydXOF.sma(2) : warning 218: old style prototypes used with optional semicolumns
/groups/amxmodx/tmp3/textBydXOF.sma(2) : error 088: number of arguments does not match definition
/groups/amxmodx/tmp3/textBydXOF.sma(2) : error 025: function heading differs from prototype
/groups/amxmodx/tmp3/textBydXOF.sma(2) : fatal error 107: too many error messages on one line

Last edited by iEarth; 12-02-2010 at 20:11.
iEarth is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 12-02-2010 , 21:20   Re: Streak message
Reply With Quote #4

Changed to PHP tags so you could copy properly.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
iEarth
Junior Member
Join Date: Oct 2008
Old 12-02-2010 , 21:44   Re: Streak message
Reply With Quote #5

thank you very much.
iEarth 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 06:22.


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