SetDoorPrompt
Puts a row of your own on a door (“Knock”, “View the house”) - its use reaches OnPlayerInteractDoor.
The door shows your row beside its own: the player holds the use key for yours, a press still opens or closes the door. The
text is shown as written (48 characters at most; one that starts with @ is a text key of the game’s own). Using it calls
OnPlayerInteractDoor and moves nothing. While the row is up the door’s own lockpick row gives way to it. nil or "" takes
it off. At most 4096 doors, and the rows’ different texts together about 64 KB (a text many doors show counts once: a thousand
doors with “Knock” or “View the house” is two texts). Changes go out to the players once, at the end of the tick, and only the
doors that changed.
Syntax
Section titled “Syntax”SetDoorPrompt(key, text)| Parameter | Type | |
|---|---|---|
key |
string | the door’s level name |
text |
string | nil | the row’s text; nil = none |
Returns
Section titled “Returns”boolean - false for an empty or too long key, or past 4096 doors or about 64 KB of different texts
Example
Section titled “Example”SetDoorPrompt(SMITHY_DOOR, "Ring the bell")function OnPlayerInteractDoor(pid, key) if key == SMITHY_DOOR then SendClientMessageToAll(COLOR_WHITE, GetPlayerName(pid) .. " rings the smithy's bell.") endendSee also
Section titled “See also”OnPlayerInteractDoor · GetDoorPrompt · SetDoorCheck · the Doors and containers group of the index
