beliar34
Member
- Joined
- Feb 28, 2012
- Messages
- 307
- Solutions
- 7
- Reaction score
- 11
I was looking for anti aoe script i make my own what works but with bugs and then i make this one:
This script works but i cant mark player any help plz 
Code:
function onStatsChange(cid, attacker, type, combat, value)
if(attacker and isPlayer(attacker) and (type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS) and getCreatureName(getCreatureTarget(attacker)) ~= getCreatureName(cid)) then
if combat ~= COMBAT_HEALING then
return doPlayerSendCancel(cid, 'You must mark player.') and false
end
end
return true
end
function onCombat(cid, target)
if(target and isPlayer(target) and getCreatureName(getCreatureTarget(cid)) ~= getCreatureName(target)) then
return doPlayerSendCancel(cid, 'You must mark player.') and false
end
return true
end