GET_STATE_BAG_VALUE
Returns the value of a state bag key.
Signature
object GET_STATE_BAG_VALUE(char* bagName, char* key);Parameters
| Name | Type | Description |
|---|---|---|
bagName | char* | — |
key | char* | — |
Returns object — Value.
Description
Returns the value of a state bag key.
Usage
local retval = GetStateBagValue(bagName, key)
-- always works, by hash
local retval = Citizen.InvokeNative(0x637f4c75, bagName, key, Citizen.ResultAsObject2(msgpack.unpack))JavaScript and C#
const retval = GetStateBagValue(bagName, key);
// by hash
const retval = Citizen.invokeNative('0x637f4c75', bagName, key, Citizen.returnResultAnyway(), Citizen.resultAsObject2());Function.Call((Hash)0x637f4c75, bagName, key);See also
SET_STATE_BAG_VALUEInternal function for setting a state bag value.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.