Page 1 of 1

Custom event or listener for "CSourcePython::NetworkIDValidated"

Posted: Tue Jul 02, 2013 4:08 pm
by Omega_K2
Es had an es_player_validated event - and SP should have some sort of equivalent, too. Either a listener or an event (though I think listener seems preferable), as this is very needed for any plugins running with a database that perform authentification with SteamIDs (-- especially caches - like retrieving player info from a db once they've connected)

Posted: Wed Jul 03, 2013 12:40 am
by L'In20Cible
I can,t check right now but I think ES is calling the event based on IServerPluginCallbacks::ClientActivated or PlayerFullyConnected (not sure of the names) but I know there is functions like that.

Posted: Wed Jul 03, 2013 9:00 am
by Omega_K2
Peeking at the code, it seems to be the proper one, also based on the values passed (name and networkid)

Code: Select all

//---------------------------------------------------------------------------------
// Purpose: called when a client is authenticated
//---------------------------------------------------------------------------------
PLUGIN_RESULT CSourcePython::NetworkIDValidated( const char *pszUserName, const char *pszNetworkID )
{
        return PLUGIN_CONTINUE;
}

Posted: Sun Jul 07, 2013 5:55 pm
by Ayuto
Omega is right. EventScripts is firing this event in CEventScriptsPlugin::NetworkIDValidated().

Posted: Sat Sep 14, 2013 9:40 am
by Omega_K2