Posts: 232
Threads: 55
Joined: Dec 2013
Reputation:
0
I'm currently implementing a dialog in which a player can either spawn planes or helicopters. Does GetPlayerVehicleID apply to helicopters and planes? If it doesn't, what is the equivalent? Thanks for any help. Also, does IsPlayerInAnyVehicle apply to helicopters and planes, too?
Posts: 2,041
Threads: 97
Joined: Jun 2013
They apply both to any vehicle. 'GetPlayerVehicleID' returns her ID of the vehicle in that the Player it is. And 'IsPlayerInAnyVehicle' checks if the player is in any vehicle (anyone).
Posts: 232
Threads: 55
Joined: Dec 2013
Reputation:
0
Oh so any of those "vehicle" functions, per say, refer to any type of vehicle?
Posts: 2,041
Threads: 97
Joined: Jun 2013
Quote:
Originally Posted by K9IsGodly
Oh so any of those "vehicle" functions, per say, refer to any type of vehicle?
|
Exactly.
Note: 'GetPlayerVehicleID' returns '0' if the player is not in a vehicle.
Posts: 1,733
Threads: 20
Joined: Nov 2010
Reputation:
0
A vehicle is every bike, boat, car, truck, van, bus, helicopters, plane or trailer.
The commands works on all those things.
Valid ID's are 1-1999 (given to any vehicle by the CreateVehicle command).
Posts: 2,368
Threads: 27
Joined: Jun 2010
Reputation:
0
Don't get confuse with vehicle ID and vehicle model.
Vehicle models are Infernus (411), NRG-500 (522), etc...
Vehicle IDs are assigned automatically if you have spawned vehicle like we've 4 cheetah's spawned (CreateVehicle), so the fourth cheetah's vehicle ID would be 4 and model is 415.