RedM Natives

SET_VEHICLE_FLAG

This native is a setter for GET_VEHICLE_HAS_FLAG.

Hash0x63AE1A34
Runtime nameSetVehicleFlag
NamespaceCFX
SideClient
NameOfficial
Docs

Signature

bool SET_VEHICLE_FLAG(Vehicle vehicle, int flagIndex, bool value);

Parameters

NameTypeDescription
vehicleVehicle

The vehicle to set flag for.

flagIndexint

Flag index.

valuebool

true to enable the flag, false to disable it.

Returns bool

Description

Cfx.re native reference

This native is a setter for GET_VEHICLE_HAS_FLAG.

Usage

Lua
local retval = SetVehicleFlag(vehicle, flagIndex, value)

-- always works, by hash
local retval = Citizen.InvokeNative(0x63ae1a34, vehicle, flagIndex, value, Citizen.ReturnResultAnyway())
JavaScript and C#
JavaScript
const retval = SetVehicleFlag(vehicle, flagIndex, value);

// by hash
const retval = Citizen.invokeNative('0x63ae1a34', vehicle, flagIndex, value, Citizen.returnResultAnyway());
C#
bool retval = Function.Call<bool>((Hash)0x63ae1a34, vehicle, flagIndex, value);

Sources

Cfx.re native reference

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.