waqmaz
Member
- Joined
- Jun 17, 2015
- Messages
- 203
- Reaction score
- 11
Hello there. The script works, but "return false" doesn't prevent onCombat function.
I want the function above to prevent the built-in game function onCombat below:
What am I doing wrong? Why does return false does not work? If i put "return false" instead of check(cid) in onCombat function, then it works. But with function it doesn't. Thanks!!!
Code:
local function check(cid)
if isPlayer(cid) then
return false
end
return true
end
I want the function above to prevent the built-in game function onCombat below:
Code:
function onCombat(cid, target)
if getCreatureName(target) == 'monster'
check(cid)
end
return true
end
What am I doing wrong? Why does return false does not work? If i put "return false" instead of check(cid) in onCombat function, then it works. But with function it doesn't. Thanks!!!