CREATE_AMBIENT_PICKUP
Hash
0x673966A0C0FD7171Runtime name
CreateAmbientPickupNamespaceOBJECT
SideClient
NameOfficial
Docs
Since build1207
GTA V hash
0x673966A0C0FD7171Signature
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);Parameters
| Name | Type | Description |
|---|---|---|
pickupHash | Hash | — |
x | float | — |
y | float | — |
z | float | — |
flags | int | — |
amount | int | — |
customModel | Hash | — |
createAsScriptObject | BOOL | — |
scriptHostObject | BOOL | — |
customAmmoType | int | — |
p10 | float | — |
Returns Object
Description
flags: see CREATE_PICKUP
Usage
local retval = CreateAmbientPickup(pickupHash, x, y, z, flags, amount, customModel, createAsScriptObject, scriptHostObject, customAmmoType, p10)
-- always works, by hash
local retval = Citizen.InvokeNative(0x673966A0C0FD7171, pickupHash, x, y, z, flags, amount, customModel, createAsScriptObject, scriptHostObject, customAmmoType, p10, Citizen.ResultAsInteger())JavaScript and C#
const retval = CreateAmbientPickup(pickupHash, x, y, z, flags, amount, customModel, createAsScriptObject, scriptHostObject, customAmmoType, p10);
// by hash
const retval = Citizen.invokeNative('0x673966A0C0FD7171', pickupHash, x + 0.0000001, y + 0.0000001, z + 0.0000001, flags, amount, customModel, createAsScriptObject, scriptHostObject, customAmmoType, p10 + 0.0000001, Citizen.returnResultAnyway(), Citizen.resultAsInteger());int retval = Function.Call<int>((Hash)0x673966A0C0FD7171, pickupHash, x, y, z, flags, amount, customModel, createAsScriptObject, scriptHostObject, customAmmoType, p10);- Hash parameters: the named function also accepts a string and hashes it for you;
Citizen.InvokeNativeneeds the number — passjoaat("name")or a backtick literal like`name`. - Float parameters: Lua integers (
10, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write10.0orvalue + 0.0. The generated JS wrappers add0.0000001to non-zero floats for the same reason.
Enums and flags
- Placement Flags 24 values
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.