AWARDS_GET_RESULT_ITEM
Hash
0xAC8FAB22A914AE34Runtime name
AwardsGetResultItemNamespaceSCRIPT
SideClient
NameOfficial
Docs
Since build1207
Signature
BOOL AWARDS_GET_RESULT_ITEM(Any* rpcGuid, Hash awardHash, int itemIndex, Any* outResultItem);Parameters
| Name | Type | Description |
|---|---|---|
rpcGuid | Any* | — |
awardHash | Hash | — |
itemIndex | int | — |
outResultItem | Any* | — |
Returns BOOL
Usage
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#
const [retval, rpcGuid, outResultItem] = AwardsGetResultItem(awardHash, itemIndex);
// by hash
const [retval, rpcGuid, outResultItem] = Citizen.invokeNative('0xAC8FAB22A914AE34', Citizen.pointerValueInt(), awardHash, itemIndex, Citizen.pointerValueInt(), Citizen.returnResultAnyway());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.InvokeNativeneeds the number — passjoaat("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
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.