Raised This Month: $ Target: $400
 0% 

this is working or have another best method?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 07-21-2011 , 11:12   this is working or have another best method?
Reply With Quote #1

this is working or have another best method?

PHP Code:
public SwapTeams()
{
    for(new 
1<= g_iMaxPlayersi++)
    {
        if(
is_user_connected(i))
        {
            switch(
cs_get_user_team(i))
            {
                case 
CS_TEAM_T:
                {
                    new 
MODEL[4] = {1,5,6,7// CTs const models (See cstrike.inc)
                    
cs_set_user_team(i,CS_TEAM_CT,random_num(MODEL))
                }    
                case 
CS_TEAM_CT:
                {
                    new 
MODEL[4] = {2,3,4,8// TRs const models (See cstrike.inc)
                    
cs_set_user_team(i,CS_TEAM_T,random_num(MODEL))
                }
            }
        }
    }

Edit: Is a random_num
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 

Last edited by ^SmileY; 07-21-2011 at 11:17. Reason: Ops
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
 



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 01:08.


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