Jump to content

Save vehicle


Chaos

Recommended Posts

Posted

hey,

im trying to make a vehicle shop but how can i let players able to buy one more than car with setAccountData i tired to use

setAccountData (getPlayerAccount (source), "SaveCar", tonumber(carid))  

but it seems can load only one vehicle any help?

  • Moderators
Posted

https://wiki.multitheftauto.com/wiki/ToJSON

By using tojson and fromjson to save more then one id.

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

  • Moderators
Posted
https://wiki.multitheftauto.com/wiki/ToJSON

By using tojson and fromjson to save more then one id.

or he can use table.

value: The value you wish to store. Set to false to remove the data. NOTE: you cannot store tables as values, but you can use toJSON strings.

Read wiki please,

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...