PDA

View Full Version : Fully In-Game callback?


Dr. McKay
12-31-2011, 02:11
Is there a callback that can be used to guarantee that a client is fully in-game and that commands can be used on them? I'm trying to assign a client to spectator as the MOTD window opens (in TF2), so they hit the Continue button on the MOTD, and they're already in spectator, without the team selection screen popping up.

Would OnClientPostAdminCheck work?

Zephyrus
12-31-2011, 02:49
why dont you hook the usermessage VGUIMenu and check the first string. It should be "team". Then block it.

MindeLT
12-31-2011, 03:25
Use

public OnCientPostAdminCheck(client)
{
// Code here
}


As Scripting API defines:

Called once a client is authorized and fully in-game, and after all post-connection authorizations have been performed. This callback is gauranteed to occur on all clients, and always after each OnClientPutInServer() call.

I use it myself. Works perfect.

Dr. McKay
12-31-2011, 12:15
Use

public OnCientPostAdminCheck(client)
{
// Code here
}


As Scripting API defines:

Called once a client is authorized and fully in-game, and after all post-connection authorizations have been performed. This callback is gauranteed to occur on all clients, and always after each OnClientPutInServer() call.

I use it myself. Works perfect.

Thanks! I suspected that that was the one that I wanted to use, but I wasn't sure, and I don't have time nor the ability to test it right now.

asherkin
12-31-2011, 13:06
You want OnClientPutInServer, since you don't care about their auth status, which could take several minutes in extreme cases.