#248 LUA Support for using a door (widget)

Затворени
отворен преди 3 години от image · 0 коментара
image коментира преди 3 години
  • new SpawnScripts function 'usedoor' function usedoor(NPC, Spawn, IsOpen) LUA Functions additionally needed:
  • OpenDoor, CloseDoor, IsOpen

Example script:

function usedoor(NPC, Spawn, IsOpen)
    if IsOpen == true then
        if Spawn then
            SendMessage(Spawn, "Door was open", "red")
        end
        
        CloseDoor(NPC)
    else
        if Spawn then
            SendMessage(Spawn, "Door was closed", "red")
        end
        
        OpenDoor(NPC)
    end
end
- new SpawnScripts function 'usedoor' ```function usedoor(NPC, Spawn, IsOpen)``` LUA Functions additionally needed: - OpenDoor, CloseDoor, IsOpen Example script: ``` function usedoor(NPC, Spawn, IsOpen) if IsOpen == true then if Spawn then SendMessage(Spawn, "Door was open", "red") end CloseDoor(NPC) else if Spawn then SendMessage(Spawn, "Door was closed", "red") end OpenDoor(NPC) end end ```
Впишете се за да се присъедините към разговора.
Зареждане...
Отказ
Запис
Все още няма съдържание.