Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Announcements

    2. Forum Support

    3. Suggestions

[SA] Menu columns with variables


Another GTA Fan
 Share

Recommended Posts

Another GTA Fan

I'm having an issue with making menu columns which includes variables. If it helps, I'm creating an Inventory cleo script, and I'm trying to have it so it has the name of the item in the 1st column, while having the amount of that item in the 2nd column. I've tried creating the menu so it's using just 1 column (And it works), however the quantity is not aligned, which is why I want to do it using 2 columns, I just can't seem to figure it out.

 

Here's the entire menu panel coding I'm using, question is what do I need to change/add/remove in order for it to work as I intend?

08D4: [email protected] = create_panel_with_title 'INVENTO' position 25.0 190.0 width 310.0 columns 1 interactive 1 background 1 alignment 108D4: [email protected] = create_panel_with_title 'GPPANEL' position 25.0 120.0 width 310.0 columns 1 interactive 0 background 1 alignment 008EE: set_panel [email protected] column 0 row 0 text_1number GXT 'TEROW1' number $TEROW108EE: set_panel [email protected] column 0 row 1 text_1number GXT 'TEROW2' number $TEROW208EE: set_panel [email protected] column 0 row 2 text_1number GXT 'TEROW3' number $TEROW308EE: set_panel [email protected] column 0 row 3 text_1number GXT 'TEROW4' number $TEROW408EE: set_panel [email protected] column 0 row 4 text_1number GXT 'TEROW5' number $TEROW508EE: set_panel [email protected] column 0 row 5 text_1number GXT 'TEROW6' number $TEROW608EE: set_panel [email protected] column 0 row 6 text_1number GXT 'TEROW7' number $TEROW708EE: set_panel [email protected] column 0 row 7 text_1number GXT 'TEROW8' number $TEROW808EE: set_panel [email protected] column 0 row 0 text_1number GXT 'GOLDTO' number $TESTIN2090E: set_panel [email protected] active_row [email protected]

Similar to how the Stats Window works in the game where the stat bars are all aligned in it's respective column.

Link to comment
Share on other sites

post fxt of TEROW1,2,3,4,5,6,7 and GOLDTO

 

 

gxt must be done in this way

 

GOLDTO ~1~

Example, this is original gxt entry

 

DOLLAR $~1~
then this

 

 

[email protected] = 1308EE: set_panel [email protected] column 0 row 0 text_1number GXT 'DOLLAR' number [email protected]

shows $13 at column 0 row 0

 

 

Btw. why did you use global variables?

Edited by ZAZ
Link to comment
Share on other sites

Another GTA Fan

post fxt of TEROW1,2,3,4,5,6,7 and GOLDTO

 

TEROW1 Healing Item ~1~TEROW2 Armor Item ~1~TEROW3 Random Item ~1~TEROW4 Another Item ~1~TEROW5 Item test ~1~TEROW6 Item 6th Row ~1~TEROW7 Item ~1~TEROW8 Item Test ~1~GOLDTO ~1~
I'm actually using my own created currency with the mod rather than using the ingame currency.

 

The entire mod works as intended, and all the values are fine (If I use an item is will remove 1 of that item, and will not work if I have no items).

 

I would post an image but it's not letting me post any images on here for some reason, instead I'll type out how it looks, and how I want to get it to be:

 

What it currenty looks like ingame:

 

 

InventoryHealing Item 10Armor Item 10Random Item 10Another Item 10Item test 10Item 6th row 10Item 10Item test 10
How I'm trying to get it to be:

 

 

InventoryHealing Item           10Armor Item             10Random Item            10Another Item           10Item test              10Item 6th row           10Item                   10Item test              10
As I've said, the mod works, but the thing I'm trying to do is get the item quantity so it's aligned in a column as shown above.

 

Btw. why did you use global variables?

I'm using Gloabel Variables because I'm using many other cleo scripts that work with this mod, such as a merchant cleo that spawns an actor from where I can buy and sell items, and I'm using other actor mods that drops certain items for the inventory when they're defeated. It doesn't work using Locals, unless I combine the other scripts into the Inventory one, which seems to be more effort than what it would be worth.

 

I got them to work, though, without any bugs or glitches. It's just the alignment that's the problem here.

Link to comment
Share on other sites

ok, please note:

don't use such globals in cleo

use opcodes 0AB3: and 0AB4: to communicate between cleo scripts

 

The expression var together with a number, <var><space><number> builds the Special Global Cleo Variable

 

 

0AB3: var 0 = 10or0006: [email protected] = 10 // integer values0AB3: var 0 = [email protected]
and

 

0AB4: [email protected]= var 0
var 0 up to var 999 will be stored, in exemble var 0 is stored with 10

 

to get then stored value into your script needs to submit into a local:

 

0AB4: [email protected] = var 44if0039: [email protected] == 1 // integer valuesthen//codeend
when making savegame, then the var content will be stored in the CLEO_SAVES files Edited by ZAZ
Link to comment
Share on other sites

Another GTA Fan

I've figured it out. It's all working with the columns now.

 

As for the Globals, I will take note of what you said and try them out to replace the Globals, so I appreciate that, as for the original issue, it's been solved now.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.