• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Corrections? Please read :)

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:
Yes I have it registered in login.lua!

Few error's with it. Players that are pvp-enabled get skull when they attack pvp disabled people. (red box no dammage), And Non-pvp players can attack Pvp players with spells.

Rep For fix :D
 
Last edited:
Back
Top