View Single Post
  #4  
Old 04-02-2010, 04:22 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Quote:
Originally Posted by DrakilorP2P View Post
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(damageattacker) {
  
// 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.
__________________
Quote:
Reply With Quote