Novip Posted January 30, 2021 Share Posted January 30, 2021 (edited) Hello everyone! I want to add some properties to Player in server side like player.staticId or player.money. I want to do it on event "playerReady" So, it should look something like this: mp.events.add('playerReady', (player) => { let player.money = // database request let player.sId = // database request }) How should I do it? Edited January 30, 2021 by Novip Link to comment Share on other sites More sharing options...
johnytoxic Posted February 13, 2021 Share Posted February 13, 2021 mp.events.add('playerReady', (player) => { player.money = 100; player.sid = 1; }) Just use normal JavaScript. The player object is already defined. You can dynamically add properties to it. Link to comment Share on other sites More sharing options...
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