ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Client events
  3. onClientRestore

Event

onClientRestore

ClientBrowserIdentical to MTA:SA

The game window came back to the foreground after being minimized or Alt+Tab.

Handler

addEventHandler("onClientRestore", root, function(didClearRenderTargets) ... end)

Parameters

didClearRenderTargetsbool
Always false: render targets (dxCreateRenderTarget) are kept in program memory and nothing in them is lost, so there is no need to redraw them.

Source

source is root.

Example

addEventHandler("onClientRestore", root, function(cleared)
    if cleared then
        -- tutaj odrysowanie render targetow (w Trilogy Hub nie bywa potrzebne)
    end
    triggerServerEvent("afk", localPlayer, false)
end)

See also