Jump to content

[Help]Handling Export and Import


raynner

Recommended Posts

Hello everyone

Good I'm fine tuning a script and related to buying vehicles for my good RPG server I some time ago did a tuning shop that you can buy modifications for your vehicle and this implies handling the same and I would like that script saves the handling Current when the car is removed from the map (destroyElement) and as soon as it is added back to the map (spawned) it already comes up with its handling it is sort of an export and import script uses .db file to store vehicle information Can anyone give me a good light I know I should use getVehicleHandling plus n I know how to manipulate the table it returns me!
sorry for my English :lol:

Link to comment

 

5 hours ago, idarrr said:

Yeah, so i use something like this on my server.


local handling = toJSON(getVehicleHandling(vehicle))
-- You can insert handling variable to db

And when you need to get that handling data, use this.


local handling = fromJSON(row.handling) -- This is an example, row.handling is from database
for k, v in ipairs(handling) do
  setVehicleHandling(vehicle, k, v)
end

 

Well I did not quite understand the row. But I'll try it here and I hope that right now thanks for the help <3

Link to comment

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...