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.
Syntax
Section titled “Syntax”IsPlayerWebFrameReady(pid, frame)| Parameter | Type | |
|---|---|---|
pid |
number | the player |
frame |
string | the frame’s name |
Returns
Section titled “Returns”boolean - true when the page is listening
Example
Section titled “Example”-- do not repeat the first screen for a player who has it alreadyfunction showMenu(pid) if not IsPlayerWebFrameReady(pid, "menu") then ShowPlayerWebFrame(pid, "menu") endendSee also
Section titled “See also”OnPlayerWebReady · ShowPlayerWebFrame · IsPlayerWebReady · the Web interface group of the index
