• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Close / Open server. Question.

Sweddy

Well-Known Member
Joined
Feb 14, 2009
Messages
2,907
Reaction score
93
Location
Sweden
Hello!

All you guys know this talkaction: /closeserver /openserver ?

LUA:
function onSay(cid, words, param, channel)
	local state = GAMESTATE_CLOSED
	if(words:sub(2, 2) == "o") then
		state = GAMESTATE_NORMAL
	end

	local str = "Failed to " .. (state == GAMESTATE_CLOSED and "close" or "open") .. " server."
	if(doSetGameState(state) ~= LUA_ERROR) then
		str = "Server has been " .. (state == GAMESTATE_CLOSED and "closed" or "opened") .. " successfully."
	end

	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, str)
	return TRUE
end


Well, Group id 3+ can stay ingame while server is "closed" for players. And my question is, is it possible to change minimum group id so like GOD's only can be on?
 
yea sure

Code:
	<talkaction log="yes" words="/closeserver" access="5" event="script" value="closeopen.lua"/>
	<talkaction log="yes" words="/openserver" access="5" event="script" value="closeopen.lua"/>
 
Back
Top