OnPlayerWebSurfaceReady
A player’s copy of a surface’s page has loaded and is listening.
The player came near the surface (within its page’s range) and their game loaded the page - or loaded it again: a copy
is closed when the player goes away, when closer surfaces take its place or when the interface changes, and starts afresh
each time. Send it what it should show: SendPlayerWebSurfaceMessage reaches that copy alone.
A player’s game says this for itself: a modified game may say it when nothing loaded. Use it to send a page its data, not to prove anything about the player.
Syntax
Section titled “Syntax”function OnPlayerWebSurfaceReady(pid, id) -- ...end| Parameter | Type | |
|---|---|---|
pid |
number | the player |
id |
number | the surface’s entity id |
Returns
Section titled “Returns”nothing
Example
Section titled “Example”function OnPlayerWebSurfaceReady(pid, id) if GetWebSurfacePage(id) == "board" then SendPlayerWebSurfaceMessage(pid, id, { notices = notices }) endendSee also
Section titled “See also”SendPlayerWebSurfaceMessage · SendWebSurfaceMessage · CreateWebSurface · the Web surfaces group of the index
