You are viewing our Forum Archives. To view or take place in current topics click here.
[RELEASE] Mod Menu -.-
Posted:
[RELEASE] Mod Menu -.-Posted:
Status: Offline
Joined: Jan 20, 201014Year Member
Posts: 331
Reputation Power: 10
Status: Offline
Joined: Jan 20, 201014Year Member
Posts: 331
Reputation Power: 10
Fail -.- sorry guys didnt work properly , My bad it was first time doing a Mod menu -.-
Last edited by -Shibbi- ; edited 1 time in total
Last edited by -Shibbi- ; edited 1 time in total
#2. Posted:
Status: Offline
Joined: Sep 28, 201014Year Member
Posts: 82
Reputation Power: 3
Status: Offline
Joined: Sep 28, 201014Year Member
Posts: 82
Reputation Power: 3
This was posted on s7 earlier and I posted my version.
I'm in class and can't test but should work.
I kept the array layout because it is easier to edit but I could shorten more.
I'm in class and can't test but should work.
I kept the array layout because it is easier to edit but I could shorten more.
onPlayerSpawned()
{
self endon( "disconnect" );
self thread iniMenu();
for(;;)
{
self waittill( "spawned_player" );
self thread instructDisp();
}
}
iniMenu()
{
self endon( "disconnect" );
self.open = 0;
for(;;)
{
if( self.open != 0 )
{
if(self ActionSlotOneButtonPressed()) self notify( "Up" );
if(self ActionSlotTwoButtonPressed()) self notify( "Down" );
if(self JumpButtonPressed()) self notify( "A" );
wait 0.05;
}
if(self ActionSlotThreeButtonPressed())
{
if( self.open == 0 )
{
self.open = 1;
self thread drawMenu();
}
else
{
self.open = 0;
self notify( "exit_menu" );
}
wait 0.01;
}
wait 0.05;
}
}
drawMenu()
{
self endon( "death" );
self endon( "exit_menu" );
self endon( "disconnect" );
self.getMenu = ::getMenu;
self.getFunc = ::getFunc;
self.menu = [[self.getMenu]]();
self.func = [[self.getFunc]]();
self.scroll = 0;
self.max = self.menu.size;
MenuShad = NewClientHudElem( self );
MenuShad.alignX = "center";
MenuShad.alignY = "center";
MenuShad.x = 320;
MenuShad.y = 0;
MenuShad.sort = -1;
MenuShad.alpha = 0.9;
MenuShad setshader( "black", 900, 800 );
self thread destroyOnAny( MenuShad, "exit_menu" );
while( self.open )
{
menuText = "";
menuDraw = self createFontString( "objective", 2 );
menuDraw setPoint( "CENTER", "CENTER", 0, -180);
self thread destroyOnAny( menuDraw, "death", "Up", "Down", "A", "exit_menu" );
for( i = 0; i < self.menu.size; i++ )
{
if( i == self.scroll ) menuText += "^5" + self.menu[i] + "\n";
else menuText += "^7" + self.menu[i] + "\n";
}
menuDraw setText( menuText );
button = self waittill_any_return( "Up", "Down", "A" );
switch( button )
{
case "Up":
self.scroll--;
if( self.scroll < 0 ) self.scroll = 0;
wait 0.05;
break;
case "Down":
self.scroll++;
if( self.scroll >= self.max ) self.scroll = self.max;
wait 0.05;
break;
case "A":
self thread [[self.func[self.scroll]]]();
wait 0.05;
break;
}
}
}
destroyOnAny( element, e1, e2, e3, e4, e5 )
{
self waittill_any_return( e1, e2, e3, e4, e5 );
element destroy();
}
getMenu()
{
menu = [];
menu[0] = "Option 1";
menu[1] = "Option 2";
menu[2] = "Option 3";
menu[3] = "Option 4";
menu[4] = "Option 5";
menu[5] = "Option 6";
menu[6] = "Option 7";
menu[7] = "Option 8";
menu[8] = "Option 9";
menu[9] = "Option 10";
menu[10] = "Option 11";
menu[11] = "Option 12";
return menu;
}
getFunc()
{
func = [];
func[0] = ::testFunc;
func[1] = ::testFunc;
func[2] = ::testFunc;
func[3] = ::testFunc;
func[4] = ::testFunc;
func[5] = ::testFunc;
func[6] = ::testFunc;
func[7] = ::testFunc;
func[8] = ::testFunc;
func[9] = ::testFunc;
func[10] = ::testFunc;
func[11] = ::testFunc;
return func;
}
instructDisp()
{
txt = self createFontString( "objective", 2 );
txt setPoint( "CENTER", "BOTTOM", 0, 0 );
self destroyOnAny( txt, "death" );
txt setText( "[{+actionslot 3}] - Open/Close" );
}
testFunc()
{
self iPrintlnBold( "Cursor Pos: ^2" + self.scroll );
}
- 0useful
- 0not useful
#3. Posted:
Status: Offline
Joined: Sep 06, 201014Year Member
Posts: 1,069
Reputation Power: 47
Status: Offline
Joined: Sep 06, 201014Year Member
Posts: 1,069
Reputation Power: 47
It obviously worked in testing because someone made a video....
- 0useful
- 0not useful
You are viewing our Forum Archives. To view or take place in current topics click here.