Magictibiaman
New Member
- Joined
- May 25, 2009
- Messages
- 371
- Reaction score
- 0
3513 = team white
3514 = team black
this code acts like no friendly fire inside an event
For some reason it is not reading my creature script.
I placed these error messages inside my code, and they work as debug testing to my dismay none of them went off so i don't understand why it's not working?
did i mess up my xml? cause this script doesn't cause any errors
3514 = team black
this code acts like no friendly fire inside an event
For some reason it is not reading my creature script.
I placed these error messages inside my code, and they work as debug testing to my dismay none of them went off so i don't understand why it's not working?
did i mess up my xml? cause this script doesn't cause any errors
Code:
function onCombat(cid, target)
if isPlayer(target) then
if (getPlayerStorageValue(target, 3513) == 1) and (getPlayerStorageValue(cid, 3513) == 1) then
doBroadcastMessage("Error0a?")
doPlayerSendCancel(target, "You may not attack your team mates.")
return false
elseif (getPlayerStorageValue(target, 3514) == 1) and (getPlayerStorageValue(cid, 3514) == 1) then
doBroadcastMessage("Error0b?")
doPlayerSendCancel(target, "You may not attack your team mates.")
return false
else
doBroadcastMessage("Error1?")
return true
end
doBroadcastMessage("Error2?")
end
doBroadcastMessage("Error3?")
return true
end
Code:
<event type="combat" name="CTFteam" event="script" value="Ctfteam.lua" />