I've been trying to make a custom inventory and while doing so I have come across a slight problem. I want to make the inventory hide the typical "-" and "*" weapons, however my check is not working. It seems as though the weapons that are named with these starting characters, are actually not (in the mind of my script).
PHP Code:
for(i=0;i<player.weapon.size();i++){
if(!player.weapon[i].name.starts("-")){
new GuiBitmapButtonCtrl("PhilSmith_Weapon_"@i){
profile=PhilSmith_HUDButtons;
x = PhilSmith_Inventory.x+(i*40);
y = PhilSmith_Inventory.y+15;
normalbitmap = temp.imgs[i];
mouseoverbitmap = temp.imgs[i];
pressedbitmap = temp.imgs[i];
width = 32;
height=32;
text=player.weapon[i].name;
}
}
}
Thanks for taking the time to look this over to help me.
