OnPlayerUseWebSurface
A player pressed the use key on a surface’s prompt.
A surface with a prompt (CreateWebSurface’s prompt option, or SetEntityPrompt) shows it in the game’s use hint
when a player looks at it from close by (3.5 metres from its edge); the use key then calls this - and the page’s
KcdMp.onSurfaceUse on that player’s copy, which can show the player something at once.
Syntax
Section titled “Syntax”function OnPlayerUseWebSurface(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 OnPlayerUseWebSurface(pid, id) SendClientMessage(pid, COLOR_SERVER, "The board's notices are all from this week.")endSee also
Section titled “See also”CreateWebSurface · SetEntityPrompt · OnPlayerInteract · the Web surfaces group of the index
