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
```
function usedoor(NPC, Spawn, IsOpen)
LUA Functions additionally needed:Example script: