Jack Parsons
Member
My "accounts" table has no group_id column, only page_access (And changing it to 5 makes no difference). Nevertheless, the "players" table has a group_id column, but changing it to 6 renders the player useless (Since the terminal states that such group_id does not exist). I've tried 3 and this one worked. Now I can use /up, /down and other "commands". But, when I input "/closeserver shutdown", nothing happens. The server keeps running, and I need to shut it down in order to save the houses and other stuff (As it was instructed to me in my previous thread).
Here's closeserver.lua:
And in talkactions.xml:
Here's closeserver.lua:
Code:
function onSay(cid, words, param)
local player = Player(cid)
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
And in talkactions.xml:
Code:
<talkactions>
<talkaction words="/closeserver" separator=" " script="closeserver.lua" />
</talkactions>