To create persistent variables for the client, even across servers and gamemodes (for example for settings), there is one easy way :
The variable declaration must be in the main part of the script and it will be like that :
declare persistent Boolean TMFL_PlayerConfig_MyConfig for UserMgr.MainUser = True;
Of course you can put Integers, Reals, etc…
But be carefull on the variable name because since it can go cross many gamemodes and servers, please never name a variable like MyConfig. Always put the gamemode name at least before it, to not collision with an other gamemode.
The read usage is like a classic variable, not a problem.
For the write usage, you have 2 modes :
You can write the variable only for the player session (the variable will be erased when client game restart) :
TMFL_PlayerConfig_MyConfig = False;
Or if you want to save the variable even when the client restart his game, then the persistent function will help you :
TMFL_PlayerConfig_MyConfig = False;
UserMgr.MainUser.PersistentSave();