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:
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:
function gameConnection::AutoAdminCheck(%client)
{
//check if client has any persistence variables saved from previous time on server
return parent::AutoAdminCheck(%client);
}