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

Function

getElementPreviewCache

ClientGame engineTrilogy Hub only

Returns the path of a shot saved in the persistent preview store by setElementPreviewCacheKey. Pass the path to dxDrawImage or dxCreateTexture. The shot stays between game sessions.

Syntax

string getElementPreviewCache(string key)

Arguments

keystring
The save key.

Returns

The path or false when there is no such shot.

Example

addEventHandler("onClientRender", root, function()
    local img = getElementPreviewCache("salon_411")
    if img then dxDrawImage(40, 40, 256, 256, img) end
end)

See also