Rush Chadwick
Stewie Griffin
Well this [TalkAction] taught by means of a list, when the player is using the Mc.
This is detected when there are 2 Characters playing in the same IP ...
Copy and paste a file .Lua and erase everything that is within
And put this:
Copy and save it and name it "Multichek"
Let's put this in Talkactions.xml
Regards, ^_^
This is detected when there are 2 Characters playing in the same IP ...
Copy and paste a file .Lua and erase everything that is within
And put this:
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
Copy and save it and name it "Multichek"
Let's put this in Talkactions.xml
Code:
<talkaction words="ips!" script="Multichek.lua"/>
Regards, ^_^