Skip to content

IsPlayerWebFrameReady

Whether a frame of a player’s web interface has loaded its page and is listening.

true from the moment the frame’s page said it was ready (OnPlayerWebReady) until the page is gone - the frame was removed, the interface no longer has it, or the player’s web layer stopped. A frame that is only hidden is still ready. false for a frame that was never shown, one whose page is still loading, an unknown frame name and a player who is not connected.

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

boolean - true when the page is listening

-- do not repeat the first screen for a player who has it already
function showMenu(pid)
if not IsPlayerWebFrameReady(pid, "menu") then
ShowPlayerWebFrame(pid, "menu")
end
end

OnPlayerWebReady · ShowPlayerWebFrame · IsPlayerWebReady · the Web interface group of the index