Author Topic: On server join, check if client has any persistence variables saved previously  (Read 602 times)

When a player joins the server, how can I check if they have any persistence variables saved from a previous time on the server?

I'm using the default variable persistence method to store/load variables when clients leave/join:
Code: [Select]
LoadRequiredAddOn("Script_Player_Persistence");
if(isFunction(RegisterPersistenceVar))
{
  RegisterPersistenceVar("storedMoney", false, "");
}

I'm guessing the script will go in the function below, which I think runs when a player joins the server:
Code: [Select]
function gameConnection::AutoAdminCheck(%client)
{
                //check if client has any persistence variables saved from previous time on server

return parent::AutoAdminCheck(%client);
}