9
3

#248 LUA Support for using a door (widget)

Uzavrená
otvorené 3 rokov pred užívateľom image · 0 komentárov
image okomentoval 3 rokov pred
  • 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 ```
image zatvorené 3 rokov pred
Prihláste sa pre zapojenie do konverzácie.
Načítavanie...
Zrušiť
Uložiť
Zatiaľ neexistuje žiadny obsah.