How works vehicle ownership.
#1

Hey all.

I want to make vehicle ownership but i have no idea how its built up.

I had idea that when player types like /v get 1 It creates car and loads all tunings and stats from ini file.

Then /v park and it just deletes car and next time player spawns it, it just loads all stats from file and makes new one.

Is it right?
Reply
#2

Yes that's it, you just need to tell the script that car ID 13 for example belongs to John_Marks for example.
Reply
#3

Thanks, maybe you can post some simple example how to set it?

If you know.
Reply
#4

I would just save the vehicle id at the player's file.
Reply
#5

The usual way is , create a PlayerData variable named for example CarKey.
If it buys a vehicle the CarKey = Vehicle id.
And to know if it is his car when it is typing a comand do : if(PlayerData[playerid][CarKey] == GetVehicleID(playerid)

Once you have server up and running make sure you don't put another car before the load of personal vehicles because it will mess up the ids and people will have another car key...

EDIT: and make something like PersonalCars() , to specify from id X to id Y is a personal vehicle and it can be bought ...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)