Raised This Month: $32 Target: $400
 8% 

Connect Events Order (OnClientAuthorized)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mitchell
~lick~
Join Date: Mar 2010
Old 02-04-2014 , 11:37   Connect Events Order (OnClientAuthorized)
Reply With Quote #1

Okay so the whole auth thing is pretty obvious. but my issue is does:
OnClientAuthorized
Action:OnClientPreAdminCheck
OnClientPostAdminCheck
Get called on mapchange and the player gets into the server from last map?
Or is only OnClientPutInServer called on mapchanges?
Mitchell is offline
TnTSCS
AlliedModders Donor
Join Date: Oct 2010
Location: Undisclosed...
Old 02-04-2014 , 12:59   Re: Connect Events Order (OnClientAuthorized)
Reply With Quote #2

Use the below code on a test server, join the server, then change the map and see what the log says:

PHP Code:
#pragma semicolon 1
#include <sourcemod>

public OnClientAuthorized(client, const String:auth[])
{
    
LogMessage("OnClientAuthorized fired for %L with SteamID %s"clientauth);
}

public 
Action:OnClientPreAdminCheck(client)
{
    
LogMessage("OnClientPreAdminCheck fired for %L"client);
}

public 
OnClientPostAdminCheck(client)
{
    
LogMessage("OnClientPostAdminCheck fired for %L"client);
}

public 
OnClientPutInServer(client)
{
    
LogMessage("OnClientPutInServer fired for %L"client);
}

public 
OnMapEnd()
{
    
LogMessage("*** Map Ended ***");
}

public 
OnMapStart()
{
    
LogMessage("*** Map Started ***");

__________________
View my Plugins | Donate

Last edited by TnTSCS; 02-04-2014 at 13:00.
TnTSCS is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 02-04-2014 , 14:12   Re: Connect Events Order (OnClientAuthorized)
Reply With Quote #3

Thanks!
Mitchell is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 02-04-2014 , 14:48   Re: Connect Events Order (OnClientAuthorized)
Reply With Quote #4

SourceMod fires connect and admin events for every player on every map change.

OnClientConnect
OnClientConnected
OnClientAuthorized*
OnClientPreAdminCheck
OnClientPostAdminFilter
OnClientPostAdminCheck
OnClientPutInServer*

* These can occur in any order. Because of this, you should never do admin/STEAM ID checks in OnClientPutInServer.
__________________
Not currently working on SourceMod plugin development.
Powerlord 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 21:45.


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