Kayan
Active Member
Hello i need this command ony for gods use.
Please help x,x
Code:
--Adam 2008
--Collapser OT
--Adam 2008
--Collapser OT
function onSay(cid, words, param)
playerlist = "Players Multiclienting:"
lastest_ip = 0
online = 0
dofile("./config.lua")
env = assert(luasql.mysql())
con = assert(env:connect(mysqlDatabase, mysqlUser, mysqlPass, mysqlHost, mysqlPort))
cur = assert(con:execute("SELECT `lastip` FROM `players` WHERE `online` = '1' Group By lastip Having Count(*) > 1;"))
row = cur:fetch({}, "a")
while row do
players = assert(con:execute("SELECT `name` FROM `players` WHERE `lastip` = "..row.lastip.." and `online` = '1';"))
prow = players:fetch({}, "a")
if prow ~= nil then
while prow do
if row.lastip == lastest_ip then
playerlist = playerlist.."\n "..prow.name
else
decip = findIP(row.lastip)
playerlist = playerlist.."\n\nIP: "..decip.."\n "..prow.name
lastest_ip = row.lastip
end
prow = players:fetch (prow, "a")
end
end
row = cur:fetch (row, "a")
end
cur:close()
doShowTextDialog(cid, 1026, playerlist)
end
function findIP(IP)
local ip=string.format("%X",IP)
local string1=string.sub(ip,7,8)
local string2=string.sub(ip,5,6)
local string3=string.sub(ip,3,4)
local string4=string.sub(ip,1,2)
local decip=tonumber(string1, 16).."."..tonumber(string2, 16).."."..tonumber(string3, 16).."."..tonumber(string4, 16)
return decip
end
Please help x,x