• 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!

Is it possible to make this

Joined
Jun 19, 2009
Messages
1,852
Reaction score
5
Hello!

Is it possible to make a Login script that only allows people with a certain IP to login on a GM char? :O

example:

Code:
local t = {
--[ip] = access
[<ip>] = 4,
[<ip>] = 5,
}
function onLogin(cid)
<code here>

if a person logs in on a gm char without a registered IP, he gets kicked (return false or doRemovePlayer(cid))

tell me if u didn't understand my request =p
 
Lua:
local t = {
	["ip"] = 4,
	["ip"] = 5,
}
function onLogin(cid)
	local myAccess = getPlayerAccess(cid)
	if getPlayerAccess(cid) >= 1 then
		local myIP = doConvertIntegerToIp(getPlayerIP(cid))
		for ip, access in pairs(t) do
			if myIP == ip and myAccess <= access then
				return true
			end
		end
		return false
	end
	return true
end
 
Last edited:
Back
Top