• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

X vocation can't attack y vocation.

Chefen

Member
Joined
Apr 26, 2008
Messages
66
Reaction score
9
I'm requesting a script/mod/whatever that allows me to disable pvp between certain vocations. Example: Vocation 1 can't attack vocations 1,2,3 and 4 but can still attack vocation 5,6,7 and 8. If something like this is possible I'll be forever grateful! +rep for anyone that tries ofcourse :)
 
PHP:
function onCombat(cid, target)
	if isPlayer(target) and (getPlayerVocationId(cid) == 2 or getPlayerVocationId(target) == 2) then
		return not doPlayerSendCancel(cid, 'You cannot attack this player.')
	end
	return true
end
if it didnt work change:
PHP:
(getPlayerVocationId(cid)
for
PHP:
(getPlayerVocId(cid)
or i dont know maybe you can edit it :p
 
Code:
function onCombat(cid, target) 
   if (isPlayer(cid) and isPlayer(target)) then  
   if getPlayerPromotionLevel(cid) == 0 and getPlayerPromotionLevel(target) == 1 then
         doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUMAYNOTATTACKTHISPLAYER)  
         return FALSE
   end
   end
return TRUE 
end
 
Back
Top