Skip to content

IsPlayerWebReady

Whether a player’s game runs the web layer and it is ready.

true only in the state "ready" (see OnPlayerWebStatus); false for "off", "starting" and "failed" and for a player who is not connected. It is the question to ask before a mode counts on a frame: a player without the web layer needs the same thing said in the chat or by a screen of a client script.

IsPlayerWebReady(pid)
Parameter Type
pid number the player

boolean - true when the player’s web layer is ready

function OnPlayerCommandText(pid, cmd, args)
if cmd == "shop" then
if IsPlayerWebReady(pid) then
ShowPlayerWebFrame(pid, "shop")
else
SendClientMessage(pid, COLOR_RED, "The shop window needs the web interface - use /buy in the chat instead.")
end
return true
end
return false
end

OnPlayerWebStatus · IsPlayerWebFrameReady · ShowPlayerWebFrame · the Web interface group of the index