View Single Post
  #4  
Old 06-22-2011, 11:47 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 0PiX0 View Post
Seems somewhat similar to this issue:

PHP Code:
for (temp.plfindlevel("somelevel.nw").players) {
  
//does not work
  
temp.pl.findweapon("myweapon").trigger("Event");

  
//works
  
with (temp.pl) {
    
findweapon("myweapon").trigger("Event");
  }

Try:

temp.pl.weapons[temp.pl.weapons.index((@"myweapon"))].trigger("Event");

I don't believe findweapon would be a player function. Then you could do something like this in a player-joined class:

PHP Code:
public function triggerWeapon(wepabcdef) {
  
player.weapons[player.weapons.index((@wep))].trigger(abcdef);

__________________
Quote:
Reply With Quote