ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Client functions
  3. getRecordingPlayerPosition

Function

getRecordingPlayerPosition

ClientDrawing (dx)Trilogy Hub only

Returns the player position and the recording length in milliseconds.

Syntax

int, int getRecordingPlayerPosition(element player)

Arguments

playerelement
The player.

Returns

Position and length or false.

Example

local screen = createRecordingPlayer(loadRecording("powtorki/ostatnia.avi"))
addEventHandler("onClientRender", root, function()
    local pos, len = getRecordingPlayerPosition(screen)
    if pos then dxDrawText(("%.1f / %.1f s"):format(pos / 1000, len / 1000), 20, 60) end
end)

See also