Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   custom qmenu (https://forums.graalonline.com/forums/showthread.php?t=68337)

Angel_Light 08-24-2006 11:03 PM

custom qmenu
 
Okay, I'm creating a custom qmenu and I need to know how to display all of the players weapons and stuff. without doing it individually. I made sure ever weapon img is 32 by 32 so if that helps any. :/ Any thought?

excaliber7388 08-24-2006 11:56 PM

I've been thinking about doing this as well. You could have possitions saved with an index number, and a for loop that goes through all weapons, and puts them in their place acording to the index. Although this could be a bit sloppy, and there would have to be a limit on the number of items the player can have. I'm sure there has to a better way though.

Skyld 08-25-2006 12:07 AM

PHP Code:

for (temp.weaponplayer.weapons)
{
  
// Code


temp.weapon.name will get the weapon name, and I think either temp.weapon.icon or temp.weapon.image or so will get the image (someone correct me if I am wrong).

I guess to draw all icons onto one panel, you could use a GuiDrawingPanel. Similarly you could spawn other GUI controls such as GuiBitmapButtonCtrls for each weapon.


All times are GMT +2. The time now is 06:43 PM.

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