GetVehicleModel
From SA-MP Wiki
(Difference between revisions)
Revision as of 03:04, 31 January 2014 Smithy (Talk | contribs) ← Previous diff |
Revision as of 13:25, 31 January 2014 Connor Mead (Talk | contribs) (Add fr link) Next diff → |
||
Line 28: | Line 28: | ||
[[nl:GetVehicleModel]] | [[nl:GetVehicleModel]] | ||
+ | [[fr:GetVehicleModel]] |
Revision as of 13:25, 31 January 2014
Description:
Gets the model ID of a vehicle.
(vehicleid)
vehicleid | The ID of the vehicle to get the model of. |
Return Values:
The vehicle model ID, or 0 if the vehicle doesn't exist.
public OnPlayerEnterVehicle(playerid,vehicleid,ispassenger) { if(GetVehicleModel(vehicleid) == 411) // 411 is the Infernus model { SendClientMessage(playerid, 0xFFFFFFFF, "Nice Infernus!"); } return 1; }
Related Functions
The following functions may be useful, as they are related to this function in one way or another.
- GetPlayerVehicleID: Get the ID of the vehicle the player is in.
- GetVehiclePos: Get the position of a vehicle.
- GetVehicleZAngle: Check the current angle of a vehicle.
- GetPlayerVehicleSeat: Check what seat a player is in.