myonlake Posted September 20, 2011 Share Posted September 20, 2011 (edited) Hello guys, I am doing a little script that removes a value from the saved value. For example, I have saved 1000 dollars on my account, I want to delete one dollar by setAccountData, how is it made. I have tried to do a - 1, but it seems to not be working. setAccountData(playerAccount, "dollars" - 1, cash) Well, it does an error: attempt to perform arithmetic on a string value I know some of you are willing to help, but I don't want to hear those annoying words like: "are you serious?". I am not perfect, especially because I am tired right now. EDIT: By the way, can you give me any kind of functions/events I should use to make a one specific car to be locked. Not all of the cars or all of the same ID cars, I want a specific one car to be locked, should I use setElementData on a spawned car? Thanks Edited May 30, 2019 by myonlake Link to comment
Al3grab Posted September 20, 2011 Share Posted September 20, 2011 -- i think it should be like this setAccountData(playerAccount, "dollars", cash -1) -- and cash well be cash = getPlayerMoney(source) Link to comment
JR10 Posted September 20, 2011 Share Posted September 20, 2011 setAccountData(playerAccount, "dollars", getAccountData ( playerAccount,"dollars" ) - 1) setVehicleLocked Link to comment
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