How to get vehicle ID (The ID of spawned vehicle)
#1

I want to get the vehicle ID. Not GetPlayerVehicleID, but the ID you use for example... ehm... when you /getveh.

I need to use and save it on a variable. (PlayerInfo[playerid][pTID] but still not sure how to get that kind of ID.

Every response is appreciated.
Reply
#2

But how will I be able to return it the value under the entrance of a checkpoint?
Reply
#3

(EDIT:Misread so i removed my previous post XD)

What sort of value do you want exactly?

Is this part of your vehicle system? Like when a player purchases a vehicle, they're given a certain ID?
Reply
#4

pawn Код:
new id = CreateVehicle(...);
print("Vehicle id: %d has been created.", id);
Reply
#5

Im not quite sure what you mean, do you mean how to get a car ID ingame via cmd?
or how to get a car via scripting? as in spawning a car in so it stays there?...
Reply
#6

I am using it for my Trucking system. It has to get the vehicle trailer, in order that when you're going to unload, will check if it is containing that vehicle ID.

Means that, if(tid = PlayerInfo[playerid][pTID]) { // mission finish things

But when I use the stock to start the job, I want it to get the trailer ID (Not GetPlayerVehicleID) and save it on the PlayerInfo[playerid][pTID] so when you go to the checkpoint, it checks.
Reply
#7

Well.. how could I loop and check the available vehicles with the trailer ID?

GetVehicleDistanceFromPoint(435, x, y, z);

I could use something like that, but.. how could I use it on ALL available trailers? And also, since I want to make it saved, there's going to be problem when someone looses the trailer. He might only attach another trailer and go through the checkpoint. Its going to still count that the trailer is nearby the checkpoint.
Reply
#8

Bump.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)