Skip to content

OnPlayerInteractDoor

A player used your own row on a door (SetDoorPrompt) - the door itself did not move.

Fires when a player within reach holds the use key on a door that carries a row of yours (SetDoorPrompt). What happens is yours to write - knock, ring for the owner, open a page with the house’s price. To open the door after all, SetDoorState.

function OnPlayerInteractDoor(pid, key)
-- ...
end
Parameter Type
pid number the player
key string the door’s level name

nothing

SetDoorPrompt(HOUSE_DOOR, "View the house")
function OnPlayerInteractDoor(pid, key)
if key == HOUSE_DOOR then
SendPlayerWebMessage(pid, "house", { price = 1200 })
ShowPlayerWebFrame(pid, "house")
end
end

SetDoorPrompt · GetDoorPrompt · OnPlayerUseDoor · the Doors and containers group of the index