GET_PLAYER_TIME_ONLINE
Gets the current time online for a specified player.
CFX
Signature
lua
GetPlayerTimeOnline(playerSrc)
-- returns intParameters
| Name | Type | Description |
|---|---|---|
| char* | A player. |
Usage
Named call
GetPlayerTimeOnline(playerSrc)InvokeNative
Citizen.InvokeNative(0x67D2E605, playerSrc)lua 1
local function ShowTimeOnline()
local player = source
local secondsTotalOnline = GetPlayerTimeOnline(player)
print(("Time online : %f H %f min %f"):format(
(secondsTotalOnline / 3600),
((secondsTotalOnline / 60) % 60),
(secondsTotalOnline % 60)
))
end
RegisterNetEvent("myTimeOnline", ShowTimeOnline)Details
- Hash
- API set
- Source
- cfx
Source: cfx
