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?
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?
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)
Yeah i found it it was that eye script, ut i dont whant to remove itLook 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.
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