Solutions
-
Apocalypse's post in (Resolvido)[Pedido] Aparecer lista de pks was marked as the answerfunction onSay(cid, words, param) local str = "PLAYERS PKS\n\n" for _, pid in pairs(getPlayersOnline()) do if getCreatureSkullType(pid) >= 3 then local skullsType = {"none", "none", "White Skull", "Red Skull", "Black Skull"} str = str .. getCreatureName(pid) .. ", " .. getPlayerLevel(pid) .. ", " .. skullsType[getCreatureSkullType(pid)] .. "\n" end end str = str == "PLAYERS PKS\n\n" and str .. "not found players pks" or str doPlayerPopupFYI(cid, str) return true end
-
Apocalypse's post in (Resolvido)Ajuda melhorar meu script was marked as the answerlocal LEVEL_VARIATION = 100 local LOSER_EXP_PER_LEVEL = 5000 function onKill(cid, target, lastHit) if not isPlayer(target) or getCreatureSkullType(target) >= 1 then return true end if getPlayerLevel(target) > 150 then return true end local TARGET_LEVEL_VARIATION = (getPlayerLevel(cid) - getPlayerLevel(target)) if TARGET_LEVEL_VARIATION >= LEVEL_VARIATION then local EXP_PUNISHMENT = TARGET_LEVEL_VARIATION * LOSER_EXP_PER_LEVEL doPlayerSendTextMessage(cid,22,'Voce foi punido por falta de honra! Matou um player com '..TARGET_LEVEL_VARIATION..' leveis de diferenca e perdeu '..EXP_PUNISHMENT..' pontos de exp.') doPlayerAddExp(cid, -EXP_PUNISHMENT) doCreatureSay(cid, "Power Abuse punido!", TALKTYPE_ORANGE_1) end return true end