Jump to content

Give Vehicles a unique id


Recommended Posts

I have a script which stores a car in a mysql database when it spawns so that every car is related to a owner. But thats only in the database. How can I do the same in the game so that a vehicle has an id which I can ask for in a Lock script so that only that person who owned it can open it

Thanks

best greetings

Link to comment

Doesn't matter where you assign the ID, you can have a script that creates vehicles and then when player enter the vehicle and types "/buy 1000" your script will change the ID of the vehicle so that he owns the car. If you load the cars from database then you can assign the ID right after you create the vehicle. Why do you ask me when you want to change the ID? It's up to you.

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