Skip to content

SendPlayerWebSurfaceMessage

Sends one player’s copy of a surface’s page a message.

As SendWebSurfaceMessage, for one player. The reasons for false add "no such player", "the player has no web layer" and "the player does not have the surface ..." (too far, or another world).

SendPlayerWebSurfaceMessage(pid, id, data)
Parameter Type
pid number the player
id number the surface
data table | string | number | boolean the value the page receives

true, or false, reason

function OnPlayerWebSurfaceReady(pid, id)
SendPlayerWebSurfaceMessage(pid, id, { greeting = "Welcome, " .. GetPlayerName(pid) })
end

SendWebSurfaceMessage · OnPlayerWebSurfaceReady · the Web surfaces group of the index