@StreamSide a little more help/direction is needed my friend. I seen the previous post, hence why I tagged Limos, however just replacing with the code he wrote didn't fix the problem.
function onStatsChange(cid, attacker, type, combat, value)
if (type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS) then
local aEvent = getPlayerStorageValue(attacker, eventConfig.indicatorStorage)
local cEvent = getPlayerStorageValue(cid, eventConfig.indicatorStorage)
if eventAreas[cEvent].etype == 1 or eventAreas[cEvent].etype == 99 then -- event most kills
if type == 1 and getCreatureHealth(cid) <= value then
local frags = getPlayerStorageValue(attacker, eventConfig.mostKillsFragCounter)
if frags == -1 then
setPlayerStorageValue(attacker, eventConfig.mostKillsFragCounter, 1)
else
setPlayerStorageValue(attacker, eventConfig.mostKillsFragCounter, frags + 1)
end
doPlayerSendTextMessage(attacker, MESSAGE_STATUS_WARNING, "You killed " .. getPlayerName(cid) .. "!" .. " You have " .. getPlayerStorageValue(attacker, eventConfig.mostKillsFragCounter) .. " frags!")
doTeleportThing(cid, eventAreas[cEvent].left)
doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
doCreatureAddMana(cid, getCreatureMaxMana(cid))
return false
end
maybe
@Lucian could help