NETWORK_GET_GLOBAL_CLOCK
Hash
0x11A7ADCD629E170FRuntime name
NetworkGetGlobalClockNamespaceNETWORK
SideClient
NameOfficial
Docs
Since build1207
Signature
BOOL NETWORK_GET_GLOBAL_CLOCK(int* hour, int* minute, int* second);Parameters
| Name | Type | Description |
|---|---|---|
hour | int* | — |
minute | int* | — |
second | int* | — |
Returns BOOL
Usage
local retval, hour, minute, second = NetworkGetGlobalClock()
-- always works, by hash
local retval, hour, minute, second = Citizen.InvokeNative(0x11A7ADCD629E170F, Citizen.PointerValueInt(), Citizen.PointerValueInt(), Citizen.PointerValueInt(), Citizen.ReturnResultAnyway())JavaScript and C#
const [retval, hour, minute, second] = NetworkGetGlobalClock();
// by hash
const [retval, hour, minute, second] = Citizen.invokeNative('0x11A7ADCD629E170F', Citizen.pointerValueInt(), Citizen.pointerValueInt(), Citizen.pointerValueInt(), Citizen.returnResultAnyway());var hour = new OutputArgument();
var minute = new OutputArgument();
var second = new OutputArgument();
bool retval = Function.Call<bool>((Hash)0x11A7ADCD629E170F, hour, minute, second);
// hour.GetResult<int>()
// minute.GetResult<int>()
// second.GetResult<int>()- Pointer (out) arguments are not passed in Lua/JS: their values are returned after the result, in order.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.