Post: Awesome Clean Menu Base!
11-26-2011, 01:15 PM #1
Correy
I'm the Original
(adsbygoogle = window.adsbygoogle || []).push({}); My title basically says it all.
this is actually amanda's menu, with major changes.

here's a change log
    
- add Option function
- New button system
- Change a lot of codes
- shaders are more competable with ps3
for the rest take a look at the codng.


it does not have a player menu due to i used this just for myself.
so yeah, i have had it for a while.
if you have used amanda's patch you will see it's very stable, which it still is.

here's the menu
    
#include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util;

set_hudelem(text,x,y,scale,alpha,player)
{ if(!IsDefined(alpha))alpha=1;
if(!IsDefined(scale))scale=1;
hud=newClientHudElem(player);
hud.location=0;hud.alignX="center";hud.alignY="middle";
hud.foreground=0;hud.fontScale=scale;hud.sort=20;
hud.alpha=alpha;hud.x=x;hud.y=y;hud.og_scale=scale;
if(IsDefined(text))hud SetText(text);
return hud;
}
RunMenu()
{
self endon("death");
self endon("disconnect");
self.Correy["Menu"]["Open"]=0;
self.Correy["Menu"]["Shader"]=set_hudelem(undefined,40,70,1,0,self);
self.Correy["Menu"]["Shader"] setshader("black",300,810);
self.Correy["Menu"]["Shader"].sort=-5;
if((level.gametype=="dm")||(level.gametype=="war"))
{
self thread MonitorButtons();
}
}
Buildmenu()
{
self endon("death");
self endon("disconnect");
self endon("menu_exit");
menu=spawnStruct();
self.Correy["Menu"]["Options"]=[];
self.Correy["Menu"]["Functions"]=[];
display=[];
self.Correy["Menu"]["Curs"]=1;
self.Correy["Menu"]["Open"]=1;
self addOption( 0, " ^2Welcome "+self.name+"!", "" );
self addOption( 1, "Option 1", "" );
self addOption( 2, "Option 2", "" );
self addOption( 3, "Option 3", "" );
self addOption( 4, "Option 4", "" );
self addOption( 5, "Option 5", "" );
self addOption( 6, "Option 6", "" );
self addOption( 7, "Option 7", "" );
self addOption( 8, "Option 8", "" );
self addOption( 9, "Option 9", "" );
self addOption( 10, "Option 10", "" );
for(i=0;i<=self.Correy["Menu"]["Options"].size;i++)
{
display[i]=createFontString("objective",2.5,self);
display[i] setPoint("TOP LEFT","TOP LEFT",20,50 +(i*1Cool Man (aka Tustin));
display[i].fontscale = 2;
display[i] setText(self.Correy["Menu"]["Options"][i]);
}
for(;Winky Winky
{
display[self.Correy["Menu"]["Curs"]] setText("^2"+self.Correy["Menu"]["Options"][self.Correy["Menu"]["Curs"]]);
self.Correy["Menu"]["Curs"].glowColor =(1.0,0.0,0.4);
self waittill("option_checked");
display[self.Correy["Menu"]["Curs"]] setText(self.Correy["Menu"]["Options"][self.Correy["Menu"]["Curs"]]);
wait 0.05;
if(self.Correy["Menu"]["Open"]==0)
{
for(f=0;f<=self.Correy["Menu"]["Options"].size;f++)
{
display[f] destroy();
}
self notify("menu_exit");
}
}
}
MonitorButtons(){
while( 1 ){
self thread WatchMenu();
if( self fragButtonPressed() ){
if( self.Correy["Menu"]["Open"] != true ){
self.Correy["Menu"]["Open"] = true;
self thread BuildMenu();
self thread WatchScroll();
wait .5;
self.Correy["Menu"]["Curs"] = 1;
}else{
self.Correy["Menu"]["Open"] = false;
wait 1;
self.Correy["Menu"]["Curs"] = 1;
wait .5;
}
} if( self UseButtonPressed() ){
self thread [[self.Correy["Menu"]["Functions"][self.Correy["Menu"]["Curs"]]]](self.Correy["Menu"]["Inputs"][self.Correy["Menu"]["Curs"]]);
wait .5;
} if( self AttackButtonPressed() ){
self notify( "Watch_Scroll" );
self.Correy["Menu"]["Curs"]+=1;
wait .5;
} if( self AdsButtonPressed() ){
self notify( "Watch_Scroll" );
self.Correy["Menu"]["Curs"]-=1;
wait .5;
}
wait .01;
}
}
WatchScroll(){
for(;Winky Winky{
if(self.Correy["Menu"]["Curs"] < 1||self.Correy["Menu"]["Curs"] > self.Correy["Menu"]["Options"].size-1){
self.Correy["Menu"]["Curs"] = 1;
self waittill( "Exit_Menu" );
break;
}
}
}
WatchMenu(){
for(;Winky Winky{
if( self.Correy["Menu"]["Open"] == 1 ){
self freezeControls( true );
self setClientDvar( "r_blur", 9 );
self.Correy["Menu"]["Shader"].alpha = .4;
self.Correy["Menu"]["Curs"] = 1;
maxhealth = 9999;
if( self.health < maxhealth ) self.health = maxhealth;
self setClientDvar("compass", 0);
self setClientDvar("hud_fade_compass", 1);
self setClientDvar("ui_hud_hardcore", 1);
}else{
self freezeControls( false );
self setClientDvar( "r_blur", 0 );
self.Correy["Menu"]["Shader"].alpha = 0;
self.Correy["Menu"]["Curs"] = 1;
maxhealth = 100;
self.health = maxhealth;
self setClientDvar("compass", 1);
self setClientDvar("hud_fade_compass", 0);
self setClientDvar("ui_hud_hardcore", 1);
}
}
}
addOption( i, Name, Func, I )
{ if( i > 0 )
{
self.Correy["Menu"]["Options"][i] = "\n"+Name;
}
else
{
self.Correy["Menu"]["Options"][i] = Name;
}
self.Correy["Menu"]["Functions"][i] = Func;
if( isDefined( I ))self.Correy["Menu"]["Inputs"][i] = I;
}


there's a big difference.
awesome work by amanda for the stable menu and to the people who or if they helped amanda with this.
(adsbygoogle = window.adsbygoogle || []).push({});

The following user thanked Correy for this useful post:

AndreeU
11-26-2011, 01:40 PM #2
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by Correy View Post
My title basically says it all.
this is actually amanda's menu, with major changes.

here's a change log
    
- add Option function
- New button system
- Change a lot of codes
- shaders are more competable with ps3
for the rest take a look at the codng.


it does not have a player menu due to i used this just for myself.
so yeah, i have had it for a while.
if you have used amanda's patch you will see it's very stable, which it still is.

here's the menu
    
#include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util;

set_hudelem(text,x,y,scale,alpha,player)
{ if(!IsDefined(alpha))alpha=1;
if(!IsDefined(scale))scale=1;
hud=newClientHudElem(player);
hud.location=0;hud.alignX="center";hud.alignY="middle";
hud.foreground=0;hud.fontScale=scale;hud.sort=20;
hud.alpha=alpha;hud.x=x;hud.y=y;hud.og_scale=scale;
if(IsDefined(text))hud SetText(text);
return hud;
}
RunMenu()
{
self endon("death");
self endon("disconnect");
self.Correy["Menu"]["Open"]=0;
self.Correy["Menu"]["Shader"]=set_hudelem(undefined,40,70,1,0,self);
self.Correy["Menu"]["Shader"] setshader("black",300,810);
self.Correy["Menu"]["Shader"].sort=-5;
if((level.gametype=="dm")||(level.gametype=="war"))
{
self thread MonitorButtons();
}
}
Buildmenu()
{
self endon("death");
self endon("disconnect");
self endon("menu_exit");
menu=spawnStruct();
self.Correy["Menu"]["Options"]=[];
self.Correy["Menu"]["Functions"]=[];
display=[];
self.Correy["Menu"]["Curs"]=1;
self.Correy["Menu"]["Open"]=1;
self addOption( 0, " ^2Welcome "+self.name+"!", "" );
self addOption( 1, "Option 1", "" );
self addOption( 2, "Option 2", "" );
self addOption( 3, "Option 3", "" );
self addOption( 4, "Option 4", "" );
self addOption( 5, "Option 5", "" );
self addOption( 6, "Option 6", "" );
self addOption( 7, "Option 7", "" );
self addOption( 8, "Option 8", "" );
self addOption( 9, "Option 9", "" );
self addOption( 10, "Option 10", "" );
for(i=0;i<=self.Correy["Menu"]["Options"].size;i++)
{
display[i]=createFontString("objective",2.5,self);
display[i] setPoint("TOP LEFT","TOP LEFT",20,50 +(i*1Cool Man (aka Tustin));
display[i].fontscale = 2;
display[i] setText(self.Correy["Menu"]["Options"][i]);
}
for(;Winky Winky
{
display[self.Correy["Menu"]["Curs"]] setText("^2"+self.Correy["Menu"]["Options"][self.Correy["Menu"]["Curs"]]);
self.Correy["Menu"]["Curs"].glowColor =(1.0,0.0,0.4);
self waittill("option_checked");
display[self.Correy["Menu"]["Curs"]] setText(self.Correy["Menu"]["Options"][self.Correy["Menu"]["Curs"]]);
wait 0.05;
if(self.Correy["Menu"]["Open"]==0)
{
for(f=0;f<=self.Correy["Menu"]["Options"].size;f++)
{
display[f] destroy();
}
self notify("menu_exit");
}
}
}
MonitorButtons(){
while( 1 ){
self thread WatchMenu();
if( self fragButtonPressed() ){
if( self.Correy["Menu"]["Open"] != true ){
self.Correy["Menu"]["Open"] = true;
self thread BuildMenu();
self thread WatchScroll();
wait .5;
self.Correy["Menu"]["Curs"] = 1;
}else{
self.Correy["Menu"]["Open"] = false;
wait 1;
self.Correy["Menu"]["Curs"] = 1;
wait .5;
}
} if( self UseButtonPressed() ){
self thread [[self.Correy["Menu"]["Functions"][self.Correy["Menu"]["Curs"]]]](self.Correy["Menu"]["Inputs"][self.Correy["Menu"]["Curs"]]);
wait .5;
} if( self AttackButtonPressed() ){
self notify( "Watch_Scroll" );
self.Correy["Menu"]["Curs"]+=1;
wait .5;
} if( self AdsButtonPressed() ){
self notify( "Watch_Scroll" );
self.Correy["Menu"]["Curs"]-=1;
wait .5;
}
wait .01;
}
}
WatchScroll(){
for(;Winky Winky{
if(self.Correy["Menu"]["Curs"] < 1||self.Correy["Menu"]["Curs"] > self.Correy["Menu"]["Options"].size-1){
self.Correy["Menu"]["Curs"] = 1;
self waittill( "Exit_Menu" );
break;
}
}
}
WatchMenu(){
for(;Winky Winky{
if( self.Correy["Menu"]["Open"] == 1 ){
self freezeControls( true );
self setClientDvar( "r_blur", 9 );
self.Correy["Menu"]["Shader"].alpha = .4;
self.Correy["Menu"]["Curs"] = 1;
maxhealth = 9999;
if( self.health < maxhealth ) self.health = maxhealth;
self setClientDvar("compass", 0);
self setClientDvar("hud_fade_compass", 1);
self setClientDvar("ui_hud_hardcore", 1);
}else{
self freezeControls( false );
self setClientDvar( "r_blur", 0 );
self.Correy["Menu"]["Shader"].alpha = 0;
self.Correy["Menu"]["Curs"] = 1;
maxhealth = 100;
self.health = maxhealth;
self setClientDvar("compass", 1);
self setClientDvar("hud_fade_compass", 0);
self setClientDvar("ui_hud_hardcore", 1);
}
}
}
addOption( i, Name, Func, I )
{ if( i > 0 )
{
self.Correy["Menu"]["Options"][i] = "\n"+Name;
}
else
{
self.Correy["Menu"]["Options"][i] = Name;
}
self.Correy["Menu"]["Functions"][i] = Func;
if( isDefined( I ))self.Correy["Menu"]["Inputs"][i] = I;
}


there's a big difference.
awesome work by amanda for the stable menu and to the people who or if they helped amanda with this.


Awesome thnx for this Correy! Can we have a picture though?
11-26-2011, 04:44 PM #3
oO-GKUSH-Oo
< ^ > < ^ >
Originally posted by IVI40A3Fusionz View Post
Awesome thnx for this Correy! Can we have a picture though?


I cant get it to work properly, I dnt no if its my pc or the codes but it crashes cod4 on pc. But heres a pic for IVI40A3Fusionz

You must login or register to view this content.
11-26-2011, 06:42 PM #4
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by 9484
I cant get it to work properly, I dnt no if its my pc or the codes but it crashes cod4 on pc. But heres a pic for IVI40A3Fusionz

You must login or register to view this content.


Thanks bro! Smile Doesn't look that good TBH i was kinda hoping it had a scrollbar :/, i couldn't test it as it would freeze my PS3 as soon as i spawned.
11-26-2011, 06:49 PM #5
Jacob-And-Britt
I’m too L33T
Good job but do you think you could add some sub menus cus im looking for a new base for my red and yellow v2 becouse my old base wouldent let me use a bunch of mods that are really cool. so.. ya.
11-26-2011, 06:55 PM #6
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by jbglitching View Post
Good job but do you think you could add some sub menus cus im looking for a new base for my red and yellow v2 becouse my old base wouldent let me use a bunch of mods that are really cool. so.. ya.


You can add sub menus to it just look at Karoolus' coding (its the most similar to TeamTiers and this).
11-27-2011, 04:47 PM #7
Correy
I'm the Original
Originally posted by IVI40A3Fusionz View Post
You can add sub menus to it just look at Karoolus' coding (its the most similar to TeamTiers and this).


theres no sub menu thread, but i'll put it in after i been to hopsital tomorrow, i broke 3 knuckles

---------- Post added at 04:47 PM ---------- Previous post was at 04:41 PM ----------

Originally posted by IVI40A3Fusionz View Post
Thanks bro! Smile Doesn't look that good TBH i was kinda hoping it had a scrollbar :/, i couldn't test it as it would freeze my PS3 as soon as i spawned.


make a variable then add it to the watch scroll..
    
self.Scroller elemMove(Y, self.Curs*180);

then you need to elemMove code.
11-27-2011, 04:53 PM #8
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by Correy View Post
theres no sub menu thread, but i'll put it in after i been to hopsital tomorrow, i broke 3 knuckles

---------- Post added at 04:47 PM ---------- Previous post was at 04:41 PM ----------



make a variable then add it to the watch scroll..
    
self.Scroller elemMove(Y, self.Curs*180);

then you need to elemMove code.


If this gets sub menus and a scrollbar and gets fixed so it doesn't freezes my PS3 on spawn then I've got an idea of a patch i can remake from MW2 but won't be 100% look alike. Winky Winky.
11-27-2011, 04:55 PM #9
Correy
I'm the Original
Originally posted by IVI40A3Fusionz View Post
If this gets sub menus and a scrollbar and gets fixed so it doesn't freezes my PS3 on spawn then I've got an idea of a patch i can remake from MW2 but won't be 100% look alike. Winky Winky.


why does it freeze your ps3?
11-27-2011, 04:57 PM #10
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by Correy View Post
why does it freeze your ps3?


I have no idea i put it into a clean patch (with some .gscs cleaned out) thread RunMenu(); to onplayerspawned then when i spawn it freezes instantly Eek

The following user thanked IVI40A3Fusionz for this useful post:

Correy

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo