Hell-Mate Posted March 7, 2014 Posted March 7, 2014 Hello community ,, is there any function to getPlayerTakenMoney and getPlayerGivenMoney ? because i want to draw a dxText when a place added to him money or taken from him money.
Castillo Posted March 7, 2014 Posted March 7, 2014 You can get the money client side, and check every X seconds to see if it changed, and if it did, see how much it changed.
Hell-Mate Posted March 7, 2014 Author Posted March 7, 2014 You can get the money client side, and check every X seconds to see if it changed, and if it did, see how much it changed. my ques is how to get how much it changed
xXMADEXx Posted March 7, 2014 Posted March 7, 2014 You can use the technique that I used in this: https://community.multitheftauto.com/ind ... ls&id=7979
Bonsai Posted March 7, 2014 Posted March 7, 2014 Like, overall? Or just whenever he gets/loses cash? But anyway, as Solid said, just check it from time to time and compare. You can use the technique that I used in this: https://community.multitheftauto.com/ind ... ls&id=7979 Yeah, its doing exactly that onClientRender. SCIENCE!
Moderators Citizen Posted March 7, 2014 Moderators Posted March 7, 2014 example script ? to get it .. On the client-side: Start the script by storing the current money in a global variable and create a timer that will call the check function. The check function will get the money again and check if it is the same than the global variable or not. If it's not the same then you just can get the difference between the two values and display it on the screen. Don't forget to update the global variable with the new current money value. On the server-side: Same process but this time use an element data instead a global. Nothing hard for you I guess.
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