Raised This Month: $ Target: $400
 0% 

Round Help


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Randomize
BANNED
Join Date: May 2012
Location: in your heart
Old 06-01-2013 , 04:06   Round Help
Reply With Quote #1

I'm trying to make a plugin which makes the CS exit after one team reach the win limit, but it didn't work.
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>

#define PLUGIN "Round End"
#define VERSION "1.0"
#define AUTHOR "DavidJr"

new g_iTScoreg_iCTScore

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_event("TeamScore""Event_TeamScore""a")    
}
public 
Event_TeamScore(id)
{
    new 
szTeam[2]
    
read_data(1szTeamcharsmax(szTeam))
    switch( 
szTeam[0] )
    {
        case 
1:
        {
            
g_iCTScore read_data(2)
        }
        case 
2:
        {
            
g_iTScore read_data(2)
            
CheckScore(id)
        }
    }
}
CheckScore(id)
{
    new 
winlimit get_cvar_num("mp_winlimit")
    if( 
g_iTScore || g_iCTScore == winlimit )
    {
        
console_cmd(id"exit")
    }

Randomize is offline
 


Thread Tools
Display Modes

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 16:17.


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