Post: How to make a cool hud for current mod (x/25)
01-23-2012, 03:38 AM #1
(adsbygoogle = window.adsbygoogle || []).push({}); Alright this is pretty simple

Add this where the HUD for menu is created:

    
self.cmtext = createFontString("default", "1.8");


basically make this when your menu updates, or wherever you init your menu.

add this:
    
self thread countMods();


here is the actually snippet
    
countMods()
{
self endon("death");
self endon("disconnect");
for(i = self.myCurz; i < self.menText.sizeWinky Winky
{
self.cmtext setText("Mod :" + self.myCurz[i] + "/" + self.menText.size);
}
}


now you have to notice some things.
self.cmtext = the current mod text, leave that alone.
myCurz is the cursor option which is hovered over. or the option going to be called. Look in the menu base and you find this out. usually named mCurs, or mOpt

self.menText.size is the max amount of your menu, it should also be called something different. mText, or iText etc.. this is your actuall names of your mods in your menu.

use this however, and thanks or reading this tut! :y:
(adsbygoogle = window.adsbygoogle || []).push({});

The following 3 users groaned at Jakes625 for this awful post:

247Yamato, Taylor, zxz0O0
01-23-2012, 03:49 AM #2
Originally posted by SatanicHispanic View Post
Alright this is pretty simple

basically make this when your menu updates, or wherever you init your menu.

add this:
    
self thread countMods();


here is the actually snippet
    
countMods()
{
self endon("death");
self endon("disconnect");
self.cmtext = createFontString("default", "1.8");
for(i = self.myCurz; i < self.menText.sizeWinky Winky
{
self.cmtext destroy();
wait 0.1;
self.cmtext setText("Mod :" + self.myCurz[i] + "/" + self.menText.size);
}
}


now you have to notice some things.
self.cmtext = the current mod text, leave that alone.
myCurz is the cursor option which is hovered over. or the option going to be called. Look in the menu base and you find this out. usually named mCurs, or mOpt

self.menText.size is the max amount of your menu, it should also be called something different. mText, or iText etc.. this is your actuall names of your mods in your menu.

use this however, and thanks or reading this tut! :y:
what is this because it will overflow :/

The following 3 users say thank you to IELIITEMODZX for this useful post:

INSAN3LY_D34TH, Karoolus, x_DaftVader_x
01-23-2012, 04:47 AM #3
Originally posted by IELIITEMODZX View Post
what is this because it will overflow :/


It shouldn't, it destroys before it recreates. And I use it in my patch and never got an overflow.


It basically prints on screen your current mod option your on.

Mod: 4 out of 20

20 being the size Of the menu,

Just something new for this section
01-23-2012, 07:42 AM #4
Originally posted by SatanicHispanic View Post
It shouldn't, it destroys before it recreates. And I use it in my patch and never got an overflow.


It basically prints on screen your current mod option your on.

Mod: 4 out of 20

20 being the size Of the menu,

Just something new for this section
Doesn't matter if you destroy it or not. Once text is created it is in the cache and it WILL overflow...

The following 2 users say thank you to x_DaftVader_x for this useful post:

Karoolus
01-23-2012, 10:30 PM #5
Originally posted by x. View Post
Doesn't matter if you destroy it or not. Once text is created it is in the cache and it WILL overflow...


alright well I'm a basic GSC scripter so give me some hints etc.

thanks, unlike douches that say **** off, for me trying to do something for myself. ://

---------- Post added at 06:30 PM ---------- Previous post was at 06:03 PM ----------

Originally posted by Badman.
This wont work the way you want it to, I'm not even sure it would run the script.


what if you create the text on player connect, and then just setText.

that would not overflow :3
01-23-2012, 11:02 PM #6
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by SatanicHispanic View Post
what if you create the text on player connect, and then just setText.

that would not overflow :3


Whether you create the text on onplayerconnect or not it will still overflow eventually after 24 text strings Winky Winky.
01-23-2012, 11:59 PM #7
Originally posted by IVI40A3Fusionz View Post
Whether you create the text on onplayerconnect or not it will still overflow eventually after 24 text strings Winky Winky.
24 strings :/ you can have more than that

The following user thanked IELIITEMODZX for this useful post:

01-24-2012, 12:31 AM #8
Originally posted by IVI40A3Fusionz View Post
Whether you create the text on onplayerconnect or not it will still overflow eventually after 24 text strings Winky Winky.


yes, but it's only creating one text string. so how would it overflow?

it just updates the text, not creating a whole new string, and if you use setData, or setNumber or something like that you can have tons, and no overflow.
01-24-2012, 01:07 AM #9
/RunDos/
Prime Rib
nice one mate
01-24-2012, 05:28 PM #10
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by IELIITEMODZX View Post
24 strings :/ you can have more than that


Before the 'overflow fix' after 24 strings my game would overflow :\.

---------- Post added at 05:28 PM ---------- Previous post was at 05:27 PM ----------

Originally posted by SatanicHispanic View Post
yes, but it's only creating one text string. so how would it overflow?

it just updates the text, not creating a whole new string, and if you use setData, or setNumber or something like that you can have tons, and no overflow.


Everytime you change the color using ^(THEN A NUMBER) or change the text it creates a new text string.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo