ausirosiris
Member
- Joined
- May 23, 2020
- Messages
- 105
- Reaction score
- 22
Need a quick function to stop attacking a player
Oh, Im sorry. Its a tfs 0.4You must write the version of the engine you use.
Thank you for your answer. But what im trying to do this is not related to this!
<event type="combat" name="disable_combat" event="script" value="disable_combat.lua"/>
function onCombat(cid, target)
if getPlayerStorageValue(cid, 128) ~= 1 then
doPlayerSendCancel(cid, "You cannot attack.")
return false
end
return true
end
registerCreatureEvent(cid, "disable_combat")