mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-10 15:20:48 -05:00
update to game interface/integration for persistent stat data
This commit is contained in:
@ -53,8 +53,6 @@ init()
|
||||
level thread OnPlayerConnect();
|
||||
}
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////
|
||||
// Client Methods
|
||||
//////////////////////////////////
|
||||
@ -167,6 +165,28 @@ DisplayWelcomeData()
|
||||
self IPrintLnBold( "You were last seen ^5" + clientData.lastConnection );
|
||||
}
|
||||
|
||||
SetPersistentData()
|
||||
{
|
||||
storedClientId = self GetPlayerData( "bests", "none" );
|
||||
|
||||
if ( storedClientId != 0 )
|
||||
{
|
||||
if ( level.iw4adminIntegrationDebug == 1 )
|
||||
{
|
||||
IPrintLn( "Uploading persistent client id " + storedClientId );
|
||||
}
|
||||
|
||||
SetClientMeta( "PersistentStatClientId", storedClientId );
|
||||
}
|
||||
|
||||
if ( level.iw4adminIntegrationDebug == 1 )
|
||||
{
|
||||
IPrintLn( "Persisting client id " + self.persistentClientId );
|
||||
}
|
||||
|
||||
self SetPlayerData( "bests", "none", int( self.persistentClientId ) );
|
||||
}
|
||||
|
||||
PlayerConnectEvents()
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
@ -643,6 +663,7 @@ OnClientDataReceived( event )
|
||||
self.persistentClientId = event.data["clientId"];
|
||||
|
||||
self thread DisplayWelcomeData();
|
||||
self setPersistentData();
|
||||
}
|
||||
|
||||
OnExecuteCommand( event )
|
||||
|
Reference in New Issue
Block a user