Quote:
Originally Posted by DrakilorP2P
Send the attacker as a parameter with the triggeraction?
|
Ideal way to do it, testplayer is a jerk and doesn't play nice around NPC decorations.
In your melee weapon system:
triggeraction(x, y, "damage", damageAmount, player.account);
Then in your damage system that catches the damage triggers:
PHP Code:
//#CLIENTSIDE
function onActionDamage(damage, attacker) {
// Find attacker
temp.obj = findplayer(attacker);
// Check if in same guild (Example)
if (temp.obj.guild == player.guild && player.guild.length() > 0) return;
// Other damage system code
}
It's important to note that you won't be able to access other player's client/clientr variables on the clientside, so you'll have to process those checks on the serverside.