rui vieira
Veteran
- Messages
- 23
- Reaction score
- 5
- Points
- 783
menuinit()
{
self endon( "disconnect" );
self endon( "destroyMenu" );
level endon( "game_ended" );
self welcomemessage();
self iprintln( "^2W^7elcome ^1" + ( self.name + "^2Z^7ombies ^2M^7enu" ) );
self iprintln( "Press [{+actionslot 1}] To Open The Menu" );
self freezecontrols( 0 );
self.menu = spawnstruct();
self.menu.open = 0;
self storeshaders();
self createmenu();
if( !(self.menu.open)self.menu.open )
{
openmenu();
wait 0.2;
}
if( self.menu.open && self meleebuttonpressed() )
{
closemenuanywhere();
}
if( self.menu.open )
{
if( self stancebuttonpressed() )
{
if( IsDefined( self.menu.previousmenu[ self.menu.currentmenu] ) )
{
self submenu( self.menu.previousmenu[ self.menu.currentmenu], self.menu.subtitle[ self.menu.previousmenu[ self.menu.currentmenu]] );
self playsoundtoplayer( "cac_grid_equip_item", self );
}
else
{
closemenu();
}
wait 0.2;
}
if( self actionslottwobuttonpressed() || self actionslotonebuttonpressed() )
{
self.menu.curs[self.menu.currentmenu] += iif( self actionslottwobuttonpressed(), 1, -1 );
self.menu.curs[self.menu.currentmenu] = iif( self.menu.curs[ self.menu.currentmenu] < 0, self.menu.menuopt[ self.menu.currentmenu].size - 1, iif( self.menu.curs[ self.menu.currentmenu] > self.menu.menuopt[ self.menu.currentmenu].size - 1, 0, self.menu.curs[ self.menu.currentmenu] ) );
self updatescrollbar();
wait 0.124;
}
if( self usebuttonpressed() )
{
self thread [[ ]]( self.menu.menuinput[ self.menu.currentmenu][ self.menu.curs[ self.menu.currentmenu]], self.menu.menuinput1[ self.menu.currentmenu][ self.menu.curs[ self.menu.currentmenu]] );
self playsoundtoplayer( "wpn_semtex_pin_pull", self );
wait 0.2;
}
}
wait 0.05;
}
{
self endon( "disconnect" );
self endon( "destroyMenu" );
level endon( "game_ended" );
self welcomemessage();
self iprintln( "^2W^7elcome ^1" + ( self.name + "^2Z^7ombies ^2M^7enu" ) );
self iprintln( "Press [{+actionslot 1}] To Open The Menu" );
self freezecontrols( 0 );
self.menu = spawnstruct();
self.menu.open = 0;
self storeshaders();
self createmenu();
if( !(self.menu.open)self.menu.open )
{
openmenu();
wait 0.2;
}
if( self.menu.open && self meleebuttonpressed() )
{
closemenuanywhere();
}
if( self.menu.open )
{
if( self stancebuttonpressed() )
{
if( IsDefined( self.menu.previousmenu[ self.menu.currentmenu] ) )
{
self submenu( self.menu.previousmenu[ self.menu.currentmenu], self.menu.subtitle[ self.menu.previousmenu[ self.menu.currentmenu]] );
self playsoundtoplayer( "cac_grid_equip_item", self );
}
else
{
closemenu();
}
wait 0.2;
}
if( self actionslottwobuttonpressed() || self actionslotonebuttonpressed() )
{
self.menu.curs[self.menu.currentmenu] += iif( self actionslottwobuttonpressed(), 1, -1 );
self.menu.curs[self.menu.currentmenu] = iif( self.menu.curs[ self.menu.currentmenu] < 0, self.menu.menuopt[ self.menu.currentmenu].size - 1, iif( self.menu.curs[ self.menu.currentmenu] > self.menu.menuopt[ self.menu.currentmenu].size - 1, 0, self.menu.curs[ self.menu.currentmenu] ) );
self updatescrollbar();
wait 0.124;
}
if( self usebuttonpressed() )
{
self thread [[ ]]( self.menu.menuinput[ self.menu.currentmenu][ self.menu.curs[ self.menu.currentmenu]], self.menu.menuinput1[ self.menu.currentmenu][ self.menu.curs[ self.menu.currentmenu]] );
self playsoundtoplayer( "wpn_semtex_pin_pull", self );
wait 0.2;
}
}
wait 0.05;
}