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.checkweapon: player.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;
x = 70;
y = 28;
for (w=0;w<temp.playeractualweapons.size();w++) {
new GuiTextCtrl("QMenu_Weapon"@w) {
x = 2;
y = w * 11;
width = 200;
height = 20;
useownprofile = true;
profile.fontcolor = {1,1,1};
text = temp.playeractualweapons[w].name;
}
}
}
Any suggestions?