RedM Natives

AWARDS_GET_RESULT_ITEM

Hash0xAC8FAB22A914AE34
Runtime nameAwardsGetResultItem
NamespaceSCRIPT
SideClient
NameOfficial
Docs
Since build1207

Signature

BOOL AWARDS_GET_RESULT_ITEM(Any* rpcGuid, Hash awardHash, int itemIndex, Any* outResultItem);

Parameters

NameTypeDescription
rpcGuidAny*—
awardHashHash—
itemIndexint—
outResultItemAny*—

Returns BOOL

Usage

Lua
local retval, rpcGuid, outResultItem = AwardsGetResultItem(awardHash, itemIndex)

-- always works, by hash
local retval, rpcGuid, outResultItem = Citizen.InvokeNative(0xAC8FAB22A914AE34, Citizen.PointerValueInt(), awardHash, itemIndex, Citizen.PointerValueInt(), Citizen.ReturnResultAnyway())
JavaScript and C#
JavaScript
const [retval, rpcGuid, outResultItem] = AwardsGetResultItem(awardHash, itemIndex);

// by hash
const [retval, rpcGuid, outResultItem] = Citizen.invokeNative('0xAC8FAB22A914AE34', Citizen.pointerValueInt(), awardHash, itemIndex, Citizen.pointerValueInt(), Citizen.returnResultAnyway());
C#
var rpcGuid = new OutputArgument();
var outResultItem = new OutputArgument();
bool retval = Function.Call<bool>((Hash)0xAC8FAB22A914AE34, rpcGuid, awardHash, itemIndex, outResultItem);
// rpcGuid.GetResult<int>()
// outResultItem.GetResult<int>()
  • Hash parameters: the named function also accepts a string and hashes it for you; Citizen.InvokeNative needs the number — pass joaat("name") or a backtick literal like `name`.
  • Pointer (out) arguments are not passed in Lua/JS: their values are returned after the result, in order.
  • Any* arguments are often structs. Build them with a DataView buffer and pass it with :Buffer() — see the examples and notes below.

See also

Sources

alloc8or RDR3 NativeDB

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.