_INVENTORY_GET_INVENTORY_ITEM_SOUND
Returns item Hash to be used with _IS_SCRIPTED_AUDIO_CUSTOM and _PLAY_SOUND_FROM_ITEM (p0)
Hash
0x2E1CDC1FF3B8473ERuntime name
InventoryGetInventoryItemSoundNamespaceINVENTORY
SideClient
NameCommunity guess
Docs
Since build1207
Signature
Hash _INVENTORY_GET_INVENTORY_ITEM_SOUND(Hash item, int soundType);Parameters
| Name | Type | Description |
|---|---|---|
item | Hash | — |
soundType | int | — |
Returns Hash
Description
soundType: see 0x2BAE4880DCDD560B
Returns item Hash to be used with _IS_SCRIPTED_AUDIO_CUSTOM and _PLAY_SOUND_FROM_ITEM (p0)
Usage
local retval = InventoryGetInventoryItemSound(item, soundType)
-- always works, by hash
local retval = Citizen.InvokeNative(0x2E1CDC1FF3B8473E, item, soundType, Citizen.ResultAsInteger())JavaScript and C#
const retval = InventoryGetInventoryItemSound(item, soundType);
// by hash
const retval = Citizen.invokeNative('0x2E1CDC1FF3B8473E', item, soundType, Citizen.returnResultAnyway(), Citizen.resultAsInteger());int retval = Function.Call<int>((Hash)0x2E1CDC1FF3B8473E, item, soundType);- 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`. - The name is a community guess and may change. If the named call is missing in your client build, use
InvokeNativewith the hash — it always works.
Enums and flags
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.