Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
if IsControlJustReleased(1, 168) then --F7
test = NetworkGetServerTime()
TriggerEvent("chatMessage", "Time", {255, 0, 0}, "Now is" .. test .. "")
end
end
end)
Note that this native (if it works) should return 3 values, hours, minutes, seconds.
(Pointers in the Natives are converted to return values in Lua)
Ergo it should be hours, minutes, seconds = NetworkGetServerTime()
Hmm it doesn’t seem like this native does what you would want to.
Why do you even need the server time? It’ll be the same time as yours plus or minus a timezone shift.