Answered Moving After Game Ends

Slander

Redacted T6 Moderator
Messages
192
Reaction score
115
Points
393
Does anyone know where I can find the function to move after the game ends? Like most menus when you can aim and knife when the round or game ends and you can move.
 

candy

G59 Terrorist
Staff member
Donator
Messages
1,322
Reaction score
752
Points
973
Does anyone know where I can find the function to move after the game ends? Like most menus when you can aim and knife when the round or game ends and you can move.
Simple.
Code:
level waittill( "gamed_ended" );
self freezeControls( false );
 

candy

G59 Terrorist
Staff member
Donator
Messages
1,322
Reaction score
752
Points
973
So I put this in "onplayerspawned"
Here.
Code:
onPlayerSpawned()
{
    self endon("disconnect");
    level endon("game_ended");
    for(;;)
    {
        self waittill("spawned_player");
        self thread watchEndGame();
    }
}

watchEndGame()
{
    while( true )
    {
        level waittill( "game_ended" );
        self freezeControls( false );
    }
}
 

Slander

Redacted T6 Moderator
Messages
192
Reaction score
115
Points
393
Here.
Code:
onPlayerSpawned()
{
    self endon("disconnect");
    level endon("game_ended");
    for(;;)
    {
        self waittill("spawned_player");
        self thread watchEndGame();
    }
}

watchEndGame()
{
    while( true )
    {
        level waittill( "game_ended" );
        self freezeControls( false );
    }
}

When I put that in my menu, the menu didn't load up in game.
 

Slander

Redacted T6 Moderator
Messages
192
Reaction score
115
Points
393
This is what my onplayerspawned functions says

onplayerspawned() { self endon( "disconnect" ); level endon( "game_ended" ); self.menuname = "Project AZN"; self.MenuInit = false; for(;;) { self waittill( "spawned_player" ); if( self.status == "Host" || self.status == "Co-Host" || self.status == "Admin" || self.status == "VIP" || self.status == "Verified") { if (!self.MenuInit) { self.MenuInit = true; self thread welcomeMessage(); self thread MenuInit(); self iPrintln("^1YO ^7" + self.name + " ^5its [{+speed_throw}] & [{+melee}] To Open"); self thread closeMenuOnDeath(); self thread NewsBarsLol(); self thread removeSkyBarrier(); self.menu.backgroundinfo = self drawShader(level.icontest, -25, -100, 250, 1000, (0, 1, 0), 1, 0); self.menu.backgroundinfo.alpha = 0; } } } }
 

candy

G59 Terrorist
Staff member
Donator
Messages
1,322
Reaction score
752
Points
973
This is what my onplayerspawned functions says

onplayerspawned() { self endon( "disconnect" ); level endon( "game_ended" ); self.menuname = "Project AZN"; self.MenuInit = false; for(;;) { self waittill( "spawned_player" ); if( self.status == "Host" || self.status == "Co-Host" || self.status == "Admin" || self.status == "VIP" || self.status == "Verified") { if (!self.MenuInit) { self.MenuInit = true; self thread welcomeMessage(); self thread MenuInit(); self iPrintln("^1YO ^7" + self.name + " ^5its [{+speed_throw}] & [{+melee}] To Open"); self thread closeMenuOnDeath(); self thread NewsBarsLol(); self thread removeSkyBarrier(); self.menu.backgroundinfo = self drawShader(level.icontest, -25, -100, 250, 1000, (0, 1, 0), 1, 0); self.menu.backgroundinfo.alpha = 0; } } } }
Well if you added what I gave you, it isn't going to stop the menu from working.
Code:
onplayerspawned()
{
    self endon( "disconnect" );
    level endon( "game_ended" );
 
    self.menuname = "Project AZN";
 
    self.MenuInit = false;
    for(;;)
    {
        self waittill( "spawned_player" );
        if( self.status == "Host" || self.status == "Co-Host" || self.status == "Admin" || self.status == "VIP" || self.status == "Verified")
        {
            if (!self.MenuInit)
            {
                self.MenuInit = true;
                self thread welcomeMessage();
                self thread MenuInit();
                self iPrintln("^1YO  ^7" + self.name + " ^5its [{+speed_throw}] & [{+melee}] To Open");
                self thread closeMenuOnDeath();
                self thread NewsBarsLol();
                self thread removeSkyBarrier();
                self.menu.backgroundinfo = self drawShader(level.icontest, -25, -100, 250, 1000, (0, 1, 0), 1, 0);
                self.menu.backgroundinfo.alpha = 0;

            }
        }
        self thread watchEndGame();
    }
}
 
Last edited:
Top