• 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!

Storage problem :c

ka0zstyle

New Member
Joined
Oct 30, 2009
Messages
128
Reaction score
2
I have a problem with my script in order that the players who have the same script could not fight between them, it does not work:S already I put the storage to both players but if they can combat :S

teamattack.lua (data/creaturescript/scripts)
Code:
function onCombat(cid, target)
if isPlayer(target) then
         return true
end
if getCreatureStorage(cid, 25304) == getCreatureStorage(target, 25304) then
         return false
     end
     return true
end

data/creaturescript/creaturescript.xml
Code:
    <event type="combat" name="teamattack" event="script" value="teamattack.lua"/>
 
Code:
local storage = 25304
function onCombat(cid, target)
    if isPlayer(target) and isPlayer(cid) then
        if getCreatureStorage(cid, storage) == getCreatureStorage(target, storage) then
            return false
        end
    end
    return true
end
 
Back
Top