function onAttack(cid, target)
local c = {storage = 1234, message = true}
if isPlayer(target) == false or isPlayer(cid) == false then
return true
end
if getPlayerVocation(cid) == getPlayerVocation(target) then
if c.message == true then
if getPlayerStorageValue(cid, c.storage) < os.time() then
setPlayerStorageValue(cid, c.storage, (os.time() + 2))
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "You can't attack a player with your same vocation.")
end
end
return false
end
return true
end