{"hash":"0x67D2E605","ns":"CFX","name":"GET_PLAYER_TIME_ONLINE","slug":"GET_PLAYER_TIME_ONLINE","official":true,"named":true,"luaName":"GetPlayerTimeOnline","game":"cfx","apiset":"server","returnType":"int","params":[{"name":"playerSrc","type":"char*","description":"A player."}],"returnsDescription":"The current time online in seconds.","summary":"Gets the current time online for a specified player.","descriptions":[{"source":"cfx","format":"md","body":"Gets the current time online for a specified player."}],"examples":[{"lang":"lua","code":"local function ShowTimeOnline()\n    local player = source\n    local secondsTotalOnline = GetPlayerTimeOnline(player)\n\n    print((\"Time online : %f H %f min %f\"):format(\n        (secondsTotalOnline / 3600),\n        ((secondsTotalOnline / 60) % 60),\n        (secondsTotalOnline % 60)\n    ))\nend\n\nRegisterNetEvent(\"myTimeOnline\", ShowTimeOnline)","source":"cfx"}],"aliases":[],"enums":[],"related":[],"sources":["cfx"],"doc":3,"url":"https://natives.borderlinerp.com/natives/CFX/GET_PLAYER_TIME_ONLINE","markdownUrl":"https://natives.borderlinerp.com/natives/CFX/GET_PLAYER_TIME_ONLINE.md","snippets":{"lua":"local retval = GetPlayerTimeOnline(playerSrc)","luaInvoke":"local retval = Citizen.InvokeNative(0x67d2e605, playerSrc, Citizen.ResultAsInteger())","js":"const retval = GetPlayerTimeOnline(playerSrc);","jsInvoke":"const retval = Citizen.invokeNative('0x67d2e605', playerSrc, Citizen.returnResultAnyway(), Citizen.resultAsInteger());","csharp":"int retval = Function.Call<int>((Hash)0x67d2e605, playerSrc);","notes":[]}}