GetDoorKey
The tagged item that is a door’s key (SetDoorKey) - every world’s, or the one for a virtual world.
Syntax
Section titled “Syntax”GetDoorKey(door [, world])| Parameter | Type | |
|---|---|---|
door |
string | the door’s level name |
world |
number | the virtual world whose players’ key to read: its own, else every world’s; none (the default) = every world’s (optional) |
Returns
Section titled “Returns”string - the item’s id, "" when the door has none
Example
Section titled “Example”if FindPlayerItem(pid, GetDoorKey(MILL_DOOR)) then SendClientMessage(pid, COLOR_WHITE, "You have the key to the mill house.") endlocal key = GetDoorKey(FLAT_DOOR, GetPlayerVirtualWorld(pid))See also
Section titled “See also”SetDoorKey · the Doors and containers group of the index
