The Lab
ITEMDATABASE native

_ITEMDATABASE_IS_KEY_VALID

returns BOOL2 paramsbuild 1207

Returns true if key exists in the item database. mode selects how the lookup is performed.

Check it before calling the FILLOUT natives on a key built at runtime.

Signature

C
BOOL _ITEMDATABASE_IS_KEY_VALID(Hash key, int mode); // 0x6D5D51B188333FD1 b1207

Parameters

#NameType
1keyHash
2modeint

Facts

Facts about _ITEMDATABASE_IS_KEY_VALID
Name
_ITEMDATABASE_IS_KEY_VALID
Hash
0x6D5D51B188333FD1
Namespace
Returns
BOOL
Game build
1207

Examples

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

Lua
local result = Citizen.InvokeNative(0x6D5D51B188333FD1, -- _ITEMDATABASE_IS_KEY_VALID
  GetHashKey("name"), -- Hash key
  0 -- int mode
)
if result then
  -- ...
end
JavaScript
const result = Citizen.invokeNative("0x6D5D51B188333FD1", // _ITEMDATABASE_IS_KEY_VALID
  GetHashKey("name"), // Hash key
  0, // int mode
  Citizen.returnResultAnyway()
);
if (result) {
  // ...
}
C#
bool result = Function.Call<bool>((Hash)0x6D5D51B188333FD1, // _ITEMDATABASE_IS_KEY_VALID
  (uint)API.GetHashKey("name"), // Hash key
  0 // int mode
);
All ITEMDATABASE natives

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