• 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!

No Friendly Fire

Zor

New Member
Joined
Mar 23, 2010
Messages
13
Reaction score
0
How do i make it so when people are on a team (not a party) and
they have the same storage values 5010 and 5010 then they can't attack each other?
 
Code:
function onCombat(cid, target)
	if isPlayer(target) then
		if getPlayerStorageValue(cid, 5010) > 0 and getPlayerStorageValue(target, 5010) > 0 then
			if getPlayerStorageValue(cid, 5010) == getPlayerStorageValue(target, 5010) then
				return doPlayerSendCancel(cid, "You cannot attack your teammates.")
			end
		end
	end
return true
end
 
Back
Top