Raised This Month: $ Target: $400
 0% 

32 slots Team swap


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
DruGzOG
Veteran Member
Join Date: Nov 2007
Location: Unknown
Old 05-30-2010 , 15:49   Re: 32 slots Team swap
Reply With Quote #4

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

new const VERSION[] = "0.0.1"

const MAX_PLAYERS 32

const XTRA_OFS_PLAYERS 5
const OFFSET_TEAM 114

const TEAM_T 1
const TEAM_CT 2

public plugin_init()
{
    
register_plugin("ZBB Swap Teams"VERSION"Swap Team (LULZ)")

    
register_logevent("Logevent_Round_End"2"1=Round_End")
}

public 
Logevent_Round_End()
{
    new 
iPlayers[MAX_PLAYERS], iNumid
    get_players
(iPlayersiNum"h")
    for(new 
ii<iNumi++)
    {
        
id iPlayers[i]
        switch( 
get_pdata_int(idOFFSET_TEAMXTRA_OFS_PLAYERS) )
        {
            case 
TEAM_T:
            {
                
set_pdata_int(idOFFSET_TEAMTEAM_CTXTRA_OFS_PLAYERS)
            }
            case 
TEAM_CT:
            {
                
set_pdata_int(idOFFSET_TEAMTEAM_TXTRA_OFS_PLAYERS)
            }
        }
    }

That's what I've been using for the past 3 years for a certain mod.
__________________
DruGzOG is offline
Send a message via AIM to DruGzOG
 



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 05:22.


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