mirror of
https://github.com/ErikasKontenis/SabrehavenServer.git
synced 2025-10-15 06:54:54 +02:00
Full Distribution
This commit is contained in:
17
data/talkactions/scripts/closeserver.lua
Normal file
17
data/talkactions/scripts/closeserver.lua
Normal file
@@ -0,0 +1,17 @@
|
||||
function onSay(player, words, param)
|
||||
if not player:getGroup():getAccess() then
|
||||
return true
|
||||
end
|
||||
|
||||
if player:getAccountType() < ACCOUNT_TYPE_GOD then
|
||||
return false
|
||||
end
|
||||
|
||||
if param == "shutdown" then
|
||||
Game.setGameState(GAME_STATE_SHUTDOWN)
|
||||
else
|
||||
Game.setGameState(GAME_STATE_CLOSED)
|
||||
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Server is now closed.")
|
||||
end
|
||||
return false
|
||||
end
|
Reference in New Issue
Block a user