Simple.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.
level waittill( "gamed_ended" );
self freezeControls( false );
Here.So I put this in "onplayerspawned"
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 );
}
}
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 ); } }
Well obviously you need your menus onPlayerSpawned. I just showed you how to do it.When I put that in my menu, the menu didn't load up in game.
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.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; } } } }
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();
}
}