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

pvp option script

agomez

Member
Joined
Jan 28, 2009
Messages
211
Reaction score
5
:D! I have ths script, it should makes when a player have a group id =2 he cant attack any player or bee attacked, and when a player have the group id = 1 he can attack all players with groupid 1 or been atacked by other eople with groupid 1 :p but isnt workng :/

PHP:
function onCombat(cid, target)
	if isPlayer(target) and (getPlayerGroupId(cid) == 2 or getPlayerGroupId(target) == 2) then
		return not doPlayerSendCancel(cid, 'You cannot attack this player.')
	end
	return true
end
i hope someone help me
 
Not sure...try this
Lua:
function  onCombat(cid, target)
if(isPlayer(cid) and isPlayer(target)) then
if(getPlayerGroupId(cid) == 2) == getPlayerGroupID(target)) then
return false
end
return true
end
 
Lua:
function onCombat(cid, target)
if isPlayer(cid) and isPlayer(target) then
   if getPlayerGroupId(cid) == 2 or getPlayerGroupId(target) == 2 then
   return doPlayerSendCancel(cid, "You cannot attack this player") and false
   end
 end
return true
end
 
Back
Top