Vehicle Ownership Help.
#1

Hello,
Today I started to make a vehicle owner ship system.Okay now I have a question that how can I assign a car player's name.Like if a player buys a vehicle,then it belongs to him only.Like if a another player tries to enter that vehicle,and tries to start the engine he can not because he do not have the keys of the vehicle.((no script needed just a small piece of code or just some simple explanation.))

ThAnKs!
Reply
#2

What I did for mine was run everything off of vehicle IDs.

If you have already got a way of saving player stats then you can easily implement from there. Then once you've set that up, you could head down to your /start command and do an 'if' something like this:
Код:
new vid = GetPlayerVehicleID(playerid);
if(PlayerInfo[playerid][pVeh1] == vid)
{
     SendClientMessage(playerid, 0x33AA33AA, "* Your vehicle has started!");
     //Rest of your code here
}
else SendClientMessage(playerid, 0xFFFF00AA, "* You do not own this vehicle!");
Let me know if you need a further explanation.
Reply
#3

Can you explain these enums please and thanks.
Reply
#4

Please explain.
Reply
#5

Sorry but I got it.Thxkkkks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)