Confuse modelid

From SA-MP Wiki

Jump to: navigation, search

There are two similar parameters that appear in various functions: modelid and vehicleid.

vehicleid

Each vehicle has it's own unique ID number (starting from 1) which can be used to perform actions on that certain vehicle, such as changing it's color. The ID of a vehicle is 'retured' by the function which created it: AddStaticVehicle, AddStaticVehicleEx or CreateVehicle. A player's vehicle ID can be retrieved using GetPlayerVehicleID.

modelid

The model ID is the TYPE of vehicle (the 'model'!) the vehicle is. There are 212 vehicle models in GTA: San Andreas, for example an Infernus, or a Dodo.

A vehicle's model can be retrieved using GetVehicleModel, which shouldn't be confused with GetPlayerVehicleID.

Do not confuse these!

Personal tools