View Single Post
  #6  
Old 09-16-2010, 06:30 AM
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
pass player.account as a parameter then.

Here's a little example that might help you understand parameters a bit better.

PHP Code:
function onPlayerEnters() {
  
this.trigger("Example""random"12player.account36);
}

function 
onExample(abaccc) {
  echo(
a); // same as echo(params[0]);
  
echo(b); // same as echo(params[1]);
  
echo(acc); // same as echo(params[2]);
  
echo(c); // same as echo(params[3]);

When you get to the point where you have a working 'attacker' parameter you can then just do (assuming you have an EXP like the one I posted here)..

findplayer(attacker).addEXP(amount);
__________________
Quote:
Reply With Quote