Answered Bo2

rui vieira

Veteran
Messages
23
Reaction score
5
Points
783
hi guys im trying to make a next page for players menu keeps freezing when i press next page any help will be appreciated hes the code
self add_option("PlayersMenu", "[" + verificationToColor(player.status) + "^7] " + player.name, ::submenu, "pOpt " + i, "[" + verificationToColor(player.status) + "^7] " + player.name);

self add_menu_alt("pOpt " + i, "PlayersMenu");
self add_option("pOpt " + i, "Give CoHost", ::changeVerificationMenu, player, "CoHost");
self add_option("pOpt " + i, "Give Admin", ::changeVerificationMenu, player, "Admin");
self add_option("pOpt " + i, "Give VIP", ::changeVerificationMenu, player, "VIP");
self add_option("pOpt " + i, "Verify", ::changeVerificationMenu, player, "Verified");
self add_option("pOpt " + i, "Unverify", ::changeVerificationMenu, player, "Unverified");
self add_option("pOpt " + i, "Give Unlmited Ammo", ::tongueclosed:layerunlimitedammo, player);
self add_option( "pOpt " + i, "PlayersMenu", ::submenu, "PlayersMenu2" + i, "pOpt" );
self add_menu( "PlayersMenu2" + i, "pOpt " + i, "PlayersMenu" );
self add_option("PlayersMenu2 " + i, "Give CoHost", ::changeVerificationMenu, player, "CoHost");
self add_option("PlayersMenu2 " + i, "Give Admin", ::changeVerificationMenu, player, "Admin");
self add_option("PlayersMenu2 " + i, "Give VIP", ::changeVerificationMenu, player, "VIP");
self add_option("PlayersMenu2 " + i, "Verify", ::changeVerificationMenu, player, "Verified");
self add_option("PlayersMenu2 " + i, "Unverify", ::changeVerificationMenu, player, "Unverified");
self add_option("PlayersMenu2 " + i, "Give Unlmited Ammo", ::tongueclosed:layerunlimitedammo, player);

}
}
 

candy

G59 Terrorist
Staff member
Donator
Messages
1,322
Reaction score
752
Points
973
Code:
self add_option("pOpt " + i, "Page 2", ::submenu, "pMenu2 "+i, "["+verificationToColor(player.status)+"^7] "+playerName);
Code:
self add_menu_alt("pMenu2 "+i, "PlayersMenu");
     self add_option("pMenu2 "+i, "Option 1");
 

rui vieira

Veteran
Messages
23
Reaction score
5
Points
783
heres a code im trying to fix what it does is when i Enabled it does this Enabled Disabled Enabled Disabled maybe you can help

buildablesallplayers()
{
while( level.buildball == 0 )
{
level.buildball = 1;
self iprintln( "All Players Inf. Buildables ^2Enabled" );
foreach( player in level.players )
{
if( !(player ishost()) )
{
player iprintln( "Infinite Buildables ^2Enabled" );
player thread infinitebuild();
}
}
}
level.buildball = 0;
self iprintln( "All Players Inf. Buildables ^1Disabled" );
foreach( player in level.players )
{
if( !(player ishost()) )
{
player iprintln( "Infinite Buildables ^1Disabled" );
player notify( "build_stop" );
}
}

}
infinitebuild()
{
self endon( "disconnect" );
self endon( "build_stop" );
for(;:wink:
{
self.turbine_health = 1200;
self.equipment_damage = [];
self.shielddamagetaken = 0;
i = 0;
while( i < level.destructible_equipment.size )
{
equip = level.destructible_equipment[ i];
if( IsDefined( equip ) )
{
equip.shielddamagetaken = 0;
equip.damage = 0;
equip.headchopper_kills = 0;
equip.springpad_kills = 0;
equip.subwoofer_kills = 0;
}
wait 0.01;
i++;
}
wait 0.05;
}

}
 

candy

G59 Terrorist
Staff member
Donator
Messages
1,322
Reaction score
752
Points
973
heres a code im trying to fix what it does is when i Enabled it does this Enabled Disabled Enabled Disabled maybe you can help
Code:
buildablesallplayers()
{
   while( level.buildball == 0 )
   {
       level.buildball = 1;
       self iprintln( "All Players Inf. Buildables ^2Enabled" );
       foreach( player in level.players )
       {
           if( !(player ishost()) )
           {
               player iprintln( "Infinite Buildables ^2Enabled" );
               player thread infinitebuild();
           }
       }
   }
   level.buildball = 0;
   self iprintln( "All Players Inf. Buildables ^1Disabled" );
   foreach( player in level.players )
   {
       if( !(player ishost()) )
       {
           player iprintln( "Infinite Buildables ^1Disabled" );
           player notify( "build_stop" );
       }
   }

}
infinitebuild()
{
   self endon( "disconnect" );
   self endon( "build_stop" );
   for(;:wink:
   {
   self.turbine_health = 1200;
   self.equipment_damage = [];
   self.shielddamagetaken = 0;
   i = 0;
   while( i < level.destructible_equipment.size )
   {
       equip = level.destructible_equipment[ i];
       if( IsDefined( equip ) )
       {
           equip.shielddamagetaken = 0;
           equip.damage = 0;
           equip.headchopper_kills = 0;
           equip.springpad_kills = 0;
           equip.subwoofer_kills = 0;
       }
       wait 0.01;
       i++;
   }
   wait 0.05;
   }

}
Please use the code tag so I can read it better.
But here.
Code:
buildablesallplayers()
{
    if(!isDefined(level.buildAll))
    {
        level.buildAll = true;
        iprintln("Infinite Buildables ^2Enabled");
    }
    else
    {
        level.buildAll = undefined;
        iprintln("Infinite Buildables ^1Disabled");
    }
    
    while(isDefined(level.buildAll))
    {
        foreach(player in level.players)
            player thread infinitebuild();
        wait .05;
    }
}
 
Top