View Single Post
  #10  
Old 06-16-2006, 11:36 AM
Omini Omini is offline
Millenium Owner
Join Date: Feb 2006
Location: N.Ireland
Posts: 293
Omini is on a distinguished road
Send a message via AIM to Omini Send a message via MSN to Omini Send a message via Yahoo to Omini
Yeah I've got this in

PHP Code:
function GetWeaponList()
  {
  
thiso.weapons_systems.clear();
  
thiso.weapons_guns.clear();
  
thiso.weapons_ammo.clear();
  
thiso.weapons_player.clear();
  
thiso.weapons_toys.clear();
  
thiso.weapons_other.clear();
  for(
i=0;i<player.weapons.size();i++) {
    if(
player.weapons[i].name.starts("-")) {
      
thiso.weapons_systems.add(i);
    }
    elseif(
player.weapons[i].name.starts("Guns/")) {
      
thiso.weapons_guns.add(i);
    }
    elseif(
player.weapons[i].name.starts("Ammo/")) {
      
thiso.weapons_ammo.add(i);
    }
    elseif(
player.weapons[i].name.starts("Player/")) {
      
thiso.weapons_player.add(i);
    }
    elseif(
player.weapons[i].name.starts("Toys/")) {
      
thiso.weapons_toys.add(i);
    }
    else {
      
thiso.weapons_other.add(i);
    }
  }

I'll try what Okie said then get back to you.

Edit:

Ok so I tried this
PHP Code:
function GetWeaponList()
  {
  
this.systemweapons = { "-IRC""-Playerlist""-F2LogWindow""-F1HelpWindow""-IRC_Installer""-LoadingScreen3D""-IRCEvents" };

  
temp.playeractualweapons NULL;
  for(
temp.checkweaponplayer.weapons) {
    if(
this.systemweapons.index(temp.checkweapon) < 0) {
      
temp.playeractualweapons.add(temp.checkweapon);
    }
  } 

And the bit where it shows the weapon names is (Within the GUI Window Ctrl etc etc, it was all working somewhat fine)

PHP Code:
new GuiScrollCtrl(QMenu_ItemList) {
      
awake true;
      
canmove true;
      
height QMenu_Window.height-40;
      
vscrollbar "dynamic";
      
hscrollbar "alwaysOff";
      
profile "GuiRedScrollProfile";
      
scriptlogmissingfunctions true;
      
visible true;
      
width QMenu_Window.width-80;
      
70;
      
28;
      
      for (
w=0;w<temp.playeractualweapons.size();w++) {
        new 
GuiTextCtrl("QMenu_Weapon"@w) {
          
2;
          
11;
          
width 200;
          
height 20;
          
useownprofile true;
          
profile.fontcolor = {1,1,1};
          
text temp.playeractualweapons[w].name;
        }
      }
    } 
Any suggestions?
__________________



Reply With Quote