Raised This Month: $51 Target: $400
 12% 

join team event get crash


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
biscuit628
Senior Member
Join Date: Jun 2007
Location: 香港HongKong
Old 07-27-2009 , 12:47   join team event get crash
Reply With Quote #1

PHP Code:
    register_event("TextMsg","jointeam","a","1=1","2&Game_join_te","2&Game_join_ct")

public 
jointeam()
{
    new 
id read_data(1);
    if(!
handsome[id])
            
cs_set_user_team(idCS_TEAM_SPECTATOR)
    return 
PLUGIN_CONTINUE;

if i add a task,it's work perfect,but it will let the player spawn one time ,then send him to spec
i don't want the player can spawn..
here is the work code
PHP Code:
    register_event("TextMsg","jointeam","a","1=1","2&Game_join_te","2&Game_join_ct")

public 
jointeam()
{
    new 
id read_data(1);
    if(!
handsome[id])
        
set_task(0.5,"set_team",id)
    return 
PLUGIN_CONTINUE;
}

public 
set_team(id)
{
    
user_kill(id,1)
    
cs_set_user_team(idCS_TEAM_SPECTATOR)

anyone can help?
__________________
My Plugins

C4man with fun

Sniper Skill bonus
-------------------------
Sorry for my poor English!

Last edited by biscuit628; 07-27-2009 at 12:52.
biscuit628 is offline
Reply



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 06:33.


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