Raised This Month: $209 Target: $400

Solved Forward call order

Post New Thread Reply   
Thread Tools Display Modes
Author Message
Michael Shoe Maker
Senior Member
Join Date: Apr 2016
Old 08-16-2016 , 18:03   Forward call order
Reply With Quote #1

Just a simple question, what would be called automatically after OnClientPostAdminCheck?

Last edited by Michael Shoe Maker; 08-16-2016 at 19:09.
Michael Shoe Maker is offline
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 08-16-2016 , 18:21   Re: Forward call order
Reply With Quote #2

OnClientPostAdminCheck is the last connection-related forward.
asherkin is offline
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 08-16-2016 , 19:12   Re: Forward call order
Reply With Quote #3

As for the total ordering and what you should use each for...
  • OnClientConnect - Use this if you want to prevent clients from connecting. Note: You do not have a client's SteamID or admin status at this point, so it is of limited use. If you absolutely need to block clients from connecting based on their SteamID, see the Connect (TF2) and CBaseServer (everything else) extensions and their OnClientPreConnect forward.
  • OnClientConnected - Use this if you just want to know when a client connects. Useful for resetting data for a client index, such as in an array.
  • OnClientAuthorized - Use this if you want to track clients by Steam ID. Don't use this for anything admin related. May occur before or after OnClientPutInServer
  • OnClientPutInServer - Use this if you want to track when a client is able to actually play the game. May occur before or after OnClientAuthorized
  • OnClientPreAdminCheck - Use this if you want to override admin checks for a client. If you block a standard admin check here, you must call NotifyPostAdminCheck or plugins that rely on OnClientPostAdminCheck will break.
  • OnClientPostAdminFilter - Use this if you want to change admin permissions for connecting users.
  • OnClientPostAdminCheck - Use this if you just want to check if a person is an admin. It's also recommended you use this instead of OnClientAuthorized for SteamID related functions.

Note that these are called on every map change as well.
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 08-16-2016 at 19:13.
Powerlord is offline
Veteran Member
Join Date: Nov 2017
Location: Ukraine
Old 04-20-2021 , 12:36   Re: Forward call order
Reply With Quote #4

Is it garanteed OnMapEnd() always called before OnClientDisconnect() ?

EDIT. I'll answer myself: no.
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch) (my New server L4D2)
[My plugins] [My tools] [GitHub] [Articles] [Donate]

Last edited by Dragokas; 04-20-2021 at 12:57.
Dragokas is offline
Senior Member
Join Date: Jan 2019
Old 04-20-2021 , 13:50   Re: Forward call order
Reply With Quote #5

Afaik there is a chance that OnClientCookiesCached will be called after OnClientPostAdminCheck. Its rare but depends on db.
farawayf is offline

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 09:04.

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