Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --## config ##
- local maxPlayersByIp = 1
- function onStatsChange(cid, attacker, type, combat, value)
- if type == STATSCHANGE_HEALTHLOSS then -- se for perda de health
- if isPlayer(cid) and isPlayer(attacker) then -- se atacante e atacado forem players
- local cidIp = getPlayerIp(cid) -- ip atacado
- local arrayPlayersByCidIp = getPlayersByIp(cidIp) -- lista de todos os player para cidIp
- if #arrayPlayersByCidIp > maxPlayersByIp then -- se houver mais de 'maxPlayersByIp' players para esse ip
- doCreatureAddHealth(cid, -value) -- retira de cid(atacado) o mesmo valor que o damage causaria
- return false -- retornando false ele não retira a vida por combat, logo não concetriza um kill e obviamente não deixa skull
- end
- end
- end
- return true
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement