Post: [TUT] Colourful Mod Menu Scroll
01-24-2011, 08:59 PM #1
d7w7z
Bounty hunter
(adsbygoogle = window.adsbygoogle || []).push({}); I seen a lot of people asking about this so I figured I would post it.
It basicly picks a different colour for highlighting everytime you scroll up/down in your mod menu.

[ame]https://www.youtube.com/watch?v=9SQ3RkpnRLU[/ame]
NOTE - It sometimes repeats the same colour Eek

Open up missions.gsc and Search for something similar to this.
    drawMenu( cycle, scroll ){
menu = [[self.getMenu]]();
display = [];
if( menu.size > 2 ){

Yours may be different depending on what patch you are using.

Once you have found drawMenu add this after display = [];
    j=[];
j[0]="1";
j[1]="2";
j[2]="3";
j[3]="4";
j[4]="5";


So it will now look something like this.
    drawMenu( cycle, scroll ){
menu = [[self.getMenu]]();
display = [];
j=[];
j[0]="1";
j[1]="2";
j[2]="3";
j[3]="4";
j[4]="5";
if( menu.size > 2 ){


Now once that is done scroll down till you see something like this
    if(i == scroll) {
display[i] setText( "^1" +menu[cycle].name[i] );


Change the "^1" to "^" with the quotation marks.
Now add this after the after the "^"
    +j[randomint(j.size)] 


The outcome will look something like this.
    if(i == scroll) {
display[i] setText( "^"+j[randomint(j.size)] +menu[cycle].name[i] );



Changing The Colours
Scroll back up to
    j=[];
j[0]="1";
j[1]="2";
j[2]="3";
j[3]="4";
j[4]="5";


For example
    j[0]="1";

The "1" is the colour which in this case is red.

If I changed it to
    j[0]="2";
This would be green and so on.

Colour Codes
^0 - Black
^1 - Red
^2 - Green
^3 - Yellow
^4 - Blue
^5 - Cyan
^6 - Pink
^7 - White
^8 - Default map colour
^9 - Grey or default map colour
(adsbygoogle = window.adsbygoogle || []).push({});

The following 15 users say thank you to d7w7z for this useful post:

_StAtEaMiNd_, Alfa, Blackstorm, cjmurder123, firefox7, FourzerotwoFAILS, icemantom95, iJokaa, ImTrippinHoes, iNexus, Mw2Freak13, RaverBoy, TRBZA, xTrYiPiCz, yaro
01-24-2011, 11:49 PM #20
d7w7z
Bounty hunter
Originally posted by Clayface View Post
anybody know what makes the mod menu cursor appear on top of the list once you've reached the bottom of the list, or pressing up takes you to the bottom

Im not 100% sure but I think its got something to do with
    CheckScroll(){
01-25-2011, 12:10 AM #21
DEREKTROTTER
You're Goddamn Right
or do:

    
if(i==scroll){
r=randomint(255);
g=randomint(255);
b=randomint(255);
display[i].color = ((r/255),(g/255),(b/255));

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

Blackstorm, d7w7z
01-25-2011, 12:14 AM #22
Blackstorm
Veni. Vidi. Vici.
Very nice but i did it a much smaller and simpler way lol Mine also has random color glow Smile Good try though.

EDIT: Just saw derek's post above that's how i did it lol
01-25-2011, 12:16 AM #23
DEREKTROTTER
You're Goddamn Right
Originally posted by TheEliteMossy View Post
Tip: To stop the text overflow errors, stop calling SetText too much Winky Winky


this is the key to fixing overflows, right :carling:

You must login or register to view this content.

just a matter of re-coding
01-25-2011, 12:16 AM #24
d7w7z
Bounty hunter
Originally posted by DEREKTROTTER View Post
or do:

    
if(i==scroll){
r=randomint(255);
g=randomint(255);
b=randomint(255);
display[i].color = ((r/255),(g/255),(b/255));

You could do that too lol... I just posted this because my friend asked me how to do it and he said I should post it so I did. Im rubbish with menu editing anyway Winky Winky

The following user thanked d7w7z for this useful post:

iJokaa
01-25-2011, 12:54 AM #25
Didn't work for me IDK y I also go from 227 to 99kb
01-25-2011, 01:13 AM #26
d7w7z
Bounty hunter
Originally posted by Sn1PaXx View Post
Didn't work for me IDK y I also go from 227 to 99kb
You probly made an error converting your patch.
01-25-2011, 01:48 AM #27
Yeah I did

Also what's the dvar for map size?

self setClientDvar("compassSize", 0.0001);

I just used DT way
01-25-2011, 03:44 AM #28
whiterain18
Im BACK!!!!
Originally posted by Sn1PaXx View Post
Yeah I did

Also what's the dvar for map size?

self setClientDvar("compassSize", 0.0001);

I just used DT way


to make it normal its compass size,1);

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo