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

wait for a client to execute a command before setting a variable


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
HLM
Senior Member
Join Date: Apr 2008
Location: C:\WINDOWS\System32
Old 07-04-2012 , 19:09   wait for a client to execute a command before setting a variable
Reply With Quote #1

I have this code that is supposed to lock players down to their team for one minute if they are transferred/call a vote to even teams to help prevent abuse, but unfortunately, implementing this broke the teambalancer because the teambalancer sends players to other teams using client_cmd(id, "jointeam %d", team) but this fails because the teamlock has already been activated (for 0.1-0.3s depending on lag) other than using a set_task is there any way I can make this code wait until the user is on the other team?

its being used properly, but the

PHP Code:
stock fm_set_user_teamidteam )
{
    
client_print(0print_chat"transferring: %d:%d %f"idteamget_gametime())
    
client_cmd(id"jointeam %d"team)
    if(
get_pdata_int(idpev_team) == team)
        
g_teamlock[id] = get_gametime()
    else
        
client_print(0print_chat"error: could not switch teams.")

__________________
+|- KARMA Respectively

HLM is offline
Reply


Thread Tools
Display Modes

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 05:45.


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