• 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 Mc characters with access < 3

sonny11

New Member
Joined
Dec 22, 2007
Messages
137
Reaction score
0
Okay, so i want this script to not show any sign of a GM multi-clienting.

I added if getPlayerAccess(pid) < 3 then but it still shows the normal character that the GM is Multiclienting with.

Example -
Code:
 12:55 2 players with IP address ( 000000000 / 00.0.0.00 ):
12:55 GMs Normal Character (level: 11716 | target: 0)

I want it to remove the GMs Normal Character from the list

Lua:
function onSay(cid, words, param, channel)
    local _ip = nil
    if(param ~= nil) then
        _ip = tonumber(param)
        if(not _ip or _ip == 0) then
            local revertIp = doRevertIp(param)
            if(not revertIp) then
                local tid = getPlayerByNameWildcard(param)
                if(not tid) then
                    _ip = nil
                else
                    _ip = getPlayerIp(tid)
                end
            else
                _ip = doConvertIpToInteger(revertIp)
            end
        end
    end

    local ips = {}
    local players = getPlayersOnline()
    for i, pid in ipairs(players) do
        local ip = getPlayerIp(pid)
        if(not _ip or _ip == ip) then
            if(ips[ip] == nil) then
                ips[ip] = {pid}
            else
                table.insert(ips[ip], pid)
            end
        end
    end

    for ip, players in pairs(ips) do
        if(#players > 1) then
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, #players .. " players with IP address ( " .. ip .. " / " .. doConvertIntegerToIp(ip) .. " ):")
            for i, pid in pairs(players) do
		if getPlayerAccess(pid) < 3 then
                local target = getCreatureTarget(pid)
                if(target ~= 0) then
                    target = getCreatureName(target)
                end
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getCreatureName(pid) .. " (level: " .. getPlayerLevel(pid) .. " | target: " .. target .. ")")
			end
            end
        end
    end
    return TRUE
end
 
Last edited:
But normal players are < 3 so what the heck are you talking about? I don't understand what you're needing help with, explain again.
 
Lua:
function onSay(cid, words, param, channel)
    local _ip = nil
    if(param ~= nil) then
        _ip = tonumber(param)
        if(not _ip or _ip == 0) then
            local revertIp = doRevertIp(param)
            if(not revertIp) then
                local tid = getPlayerByNameWildcard(param)
                if(not tid) then
                    _ip = nil
                else
                    _ip = getPlayerIp(tid)
                end
            else
                _ip = doConvertIpToInteger(revertIp)
            end
        end
    end
 
    local ips = {}
    local players = getPlayersOnline()
    for i, pid in ipairs(players) do
        local ip = getPlayerIp(pid)
        if(not _ip or _ip == ip) then
            if(ips[ip] == nil) then
                ips[ip] = {pid}
            else
                table.insert(ips[ip], pid)
            end
        end
    end
 
    for ip, players in pairs(ips) do
        if(#players > 1) then
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, #players .. " players with IP address ( " .. ip .. " / " .. doConvertIntegerToIp(ip) .. " ):")
    end
    return TRUE
end
 
No, i don't mean like that. that shows it like this

Code:
15:55 2 players with IP address ( 180000005 / 0.0.0.0.0.0. ):
15:55 2 players with IP address ( 400000677 / 00.0.0.0.0 ):

I just want the script to not show gamemasters+ & there players
 
My code for 0.3.6pl1:
PHP:
function onSay(cid, words, param, channel)
	local ips = {}
	local players = getPlayersOnline()
	for i, pid in ipairs(players) do
		local ip = getPlayerIp(pid)
		if(param == "gm" or getPlayerGroupId(pid) <= 3) then
			if(ips[ip] == nil) then
				ips[ip] = {pid}
			else
				table.insert(ips[ip], pid)
			end
		end
	end

	table.sort(ips)
	local anyMultiClient = false
	for ip, list in pairs(ips) do
		if(#list > 1) then
			anyMultiClient = true
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, #list .. " MCs with IP - " .. doConvertIntegerToIp(ip) .. " - " .. ip .. ":")
			for i=1, #list do
				local target = getCreatureTarget(list[i])
				if(target ~= 0) then
					target = getCreatureName(target)
				end
				doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getCreatureName(list[i]) .. " [Level: " .. getPlayerLevel(list[i]) .. "][Target: " .. target .. "]")
			end
		end
	end
	if(not anyMultiClient) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Currently there aren't any players with same IP address(es).")
	end
	return true
end
When use /mc it shows:
17:10 /mc
17:10 4 MCs with IP - 68.116.200.108 - 1825076292:
17:10 Soulriper [Level: 1107][Target: Training Monk]
17:10 Neil [Level: 1030][Target: Training Monk]
17:10 Lahir [Level: 2013][Target: Training Monk]
17:10 Rapero [Level: 1584][Target: 0]
17:10 2 MCs with IP - 200.117.227.31 - 535000520:
17:10 Maiden [Level: 1125][Target: Training Monk]
17:10 Pally Of Hell [Level: 147][Target: Training Monk]
When you use /mc gm it should show GM MCs too, can't test.
 
Back
Top