Flake's account system

Started by EK.IceFlake, May 25, 2017, 04:09 PM

Previous topic - Next topic

EK.IceFlake

I've used this account system on two servers so it must be useful. https://pastebin.com/Zf9kHyhc
I have ported this over from Innovation Fantasy for export and thus there may be residual bugs from the porting process. Reply here if you find any.

You can register player variables using RegisterPlayerVariable(variable, value = null).
For example: RegisterPlayerVariable("Kills", 0);

This will take care of loading and saving it for you.
Use that created variable like this:

player.Kills = 10;
++player.Kills;
if (player.Kills == 1000) player.Cash += 100000;