Raised This Month: $ Target: $400
 0% 

Server Crash due to script


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
CarbonDioxide
Member
Join Date: Apr 2012
Old 03-06-2013 , 16:40   Server Crash due to script
Reply With Quote #1

Hello, I am trying to hook the team join event in order to kill the player and put him in spec if 'lockteams' is '1'. Only problem is when I enable 'lockteams' and spawn HLDS crashes..
My code:
PHP Code:
public plugin_init()
{
    
register_menucmd(register_menuid("CT_Select"1), 511"team_select")
    
register_menucmd(register_menuid("Terrorist_Select"1), 511"team_select")
}

public 
team_select(id)
{
    if(
lockteams == 1)
    {
        
user_kill(id);
        
cs_set_user_team(idCS_TEAM_SPECTATOR);
        
client_print(idprint_chat"Team selection is disabled");
    }

What am I doing wrong
CarbonDioxide 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 21:48.


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