View Single Post
  #5  
Old 05-11-2008, 05:33 AM
Stryke Stryke is offline
Scripter
Join Date: Apr 2008
Posts: 157
Stryke is an unknown quantity at this point
PHP Code:
//#CLIENTSIDE
function onCreated(){ setTimer(0.05); disableselectweapons(); }

function 
onKeyPressedcodekey )
{
  if (
key == "q")
  {
    
client.qo client.qo;
  }
}

function 
onTimeout()
{
  if (
client.qo NULL)
    
hideMenu();
  else 
showMenu();
  
setTimer(0.05);
}

function 
showMenu()
{
  
thiso.qx screenwidth 100;
  
thiso.qy screenheight 100;
  
thiso.item_name NULL;
  
thiso.item_image NULL;
  
thiso.item_pos NULL;
  
thiso.item_list NULL;
  
thiso.item_count 0;
  
  for (
temp.iplayer.weapons)
  {
    if (
temp.i.name.starts("-")==0) {
      
thiso.item_name.add(temp.i.name);
      
thiso.item_image.add(temp.i.image);
      
thiso.item_pos.add(temp.i);
    }
  }
  
  new 
GuiShowImgCtrl("Inv_Window")
  {
    
thiso.qx;
    
thiso.qy;
    
width 411;
    
height 280;
    
image "cyn_inventory_gui.gif";
  
    for(
thiso.i=0thiso.i<5thiso.i++;)
    {
      for(
thiso.j=0thiso.j<4thiso.j++;)
      {
        new 
GuiShowImgCtrl("InvItem_"@thiso.item_count)
        {
          
width 32;
          
height 32;
          
thiso.qx 76 + (thiso.45);
          
thiso.qy 52 + (45*thiso.i);
          
image thiso.item_image[thiso.item_count];
          
thiso.item_list[thiso.item_count] = "InvItem_"@thiso.item_count;
          
thiso.item_count += 1;
        }
      }
    }
  }
}

function 
hideMenu()
{
  
Inv_Window.destroy();

Well, I just tried and my items won't even show up? =/

EDIT: NVM WORKS FINE. I just had to delete gx, and gy.
Reply With Quote