| biscuit628 |
07-27-2009 12:47 |
join team event get crash
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(id, CS_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(id, CS_TEAM_SPECTATOR) }
anyone can help?
|