• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

TalkAction New /mc command, nice list of players with same IP

PhoOwned

^_^
Joined
Nov 11, 2010
Messages
375
Reaction score
66
/mc
shows something like:
23:23 /mc
23:23 2 MCs with IP - 200.43.36.106 - 1780755400:
23:23 Maiden [Level: 1125][Target: 0]
23:23 Metal [Level: 1640][Target: 0]

23:23 2 MCs with IP - 91.187.109.66 - 1114487643:
23:23 Knalli [Level: 1007][Target: 0]
23:23 Hepsto [Level: 1403][Target: Yalahal]


/mc gm
show same list, but include GM/CM/GOD mcs.
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
 
Back
Top