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

TalkAction Multiclient Checker(Multicheck)

kokorec

Tavon Online - Soon
Joined
May 3, 2008
Messages
287
Reaction score
0
Location
Turkey
Hi,
multicheck is finds MC use players.
i tried it with TFS 0.3+

here is script:
Code:
function onSay(cid, words, param)
	local players = getPlayersOnline()
	local IPs = {}
	local multiClients = {}
	local multiClientIPs = {}
	for i, pid in ipairs(players) do
		local ip = getIPByName(getCreatureName(pid))
		local pos = table.find(IPs, ip)
		if(pos ~= nil) then
			if(isInArray(multiClients, players[pos]) == TRUE) then
				table.insert(multiClients, players[pos])
				table.insert(multiClientIPs, ip)
			end
			table.remove(players, pos)
			table.remove(IPs, pos)
			table.insert(multiClients, pid)
			table.insert(multiClientIPs, ip)
		end
		table.insert(IPs, ip)
	end

	if(table.maxn(multiClients) > 0) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Currently online players with same IP address(es):")
		for i, pid in ipairs(multiClients) do
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getCreatureName(pid) .. " (" .. convertIntToIP(multiClientIPs[i]) .. ")")
		end
	else
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Currently there aren't any players with same IP address(es).")
	end
	return TRUE
end

talkactions.xml
Code:
  <talkaction log="yes" access="3" words="/mc" script="multicheck.lua" />

Thanks~
 
Last edited:
Isn't this script from TFS 0.3? Or am I wrong? :eek:

Note:if players playing in internet cafe, it looks like use mc.

No, only if two persons are connected to a wireless router with a static ip. At internet cafe they usually use dynamic ips.
 
Back
Top