Skip to content

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.

function OnPlayerUseWebSurface(pid, id)
-- ...
end
Parameter Type
pid number the player
id number the surface’s entity id

nothing

function OnPlayerUseWebSurface(pid, id)
SendClientMessage(pid, COLOR_SERVER, "The board's notices are all from this week.")
end

CreateWebSurface · SetEntityPrompt · OnPlayerInteract · the Web surfaces group of the index