View Single Post
  #8  
Old 05-11-2008, 03:14 PM
Stryke Stryke is offline
Scripter
Join Date: Apr 2008
Posts: 157
Stryke is an unknown quantity at this point
PHP Code:
function InvItem_0.onMouseDown() {
  for(
temp.i=0;temp.i<player.weapons.size();temp.i++;)
  {
    if(
player.weapons[temp.i].name == InvItem_0)
    {
      
temp.var == temp.i;
      break;
    }
  }
  
selectedweapon temp.var;

How would I make it so that if you click an item, it will equip it?
This won't work.. Also is it possible to put a function in a for statement because I don't want to make 20 function InvItem_x.onMouseDown's.
Reply With Quote