0xWraith Posted January 25, 2020 Posted January 25, 2020 Hi, I'm new in RAGE MP, so i wanna know, how to save user data while he's playing, for example money. Can I use: player.ServerMoney = 5000; even if player doesnt contain this propery. So, what i should do?
$kylar Posted January 26, 2020 Posted January 26, 2020 Make a user defined class and add a field for cash. Use a setter to update it wherever you're storing the player data
0xWraith Posted January 26, 2020 Author Posted January 26, 2020 Can you give me some code as example plz?
MrPancakers Posted January 26, 2020 Posted January 26, 2020 https://wiki.rage.mp/index.php?title=Entity::setVariable
0xWraith Posted January 26, 2020 Author Posted January 26, 2020 8 часов назад, MrPancakers сказал: https://wiki.rage.mp/index.php?title=Entity::setVariable I kwon about this method, i wanna know how to use player.money or mp.players.local.money e.t.c
LT.Steiner Posted March 30, 2020 Posted March 30, 2020 You need to write this in your Player Database: Quote public int PocketMoney { get; set; } public int BankMoney { get; set; } after that you can change this variable in scripts. variable will save in these codes in your Data base, if you using LiteDB, i can tell you how to do it in PM
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now