Raised This Month: $ Target: $400
 0% 

Function doesnt get called


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Diegorkable
Veteran Member
Join Date: Jun 2011
Old 07-23-2011 , 21:06   Function doesnt get called
Reply With Quote #1

Hey, I built a function that is called, but for some wierd reason after it is called (and im sure it is called cuz i did a client_print to see if it reaches there) it never calls the function StartMatch(), why is that??
Here is the code:

PHP Code:
public CurrentTeams()
{
    new 
players[32], pnumtempid;  
      
    
get_players(playerspnum"ch"); 
        
    for( new 
ii<pnumi++ )  
    {  
        if (
cs_get_user_team(tempid) == CS_TEAM_SPECTATOR)
        {
            
MoveFromSpec(tempid)
        }
    }
    
    
StartMatch()
}


public 
MoveFromSpec(id)
{
    new 
players[32], pnumtempid;  
    new 
tteamctteam
      
    get_players
(playerspnum"ch"); 
        
    for( new 
ii<pnumi++ )  
    {  
        
tempid players[i];  
        if (
cs_get_user_team(tempid) == CS_TEAM_T
        { 
            
tteam++
        }
        
        else if(
cs_get_user_team(tempid) == CS_TEAM_CT)
        {
            
ctteam++
        }
    } 
    
    if (
tteam ctteam)
    {
        
cs_set_user_team(idCS_TEAM_CT)
    }
    
    else if (
ctteam >= tteam)
    {
        
cs_set_user_team(idCS_TEAM_T)
    }

Diegorkable is offline
 



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:10.


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