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

Help me with this command please :c

lSenturion2

Active Member
Joined
Oct 2, 2019
Messages
124
Reaction score
29
I want to make this command /mc and that it shows in an orderly way by ip the names of those who have the same ip.
EXAMPLE:
23:26 Archer (177.240.59.112)
23:26 Aborted (177.240.59.112)
23:26 Skiper (177.240.59.112)
23:26 Satana (190.215.102.242)
23:26 Ferumbraz (190.215.102.242)
23:26 Layder (4190.215.102.242)
23:26 Profexia (1190.215.102.242)
23:26 Sonick (139.47.5.227)
23:26 Donatello (139.47.5.227)
23:26 Sepultarro (139.47.5.227)

THIS IS MY SCRIPT:
Code:
function onSay(cid, words, param)
local list = {}
local ips = {}
local players = getPlayersOnline()
for i, pid in ipairs(players) do
local ip = getPlayerIp(pid)
local tmp = table.find(ips, ip)
if(tmp ~= nil) then
if(table.countElements(list, ip) == 0) then
list[players[tmp]] = ip
end
list[pid] = ip
end
table.insert(ips, ip)
end
if(table.maxn(list) > 0) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Currently online players with same IP address(es):")
for pid, ip in pairs(list) do
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getCreatureName(pid) .. " (" .. doConvertIntegerToIp(ip) .. ")")
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Currently there aren't any players with same IP address(es).")
end
return TRUE
end
 
Back
Top