- Documentation
- Server events
- onPlayerScreenShot
Event
onPlayerScreenShot
The result of takePlayerScreenShot arrives: a JPEG of the player's game frame (without the script overlay) or information that it failed.
Handler
addEventHandler("onPlayerScreenShot", root, function(theResource, status, imageData, timestamp, tag) ... end)Parameters
theResourceresource- The resource that asked.
statusstring"ok","minimized"or"error".imageDatastring- JPEG data.
timestampint- When it was taken.
tagstring- The tag from
takePlayerScreenShot.
Source
source is the player.
Example
addEventHandler("onPlayerScreenShot", root, function(_, status, data, _, tag)
if status == "ok" then
local f = fileCreate("zrzuty/" .. getPlayerName(source) .. ".jpg")
fileWrite(f, data)
fileClose(f)
end
end)