The Lab
VEHICLE native

CREATE_VEHICLE

returns Vehicle9 paramsbuild 1207

Creates a vehicle of modelHash at the given position and heading and returns its handle.

Load the model with REQUEST_MODEL first; set isNetwork to true so other players see it.

Signature

C
Vehicle CREATE_VEHICLE(Hash modelHash, float x, float y, float z, float heading, BOOL isNetwork, BOOL bScriptHostVeh, BOOL bDontAutoCreateDraftAnimals, BOOL p8); // 0xAF35D0D2583051B0 b1207

Parameters

#NameType
1modelHashHash
2xfloat
3yfloat
4zfloat
5headingfloat
6isNetworkBOOL
7bScriptHostVehBOOL
8bDontAutoCreateDraftAnimalsBOOL
9p8BOOL

Facts

Facts about CREATE_VEHICLE
Name
CREATE_VEHICLE
Hash
0xAF35D0D2583051B0
Namespace
Returns
Vehicle
Game build
1207

Examples

Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.

Lua
local vehicle = Citizen.InvokeNative(0xAF35D0D2583051B0, -- CREATE_VEHICLE
  GetHashKey("a_c_horse_arabian_white"), -- Hash modelHash
  0.0, -- float x
  0.0, -- float y
  0.0, -- float z
  0.0, -- float heading
  false, -- BOOL isNetwork
  false, -- BOOL bScriptHostVeh
  false, -- BOOL bDontAutoCreateDraftAnimals
  false, -- BOOL p8
  Citizen.ResultAsInteger()
)
print(vehicle)
JavaScript
// Whole JS numbers are sent as integers: pass floats like 1.5 (or n + 0.0000001), never 1.
const vehicle = Citizen.invokeNative("0xAF35D0D2583051B0", // CREATE_VEHICLE
  GetHashKey("a_c_horse_arabian_white"), // Hash modelHash
  0.0, // float x
  0.0, // float y
  0.0, // float z
  0.0, // float heading
  false, // BOOL isNetwork
  false, // BOOL bScriptHostVeh
  false, // BOOL bDontAutoCreateDraftAnimals
  false, // BOOL p8
  Citizen.resultAsInteger()
);
console.log(vehicle)
C#
int vehicle = Function.Call<int>((Hash)0xAF35D0D2583051B0, // CREATE_VEHICLE
  (uint)API.GetHashKey("a_c_horse_arabian_white"), // Hash modelHash
  0.0f, // float x
  0.0f, // float y
  0.0f, // float z
  0.0f, // float heading
  false, // BOOL isNetwork
  false, // BOOL bScriptHostVeh
  false, // BOOL bDontAutoCreateDraftAnimals
  false // BOOL p8
);
All VEHICLE natives

Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.