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

See it pls

Stewie

Family Guy # ;3
Joined
May 3, 2010
Messages
786
Reaction score
12
Location
TV
Hi,thi smo caused lag on my server.

Code:
[Warning - ProtocolGame::sendFYIBox] Trying to send an empty or too huge message.

LUA:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Kill Rank" enabled="yes">
    <config name="killrank_config"><![CDATA[
        limit = 10
    ]]></config>
    <talkaction words="!rankkill" event="buffer"><![CDATA[
        domodlib('killrank_config')
        local t, ret = {}, "Top " .. math.min(limit, getWorldCreatures(0)) .. " fraggers online:"
        for _, cid in ipairs(getPlayersOnline()) do
            table.insert(t, {cid, db.getResult("SELECT COUNT(*) as count FROM killers WHERE death_id IN (SELECT kill_id FROM player_killers) AND " .. getPlayerGUID(cid) .. " IN (SELECT player_id FROM player_killers WHERE kill_id = death_id)"):getDataInt("count")})
        end
        table.sort(t, function(a,b) return a[2] > b[2] end)
        for i = 1, math.min(#t, limit)  do
            ret = ret .. "\n" .. i .. ". " .. getPlayerName(t[i][1]) .. " - " .. t[i][2] .. " frags"
        end
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, ret)
    ]]></talkaction>
</mod>

Anyone can remove lag?


Thx
 
that's normal i guess because it is getting data from the db... maybe u need to make ur internet connection fasteR? :ninja:
 
what about that?
LUA:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Kill Rank" enabled="yes">
    <config name="killrank_config"><![CDATA[
        limit = 10
    ]]></config>
    <talkaction words="!rank" event="buffer"><![CDATA[
        domodlib('killrank_config')
function get()
	local res = db.getResult("SELECT COUNT(*) as count FROM killers WHERE death_id IN (SELECT kill_id FROM player_killers) AND " .. getPlayerGUID(cid) .. " IN (SELECT player_id FROM player_killers WHERE kill_id = death_id)")
	local value = 0
	if(res:getID() ~= -1) then
		value = res:getDataInt("count")
		res:free()
	end
	return value
end
        local t, ret = {}, "Top " .. math.min(limit, getWorldCreatures(0)) .. " fraggers online:"
        for _, cid in ipairs(getPlayersOnline()) do
            table.insert(t, {cid, get()})
        end
        table.sort(t, function(a,b) return a[2] > b[2] end)
        for i = 1, math.min(#t, limit)  do
            ret = ret .. "\n" .. i .. ". " .. getPlayerName(t[i][1]) .. " - " .. t[i][2] .. " frags"
        end
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, ret)
    ]]></talkaction>
</mod>
 
Back
Top