Skip to content

HidePlayerWebFrame

Takes a frame of the web interface off a player’s screen without closing it.

The frame stays alive: its page keeps running and keeps its state, messages and events still reach it, and ShowPlayerWebFrame draws the same page again at once. A hidden frame gives up the keyboard and the mouse it held and cannot take them until it is shown.

The answer is true when the request was handed to the player’s game; false and the reason when it could not be: "no such player", "no web interface", "the player has no web layer" or "no such frame".

HidePlayerWebFrame(pid, frame)
Parameter Type
pid number the player
frame string the frame’s name

true, or false, reason - the reason as a person reads it

-- close the shop window when the player walks away from the stall
function OnPlayerLeaveZone(pid, zone)
if zone == shopZone then HidePlayerWebFrame(pid, "shop") end
end

ShowPlayerWebFrame · SetPlayerWebFocus · the Web interface group of the index