Boza
New Member
- Joined
- Feb 16, 2010
- Messages
- 184
- Reaction score
- 0
Will this work? (edit ok it does work) Can we also make it so spells if Pvp Disabled wont hurt players that are pvp enabled
Code:
<event type="attack" name="pvp" event="script" value="pvpsystem.lua"/>
Code:
function onAttack(cid, target)
local storage = 65535
if not isPlayer(target) then
return true
end
if(getPlayerStorageValue(cid, storage) > 0) then
doPlayerSendCancel(cid, "You have Pvp-Disabled.")
return false
end
if(getPlayerStorageValue(target, storage) > 0) then
doPlayerSendCancel(cid, "You cannot attack this player.")
return false
end
return true
end
Last edited: