dewral
Veteran OT User
- Joined
- Dec 4, 2019
- Messages
- 343
- Solutions
- 10
- Reaction score
- 351
Hello im using something like this in events to stop players geting skull from AOE damage:
It's working as it supposed to be but when im using this my fire fields don't working after stepping im getting this
Tried just like that and fields working but now the secure mode isn't working properly and i can damage players from UE.
Any help?
Lua:
function Creature:onTargetCombat(target)
if hasEventCallback(EVENT_CALLBACK_ONTARGETCOMBAT) then
return EventCallback(EVENT_CALLBACK_ONTARGETCOMBAT, self, target)
elseif self:isPlayer() and target:isPlayer() and self:hasSecureMode() then
return RETURNVALUE_YOUMAYNOTATTACKTHISPLAYER
else
target:registerEvent("Vocations")
return RETURNVALUE_NOERROR
end
end
It's working as it supposed to be but when im using this my fire fields don't working after stepping im getting this
Lua:
elseif attacker and self:isPlayer() and target:isPlayer() and self:hasSecureMode() then
return RETURNVALUE_YOUMAYNOTATTACKTHISPLAYER
Any help?