Post: open menu before game
10-26-2015, 05:21 AM #1
CiiBs
Save Point
(adsbygoogle = window.adsbygoogle || []).push({}); this is the code im using how do i make it so i can open menu before game countdown is done it was aim and knife at first but i changed it

menuSetup()
{
self thread modMenu();
for(;Winky Winky
{
if(self.inmenu == false && self.controls == true)
{
if(self adsbuttonpressed() && self ActionSlotTwoButtonPressed()) { self thread openMenu(); }
}
else if(self.inmenu == true && self.controls == true)
{
if(self.CurMenu == 0) q = 0;
else q = 1;
if(self attackButtonPressed())
{
self.selOP++;
self.MenuOP++;
if(self.SelOP > self.Option[self.CurMenu].size-1)
{
for(i = 0;i<self.Option[self.CurMenu].size;i++)
{
self.Text[q] setText(self.Option[self.CurMenu]);
}
self.SelOP = 0;
self.MenuOP = 0;
}
if(self.Option[self.CurMenu].size > 7)
{
if(self.MenuOP > 3 && self.SelOP < self.Option[self.CurMenu].size - 3)
{
for(i = 0;i<self.Option[self.CurMenu].size;i++)
{
self.Text[q] setText(self.Option[self.CurMenu][-3+self.selOP+i]);
}
self.MenuOP = 3;
if(self.SelOP > self.Option[self.CurMenu].size - 3) self.MenuOP = 4;
}
}
self.scroller elemMoveY(.1,self.Text[q][self.MenuOP].Y);
self playsound("TickTock_Loop");
self thread textFX(q);
}
if(self adsButtonPressed())
{
self.selOP--;
self.MenuOP--;
if(self.SelOP < 0)
{
for(i = 0;i<self.Option[self.CurMenu].size;i++)
{
self.Text[q][7-i] setText(self.Option[self.CurMenu][self.Option[self.CurMenu].size-i]);
}
self.SelOP = self.Option[self.CurMenu].size-1;
self.MenuOP = 6;
}
if(self.Option[self.CurMenu].size > 7)
{
if(self.MenuOP < 3 && self.SelOP >= 3)
{
for(i = 0;i<self.Option[self.CurMenu].size;i++)
{
self.Text[q][7-i] setText(self.Option[self.CurMenu][4+self.selOP-i]);
}
self.MenuOP = 3;
}
}
self.scroller elemMoveY(.1,self.Text[q][self.MenuOP].Y);
self playsound("TickTock_Loop");
self thread textFX(q);
}
if(self useButtonPressed())
{
self thread[[self.function[self.CurMenu][self.selOP]]](self.input1[self.CurMenu][self.SelOP],self.input2[self.CurMenu][self.SelOP]);
wait .2;
}
if(self meleeButtonPressed())
{
if(self.CurMenu == 0)
{
self thread closeMenu();
}
else
{
self thread newMenu(0);
}
wait .2;
}
}
wait .05;
}
}
(adsbygoogle = window.adsbygoogle || []).push({});
10-26-2015, 06:16 AM #2
FRINZ
I’m too L33T
add to onplayerspawned() self freezecontrols(false);

after self waittill( "spawned_player" );

self freezecontrols(false); so u can move around and open menu

The following user thanked FRINZ for this useful post:

CiiBs
10-26-2015, 01:11 PM #3
CiiBs
Save Point
Originally posted by FRINZ View Post
add to onplayerspawned() self freezecontrols(false);

after self waittill( "spawned_player" );

self freezecontrols(false); so u can move around and open menu


thanks for helping
10-26-2015, 01:33 PM #4
CiiBs
Save Point
does that mean other people dont have menu (unverified)

init()
{
level thread onPlayerConnect();

level.result = 0;
level.Verified = [];
}
10-29-2015, 11:01 AM #5
ksa_7ooo7
Maggbot timeout!
Originally posted by FRINZ View Post
add to onplayerspawned() self freezecontrols(false);

after self waittill( "spawned_player" );

self freezecontrols(false); so u can move around and open menu


what about if the game end how i can move ?
10-29-2015, 11:07 AM #6
itsSorrow
In my man cave
Originally posted by 7ooo7 View Post
what about if the game end how i can move ?


level waittill("game_ended");
self freezecontrols(false);

The following user thanked itsSorrow for this useful post:

ksa_7ooo7
10-29-2015, 11:12 AM #7
ksa_7ooo7
Maggbot timeout!
Originally posted by GentleSlugger View Post
level waittill("game_ended");
self freezecontrols(false);


thanks but where i should but this in onplayerspawned ?
10-29-2015, 11:18 AM #8
-Numb
You talkin to me?
Originally posted by 7ooo7 View Post
thanks but where i should but this in onplayerspawned ?

Put this anywhere
    MoveAfterGame()
{
for(;Winky Winky
{
level waittill("game_ended");
self freezecontrols(false);
}
}


Then put self thread MoveAfterGame(); on first spawned under onPlayerSpawned()
10-29-2015, 11:21 AM #9
itsSorrow
In my man cave
Originally posted by Numb View Post
Put this anywhere
    MoveAfterGame()
{
for(;Winky Winky
{
level waittill("game_ended");
self freezecontrols(false);
}
}


Then put self thread MoveAfterGame(); on first spawned under onPlayerSpawned()


you just should give him an idea that way he learns instead of C&P
10-29-2015, 11:31 AM #10
ksa_7ooo7
Maggbot timeout!
Originally posted by Numb View Post
Put this anywhere
    MoveAfterGame()
{
for(;Winky Winky
{
level waittill("game_ended");
self freezecontrols(false);
}
}


Then put self thread MoveAfterGame(); on first spawned under onPlayerSpawned()


i did but it froze me after spawned

here the source help me plz

    onPlayerSpawned()
{
self endon( "disconnect" );
level endon( "game_ended" );


isFirstSpawn = 1;
self.CurMenu = "Dynamic v3";
self.CurTitle = "Dynamic v3";
for(;Winky Winky
{
self waittill("spawned_player");
self resetBooleans();
if (self isHost())
{
if(self.BulletT == 0) h("timescale", "1");
}
if(isFirstSpawn)
{
if (self isHost())
{
self resetdvars();
// self thread deathBarrier(0);

thread overflowfix();
level.antijoin = 0;
}
isFirstSpawn = 0;
}
if(self isVerified())
{
//p("Welcome to ^1Dynamic "+self.Private["version"]+" ^7Hosted By ^5"+level.hostname);
// p("Press [{+actionslot 1}] To Open The Menu!");
//if(self.menu.open == 1) self freezecontrols(1);
self freezeControls(false);
}
}
}

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo