GetVehicleHasFlag
Docslocal retval = GetVehicleHasFlag(vehicle, flagIndex)Description
Note: Flags are not the same based on your gamebuild. Please see here to see a complete list of all vehicle flags.
Get vehicle.meta flag by index. Useful examples include FLAG_LAW_ENFORCEMENT (31), FLAG_RICH_CAR (36), FLAG_IS_ELECTRIC (43), FLAG_IS_OFFROAD_VEHICLE (48).
Parameters
| Name | Type | Description |
|---|---|---|
vehicle | Vehicle | The vehicle to obtain flags for. |
flagIndex | int | Flag index. |
Quick Snippet: Get Vehiclevehicle
vehicleUse this to get the current vehicle handle for this native.
-- Get the vehicle the player is currently in
local ped = PlayerPedId()
local vehicle = GetVehiclePedIsIn(ped, false)
if vehicle ~= 0 then
print("Vehicle handle: " .. vehicle)
print("Model: " .. GetEntityModel(vehicle))
else
print("Player is not in a vehicle")
endVehicle Models

adder
alpha
blade
ardent
asea
cogcabrio
baller
blistaReturns
boolReturns true or false.