The Lab
OBJECT native

CREATE_AMBIENT_PICKUP

returns Object11 paramsbuild 1207

Creates an ambient pickup of type pickupHash at the given coordinates and returns its object. Options cover the amount, a custom model and ownership.

Signature

C
Object CREATE_AMBIENT_PICKUP(Hash pickupHash, float x, float y, float z, int flags, int amount, Hash customModel, BOOL createAsScriptObject, BOOL scriptHostObject, int customAmmoType, float p10); // 0x673966A0C0FD7171 b1207

Parameters

#NameType
1pickupHashHash
2xfloat
3yfloat
4zfloat
5flagsint
6amountint
7customModelHash
8createAsScriptObjectBOOL
9scriptHostObjectBOOL
10customAmmoTypeint
11p10float

Facts

Facts about CREATE_AMBIENT_PICKUP
Name
CREATE_AMBIENT_PICKUP
Hash
0x673966A0C0FD7171
Namespace
Returns
Object
Game build
1207

Examples

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

Lua
local objectOut = Citizen.InvokeNative(0x673966A0C0FD7171, -- CREATE_AMBIENT_PICKUP
  GetHashKey("name"), -- Hash pickupHash
  0.0, -- float x
  0.0, -- float y
  0.0, -- float z
  0, -- int flags
  0, -- int amount
  GetHashKey("a_c_horse_arabian_white"), -- Hash customModel
  false, -- BOOL createAsScriptObject
  false, -- BOOL scriptHostObject
  0, -- int customAmmoType
  0.0, -- float p10
  Citizen.ResultAsInteger()
)
print(objectOut)
JavaScript
// Whole JS numbers are sent as integers: pass floats like 1.5 (or n + 0.0000001), never 1.
const objectOut = Citizen.invokeNative("0x673966A0C0FD7171", // CREATE_AMBIENT_PICKUP
  GetHashKey("name"), // Hash pickupHash
  0.0, // float x
  0.0, // float y
  0.0, // float z
  0, // int flags
  0, // int amount
  GetHashKey("a_c_horse_arabian_white"), // Hash customModel
  false, // BOOL createAsScriptObject
  false, // BOOL scriptHostObject
  0, // int customAmmoType
  0.0, // float p10
  Citizen.resultAsInteger()
);
console.log(objectOut)
C#
int objectOut = Function.Call<int>((Hash)0x673966A0C0FD7171, // CREATE_AMBIENT_PICKUP
  (uint)API.GetHashKey("name"), // Hash pickupHash
  0.0f, // float x
  0.0f, // float y
  0.0f, // float z
  0, // int flags
  0, // int amount
  (uint)API.GetHashKey("a_c_horse_arabian_white"), // Hash customModel
  false, // BOOL createAsScriptObject
  false, // BOOL scriptHostObject
  0, // int customAmmoType
  0.0f // float p10
);
All OBJECT natives

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