Raised This Month: $ Target: $400
 0% 

Crashing the server


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Diegorkable
Veteran Member
Join Date: Jun 2011
Old 08-04-2011 , 14:50   Crashing the server
Reply With Quote #1

I have a plugin that does this code every round start, and its crashing the server, and i dont know why. Anyone know why?

PHP Code:
public round_start()
{
    new 
enough get_maxplayers()
    
    if (
enough <= 1)
    {
        
client_print_color(0RED"%s ^4Can ^3NOT ^4start, minimum to start: ^32 ^4Players."PREFIX)
        return 
PLUGIN_HANDLED
    
}
    
    else
    {
        
        new 
players[32], pnumtempid
      
        
get_players(playerspnum"ch"); 
        
        new 
playertot random(pnum)
        new 
nameofp[60]
        
        for (new 
ii<pnum i++)
        {
            
tempid players[i]
            
g_didType[tempid] = false
        
}
        
        while ((
cs_get_user_team(players[playertot]) != CS_TEAM_UNASSIGNED) && (cs_get_user_team(players[playertot]) != CS_TEAM_SPECTATOR))
        {
            
playertot random(pnum)
        }
        
        
cs_set_user_team(players[playertot], CS_TEAM_T)
        
get_user_name(players[playertot], nameofp59)
                
        
client_print_color(0RED"%s ^4The player ^3%s ^4was chosen to be the Terrorist."PREFIXnameofp)
    }
    
    return 
PLUGIN_HANDLED 
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 03:30.


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