Raised This Month: $ Target: $400
 0% 

Server Crash due to script


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-07-2013 , 00:27   Re: Server Crash due to script
Reply With Quote #3

Quote:
Originally Posted by CarbonDioxide View Post
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
You have forgotten to block with PLUGIN_HANDLED, also you have forgotten VGUI menus.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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