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

{C++} PVP System (onTarget) and Only have skull when deal damage

Fresh

Quack!
Joined
Oct 21, 2009
Messages
1,855
Solutions
18
Reaction score
665
Hello.
Anyone can give/make code for me:
1) When I target player i can only damage him from spell/melee (the player targeted) if someone is near targeted player he dont receive any damage (only person who I target);
2) Now we have something like that: if we target opponent we receive skull anyone know how to edit this to that: If we DEAL damage to opponent we receive skull (if we target we don't receive white skull only when we deal damage)
 
i tried to edit this but it's not working properly - the skull is appear when i target ;/
I must doing something bad but idk what is my mistake ...

@Mazen, thanks for true ;D
 
if i didn't miss understood you
for your first issue you could use something like this in lua
LUA:
function onCombat(cid, target)
	if isPlayer(cid) and isPlayer(target) then
		if not (getCreatureTarget(cid) == target) then
			return false
		end
	end
	return true
end
 
Back
Top