Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-27-2006, 07:19 PM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
Custom Qmenu

I have made a custom qmenu and I need to know how to display all the player weapons, on Niromia every weapon img is 32 by 32 (pixels). So how do I display all the weapons with images.
__________________
Deep into the Darkness peering...
Reply With Quote
  #2  
Old 08-28-2006, 05:17 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Make a loop go through all the players weapons, and display an image for each of them?
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #3  
Old 08-28-2006, 07:43 PM
contiga contiga is offline
Graal2001 Administration
contiga's Avatar
Join Date: Jul 2004
Location: Netherlands
Posts: 419
contiga is an unknown quantity at this point
Send a message via ICQ to contiga Send a message via AIM to contiga Send a message via MSN to contiga Send a message via Yahoo to contiga
Quote:
Originally Posted by excaliber7388
Excelent I also plan to script one, I hope you don't mind me using this as a base
Ofcourse you can use that as base! Just change player.weapons to an array with weapons you actually want to draw. Something that could make a selection of weapons that you'd like to draw / not to draw:

PHP Code:
temp.wlist.clear();
temp.disabled = { "-""+"};
for ( 
iplayer.weapons) {
  for ( 
jtemp.disabled) {
    if ( !
i.name.startsj))
      
temp.wlist.add( { i.namei.image});
  }
}

for ( 
0temp.wlist.size(); ++) {
  
with findImg200 i)) {
    
image temp.wlisti][ 1];
    
start x + ( space_between_items_horizontal 32 * ( ammount_of_items_horizontal));
    
start y + ( space_between_items_vertical 32 intammount_of_items_horizontal));
    
layer 4;
  }

Good luck with it! If you have any questions, feel free to ask.
__________________
AIM: Contiga122
MSN: [email protected]
Status:
Quote:
Originally Posted by unixmad View Post
I am also awake 3AM to help correct problems.
Quote:
Originally Posted by Bomy Island RC people
Daniel: HoudiniMan is a bad guy =p
*Bell: rofl. I first read that as houdini is a bad man. like the little kid that wants his mommy to keep her away from that boogie man
Daniel: xD
*Rufus: I wouldn't want my kids around him.

Last edited by contiga; 08-29-2006 at 09:52 AM..
Reply With Quote
  #4  
Old 08-29-2006, 01:33 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
Thank-you you two!
__________________
Deep into the Darkness peering...
Reply With Quote
  #5  
Old 08-29-2006, 02:31 AM
excaliber7388 excaliber7388 is offline
Banned
excaliber7388's Avatar
Join Date: Jul 2005
Location: US
Posts: 5,229
excaliber7388 can only hope to improve
Send a message via AIM to excaliber7388
Quote:
Originally Posted by contiga
For drawing players weapons use:
PHP Code:
for ( 0player.weapons.size(); ++) {
  
with findImg200 i)) {
    
image player.weaponsi].image;
    
start x + ( space_between_items_horizontal 32 * ( ammount_of_items_horizontal));
    
start y + ( space_between_items_vertical 32 intammount_of_items_horizontal));
    
layer 4;
  }

Change:
space_between_items_horizontal
space_between_items_vertical
ammount_of_items_horizontal
Into what you want that thing to be.
Excelent I also plan to script one, I hope you don't mind me using this as a base
Reply With Quote
  #6  
Old 08-29-2006, 09:53 AM
contiga contiga is offline
Graal2001 Administration
contiga's Avatar
Join Date: Jul 2004
Location: Netherlands
Posts: 419
contiga is an unknown quantity at this point
Send a message via ICQ to contiga Send a message via AIM to contiga Send a message via MSN to contiga Send a message via Yahoo to contiga
Oh see my first post, I edited it instead of creating new one x-x
__________________
AIM: Contiga122
MSN: [email protected]
Status:
Quote:
Originally Posted by unixmad View Post
I am also awake 3AM to help correct problems.
Quote:
Originally Posted by Bomy Island RC people
Daniel: HoudiniMan is a bad guy =p
*Bell: rofl. I first read that as houdini is a bad man. like the little kid that wants his mommy to keep her away from that boogie man
Daniel: xD
*Rufus: I wouldn't want my kids around him.
Reply With Quote
  #7  
Old 08-29-2006, 03:05 PM
Rapidwolve Rapidwolve is offline
Registered User
Join Date: Jul 2006
Posts: 1,241
Rapidwolve is an unknown quantity at this point
Quote:
Originally Posted by contiga
Oh see my first post, I edited it instead of creating new one x-x
Lol I was wondering wtf?
Reply With Quote
  #8  
Old 09-01-2006, 08:39 PM
contiga contiga is offline
Graal2001 Administration
contiga's Avatar
Join Date: Jul 2004
Location: Netherlands
Posts: 419
contiga is an unknown quantity at this point
Send a message via ICQ to contiga Send a message via AIM to contiga Send a message via MSN to contiga Send a message via Yahoo to contiga
Oops, I just see I made a fault;
PHP Code:
this.wlist.clear();
temp.disabled = { "-""+"};
for ( 
iplayer.weapons) {
  for ( 
jtemp.disabled) {
    if ( !
i.name.startsj))
      
this.wlist.add( { i.namei.image});
  }
}

for ( 
0this.wlist.size(); ++) {
  
with findImg200 i)) {
    
image thiso.wlisti][ 1];
    
start x + ( space_between_items_horizontal 32 * ( ammount_of_items_horizontal));
    
start y + ( space_between_items_vertical 32 intammount_of_items_horizontal));
    
layer 4;
  }

What was wrong? I did temp.wlist, which isn't realy wrong, to make a list.. but it couldn't load within the with ( findImg( 200 + i)) { // stuff } part. This is an update, that should work.
__________________
AIM: Contiga122
MSN: [email protected]
Status:
Quote:
Originally Posted by unixmad View Post
I am also awake 3AM to help correct problems.
Quote:
Originally Posted by Bomy Island RC people
Daniel: HoudiniMan is a bad guy =p
*Bell: rofl. I first read that as houdini is a bad man. like the little kid that wants his mommy to keep her away from that boogie man
Daniel: xD
*Rufus: I wouldn't want my kids around him.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:08 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.