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

Lag when pepole die

naod123456

Wazzaap
Joined
Mar 28, 2013
Messages
242
Reaction score
4
When people die in my server the whole server lags i got no idea why :/ any help?

anyone?
 
Last edited by a moderator:
When people die in my server the whole server lags i got no idea why :/ any help?

You think this is enough of information for anyone to help you?
We need more details, server version and client is a good start.

Do you have any custom onDeath functions?
 
You think this is enough of information for anyone to help you?
We need more details, server version and client is a good start.

Do you have any custom onDeath functions?

Ehh, ok i use a war server tfs 0.4 client 8.6, i dont understand what you mean with "onDeath functions, but i got one thing when players kill sombody they got a reward (its a eye when then get 100 eye then can change it for exp scrolls)
 
Look for kill, death and preparedeath scripts in creaturescripts, then unregister them temporary to test if 1 of them is causing the lagg.
If the lagg stops when they are all unregistered, you can test which one is causing it by readding/registering them 1 by 1.
 
Ehh, ok i use a war server tfs 0.4 client 8.6, i dont understand what you mean with "onDeath functions, but i got one thing when players kill sombody they got a reward (its a eye when then get 100 eye then can change it for exp scrolls)

Could be that script which cause this. Do as @Limos said, unregister them from .xml file until you find the buggy one.
 
Look for kill, death and preparedeath scripts in creaturescripts, then unregister them temporary to test if 1 of them is causing the lagg.
If the lagg stops when they are all unregistered, you can test which one is causing it by readding/registering them 1 by 1.
Yeah i found it it was that eye script, ut i dont whant to remove it :( because without it they must kill players to get exp its a war server this is how the script looks

Code:
function onDeath(cid, corpse, deathList)
local reward = {
        item = 11197,
        count = 1
}
    for i = 1, #deathList do
        if isPlayer(cid) and isPlayer(deathList[i]) then
            --[[if getPlayerIp(cid) ~= getPlayerIp(deathList[i]) then    ]]--   
                if getPlayerItemCount(deathList[i], reward.item) > 0 then
                    local item = getPlayerItemById(deathList[i], true, reward.item)
                    if item.type >= ITEMCOUNT_MAX then
                        doPlayerAddItem(deathList[i], reward.item, reward.count)
                        doCreatureSetStorage(deathList[i], 20233, getPlayerStorageValue(deathList[i], 20233)+1)
                        doSendAnimatedText(getPlayerPosition(deathList[i]), "Frag!", TEXTCOLOR_RED)
                    else
                        doTransformItem(item.uid, reward.item, item.type + 1)
                        doCreatureSetStorage(deathList[i], 20233, getPlayerStorageValue(deathList[i], 20233)+1)
                        doSendAnimatedText(getPlayerPosition(deathList[i]), "Frag!", TEXTCOLOR_RED)
                    end
                else
                    doPlayerAddItem(deathList[i], reward.item, reward.count)
                    doCreatureSetStorage(deathList[i], 20233, getPlayerStorageValue(deathList[i], 20233)+1)
                    doSendAnimatedText(getPlayerPosition(deathList[i]), "Frag!", TEXTCOLOR_RED)
                end
            --[[else
                doPlayerSendTextMessage(deathList[i], 18, "You didn't get frag/reward because of killing a player with same ip.")
               
            end ]]--
        end
    end
    return true [code/]
end
 
Back
Top