weaponscount showimg O_o

I’m making Evi’s Qmenu and I don’t really have experience with a click style category based menu, I have the Categories done, I have the Qmenu open/close but it displays one friggin image and this is starting to annoy the piss out of me so now I’m asking for advice bLaH

So I have this so far:

Qmenu Image
Qmenu Opens/Closes
Qmenu displays Equipped item(s) (Armour, Weapon :P)
Qmenu tells Money and damage deduction.

What I need:
To make the damn weapons show
To make the weapons clickable
To make only 8 weapons show up at once and for it to scroll by 2 weapons when you hit plus (I can do the plus/minus crap, doing it later though)

for (this.item=0;this.item<weaponscount;){
this.item++ //Should set the first item :/
showimg 10002,#W(this.item),x,y;
}
}

I’m using chat controls for now, until it’s working right

I have it to where if I say + it does this.item++ so it should go to the next weapon image

Help :confused:

I’m making a Qmenu with 8 Slots showing, 4 categories (Already know how to do)
and a +/- for the page changing.

I made a thread about it with examples; a pretty shitty qmenu but yeah, it’s all in there.

This here if I’m right :stuck_out_tongue:

http://forums.graal.in/forums/showthread.php?p=7638#post7638

Right now I have this, it still doesn’t show correctly I figured if your doing

“showimg number+i”

That will make it show for multiple images.

So I have it just as

“showimg number,#W(this.whatever),x,y;”

But it’s not working out as thought and it’s annoying meh :stuck_out_tongue:

I have this:

Suggestions for those who know what they are doing?

//Inventory Version 1 By Twiggy.

if(!isweapon){
  toweapons Inventory;
}

//Q PRESSED
if (keypressed && keydown(9) && !this.on == 1){
  this.sub = 1;
  this.on = 1;
}else{
  if (keypressed && keydown(9) && this.on == 1){
    this.on = 0;
    hideall();
  }
}

//GUI CALLING IF Q WAS PRESSED
if (this.on == 1){
  changeimgmode 10000,4;
  showimg 10000,gui_inventory_evi_twiggy.png,screenwidth/2-85,screenheight/2-150;
  changeimgvis 10000,4;
  //Items
  if (this.sub == 1){
    showimg 10001,@[email protected]@Items,screenwidth/2-4,screenheight/2+97;
    changeimgcolors 10001,1,1,1,1;
    changeimgvis 10001,5;
    changeimgzoom 10001,.5;
    for(this.cat=0;this.cat<weaponscount;this.cat++;){
      if (startswith(items_,#w(this.cat))){
        showimg 10002+this.cat,#W(this.cat),screenwidth/2-145+this.cat*35-(int(this.cat/4)*35*4),screenheight/2-110+(int(this.cat/4)*35);
        changeimgvis 10002+this.cat,5;
      }
    }
  }
  //Weapons
  if (this.sub == 2){
    showimg 10001,@[email protected]@Weapons,screenwidth/2-4,screenheight/2+97;
    changeimgcolors 10001,1,1,1,1;
    changeimgvis 10001,5;
    changeimgzoom 10001,.5;
  }

  //Armours
  if (this.sub == 3){
    showimg 10001,@[email protected]@Armours,screenwidth/2-4,screenheight/2+97;
    changeimgcolors 10001,1,1,1,1;
    changeimgvis 10001,5;
    changeimgzoom 10001,.5;
  }

  //Tools
  if (this.sub == 4){
    showimg 10001,@[email protected]@Tools,screenwidth/2-4,screenheight/2+97;
    changeimgcolors 10001,1,1,1,1;
    changeimgvis 10001,5;
    changeimgzoom 10001,.5;
  }
  timeout = 0.05;
}

//GUI TELL TO's
function hideall(){
  for (i=10000; i<10300; i++){
    hideimg i;
  }
}
if (this.on == 1 && this.sub <= 0){
  this.sub = 1;
}
if (this.on == 1 && this.sub>4){
  this.sub = 4;
}

//Debug
if (playerchats && strequals(#c,+)){
  this.cat++;
}
if(playerchats && strequals(#c,-)){
  this.cat--;
}

enablefeatures allfeatures-2-4-8-0x10-0x20-0x100-0x200-0x2000-0x4000-0x8000;
showstats 256+512+1024;

Holy shit that’s fucked, I thought you knew how to script?

DOwnsider’s just pissed 'cause his mummy wouldn’t let him go trick or treating this year.

xD Yeah I can script, but I don’t script as overly complicated as you do :stuck_out_tongue:

If you saw my original Inventory you would say wtf at it’s clumpped disordered self, the amazing part is that it worked. :stuck_out_tongue:

I never work on Menus, only menu I ever really made was a Stat menu and my original messy Qmenu which is buggy as hell, small and I just don’t want to use it :stuck_out_tongue:

That’s another reason why I’ve been putting off making the menus I’m bad with showimg while I’m good with strings and just triggers

I’m hungoverish, but for starters the whole for (blah = blah; blah < weaponscount) etc I assume you want to be showing every single image in one go then? so a list.

showimg index + blah, etc, x + blah etc
changeimgvis index + blah, etc

Also there’s nothing updating the showimgs when you’re doing this.sub = w/e

Sorry I’m really to tired to be very helpful lol

Why do you have all your weapon icons showing on the same index?

Halloween’s tomorrow.

Okay, so I fixed it and made images show. Now I just need to set a cap at making only 8 show at a time, then when I say + it will scroll 2 images over to the next set of weapon images, formula for positioning is stolen from Downsiders Qmenu :stuck_out_tongue:

So what needs to be done now is just:

Capping the weapon list to 8 at a time being displayed.
Scrolling weapons.
Click setting to selectedweapon. xd

How would I cap this to make 8 show at a time?
What commands pretty much would I need?

@Downsider

Halloween is today for some :stuck_out_tongue: Depends on your timezone and religious bullock.

[php]if (keypressed && keydown(9) && !this.on == 1){
this.sub = 1;
this.on = 1;
}else{
if (keypressed && keydown(9) && this.on == 1){
this.on = 0;
hideall();
}
}[/php]

to

[php]if (keypressed && keydown(9)){
if(!this.on){
this.sub = 1;
}
else{
hideall();
}
this.on = !this.on;
}[/php]

A wild Azite appears!

It’s impervious to masterballs.