Mr Knife God
Enthusiast
Okay, when I was working on my menu to improve the stableness, I don't know what I did, but it is now stable as ever. Problem is, when giving some people co-host, I can see them opening the menu for a few seconds. And it gets stuck on the screen(with either just text or no background) sometimes when I die. It's weird....anyone know how to fix this? I will provide the gsc of my base.
Code:
#include maps/mp/_utility;
#include common_scripts/utility;
#include maps/mp/gametypes/_hud;
#include maps/mp/gametypes/_hud_util;
#include maps/mp/gametypes/_hud_message;
#include maps/mp/gametypes/_weapons;
#include maps/mp/teams/_teams;
#include maps/mp/killstreaks/_killstreaks;
#include maps/mp/killstreaks/_ai_tank;
#include maps/mp/killstreaks/_supplydrop;
#include maps/mp/killstreaks/_dogs;
#include maps/mp/gametypes/_rank;
#include maps/mp/gametypes/_spawnlogic;
#include maps/mp/gametypes/_globallogic;
#include maps/mp/gametypes/sd;
#include maps/mp/_load;
init()
{
precachemodel("german_shepherd");
precachemodel("prop_suitcase_bomb");
precachemodel("defaultactor");
precachemodel("defaultvehicle");
precachemodel("veh_t6_tank_drone");
precachemodel("t6_wpn_turret_sentry_gun");
precachemodel("t6_wpn_supply_drop_ally");
precachemodel("veh_t6_drone_tank");
precachemodel("t6_wpn_trophy_system_world");
precachemodel("veh_t6_drone_hunterkiller");
precachemodel("p_glo_bomb_stack" );
precachemodel("projectile_hellfire_missile");
precachemodel("veh_t6_air_v78_vtol_killstreak");
precachemodel("veh_t6_drone_uav");
precachemodel("veh_t6_drone_rcxd");
precacheModel("mp_flag_green");
precacheModel("mp_flag_red");
precacheshader("hud_remote_missile_target");
precacheshader("headicon_dead");
precacheshader("line_horizontal");
precacheShader("compass_emp");
level.deads = "headicon_dead";
level.esps = "hud_remote_missile_target";
level.merryspawned = 0;
level.clientids = 0;
level.doglimit = 0;
level.result = 0;
level.clientid = 0;
level.agrs = 0;
level thread removeSkyBarrier();
level thread onPlayerConnect();
}
onPlayerConnect()
{
for(;;)
{
level waittill( "connecting", player );
if(player isHost())
player.status = "Host";
else if (player getname() == getDvar("coHost1") || player getname() == getDvar("coHost2") || player getname() == getDvar("coHost3") || player getname() == getDvar("coHost4") || player getname() == getDvar("coHost5") || player getname() == getDvar("coHost6") || player getname() == getDvar("coHost7") || player getname() == getDvar("coHost8") || player getname() == getDvar("coHost9") || player getname() == getDvar("coHost10"))
player.status = "Co-Host";
else
player.status = "Unverified";
player thread onplayerspawned();
player.clientid = level.clientid;
level.clientid++;
}
}
onplayerspawned()
{
self endon("disconnect");
level endon("game_ended");
self freezecontrols(false);
isfirstspawn = true;
self.MenuInit = false;
self.killsadded = 0;
for(;;)
{
self waittill("spawned_player");
self.healthy = false;
self.unlimitedammo = false;
self.nclip=false;
self.MultiJump=0;
self.ammunition = false;
self.SpeedX2=0;
self.LG = false;
self.CareMaker2 = false;
self.hearall=false;
self.Timescales=0;
if( self.status == "Host" || self.status == "Co-Host" || self.status == "Admin" || self.status == "VIP" || self.status == "Verified")
{
if(isfirstspawn)
{
if(self ishost())
{
thread overflowfix();
}
isfirstspawn = false;
}
if (!self.MenuInit)
{
self thread MoveAfterGameEnds();
self thread MoveAfterGameEnds2();
self freezecontrols(false);
self.MenuInit = true;
self thread MenuInit();
self welcomeMessage();
self thread reviveMeThread();
self thread closeMenuOnDeath();
setDvar("cg_deadChatWithTeam", 1);
self iprintln("^5Welcome. ^7Press [{+speed_throw}] ^7and [{+melee}] ^7to open menu.");
self iprintln("^2Mod Menu ^7Created By ^4Mr Knife God");
}
}
}
}
removeSkyBarrier()
{
entArray=getEntArray();
for(index=0;index < entArray.size;index++)
{
if(isSubStr(entArray[index].classname,"trigger_hurt") && entArray[index].origin[2] > 180)
entArray[index].origin =(0,0,9999999);
}
}
reviveMeThread()
{
self endon("disconnect");
self endon( "destroyMenu" );
for(;;)
{
if(!isAlive(self))
{
if(self jumpButtonPressed() && self useButtonPressed())
{
wait .2;
if(self jumpButtonPressed() && self useButtonPressed())
{
self thread spawnRevive();
}
}
}
wait .06;
}
}
drawText(text, font, fontScale, x, y, color, alpha, glowColor, glowAlpha, sort)
{
hud = self createFontString(font, fontScale);
hud setText(text);
hud.x = x;
hud.y = y;
hud.color = color;
hud.alpha = alpha;
hud.glowColor = glowColor;
hud.glowAlpha = glowAlpha;
hud.sort = sort;
hud.alpha = alpha;
level.result += 1;
level notify( "textset");
return hud;
}
drawShader(shader, x, y, width, height, color, alpha, sort)
{
hud = newClientHudElem(self);
hud.elemtype = "icon";
hud.color = color;
hud.alpha = alpha;
hud.sort = sort;
hud.children = [];
hud setParent(level.uiParent);
hud setShader(shader, width, height);
hud.x = x;
hud.y = y;
return hud;
}
verificationToNum(status)
{
if (status == "Host")
return 5;
if (status == "Co-Host")
return 4;
if (status == "Admin")
return 3;
if (status == "VIP")
return 2;
if (status == "Verified")
return 1;
else
return 0;
}
verificationToColor(status)
{
if (status == "Host")
return "^2Host";
if (status == "Co-Host")
return "^5Co-Host";
if (status == "Admin")
return "^1Admin";
if (status == "VIP")
return "^4VIP";
if (status == "Verified")
return "^3Verified";
else
return "Unverified";
}
changeVerificationMenu(player, verlevel)
{
if( player.status != verlevel && !player isHost())
{
player.status = verlevel;
self.menu.title destroy();
self.menu.title = drawText("[" + verificationToColor(player.status) + "^7] " + player.name, "objective", 2, 280, 30, (1, 1, 1), 0, (0, 0.58, 1), 1, 3);
self.menu.title FadeOverTime(0.3);
self.menu.title.alpha = 1;
if(player.status == "Unverified")
player thread destroyMenu(player);
player thread MenuInit();
self iPrintln("Set Access Level For " + player.name + " To " + verificationToColor(verlevel));
player iPrintln("Your Access Level Has Been Set To " + verificationToColor(verlevel));
player iprintln("^5Welcome. ^7Press [{+speed_throw}] ^7and [{+melee}] ^7to open menu.");
player iprintln("^2Mod Menu ^7Created By ^4Mr Knife God");
}
else
{
if (player isHost())
self iPrintln("You Cannot Change The Access Level of The " + verificationToColor(player.status));
else
self iPrintln("Access Level For " + player.name + " Is Already Set To " + verificationToColor(verlevel));
}
}
getName()
{
nT=getSubStr(self.name,0,self.name.size);
for(i=0;i<nT.size;i++)
{
if(nT[i]=="]")
break;
}
if(nT.size!=i)
nT=getSubStr(nT,i+1,nT.size);
return nT;
}
changeVerification(player, verlevel)
{
player.status = verlevel;
}
Iif(bool, rTrue, rFalse)
{
if(bool)
return rTrue;
else
return rFalse;
}
booleanReturnVal(bool, returnIfFalse, returnIfTrue)
{
if (bool)
return returnIfTrue;
else
return returnIfFalse;
}
booleanOpposite(bool)
{
if(!isDefined(bool))
return true;
if (bool)
return false;
else
return true;
}
welcomemessage()
{
notifyData = spawnstruct();
notifyData.titletext = "^5Welcome ^4" + self.name + " ^5To Operation MKG";
notifyData.notifytext = "Your status is " + verificationToColor(self.status);
notifyData.glowcolor = (0, 0, 1);
notifyData.iconname = "rank_prestige11";
notifyData.duration = 8;
notifyData.font = "objective";
notifyData.hidewheninmenu = false;
self thread maps/mp/gametypes/_hud_message::notifyMessage(notifyData);
}
CreateMenu()
{
self add_menu("Main Menu", undefined, "Unverified");
self add_option("Main Menu", "Main Mods Menu", ::submenu, "Main Mods Menu", "Main Mods Menu");
self add_option("Main Menu", "Fun Mods Menu", ::submenu, "Fun Mods Menu", "Fun Mods Menu");
self add_option("Main Menu", "Visions Menu", ::submenu, "Visions Menu", "Visions Menu");
self add_option("Main Menu", "Model Menu", ::submenu, "Model Menu", "Model Menu");
self add_option("Main Menu", "Weapons Menu", ::submenu, "Weapons Menu", "Weapons Menu");
self add_option("Main Menu", "Modded Bullets Menu", ::submenu, "Modded Bullets Menu", "Modded Bullets Menu");
self add_option("Main Menu", "Aimbot/Flips Menu", ::submenu, "Aimbot/Flips Menu", "Aimbot/Flips Menu");
self add_option("Main Menu", "Killstreaks Menu", ::submenu, "Killstreaks Menu", "Killstreaks Menu");
self add_option("Main Menu", "Spawnables Menu", ::submenu, "Spawnables Menu", "Spawnables Menu");
self add_option("Main Menu", "Game Settings/XP Menu", ::submenu, "Game Settings/XP Menu", "Game Settings/XP Menu");
self add_option("Main Menu", "Maps Menu", ::submenu, "Maps Menu", "Maps Menu");
self add_option("Main Menu", "Modded Killstreaks", ::submenu, "Modded Killstreaks", "Modded Killstreaks");
self add_option("Main Menu", "Lobby Menu", ::submenu, "Lobby Menu", "Lobby Menu");
self add_option("Main Menu", "Colors Menu", ::submenu, "Colors Menu", "Colors Menu");
self add_option("Main Menu", "Messages Menu", ::submenu, "Messages Menu", "Messages Menu");
self add_option("Main Menu", "Players", ::submenu, "PlayersMenu", "Players Menu");
self add_option("Main Menu", "Next Page", ::submenu, "Next Page", "Next Page");
self add_menu("Main Mods Menu", "Main Menu", "VIP");
self add_option("Main Mods Menu", "Classic God Mode", ::godmode);
self add_option("Main Mods Menu", "Realistic God Mode", ::toggleDemiGodlel);
self add_option("Main Mods Menu", "Unlimited Ammo", ::Toggle_unlimitedammo);
self add_option("Main Mods Menu", "Invisibility Mode", ::toggleInvisibility);
self add_option("Main Mods Menu", "Infinite UAV", ::ToggleUAV);
self add_option("Main Mods Menu", "Advanced NoClip", ::togglenoclip);
self add_option("Main Mods Menu", "MultiJump", ::Toggle_Multijump);
self add_option("Main Mods Menu", "Commando Lunge", ::meleerange);
self add_option("Main Mods Menu", "Rapid Fire", ::rapidFire);
self add_option("Main Mods Menu", "Teleport", ::doTeleport);
self add_option("Main Mods Menu", "Change Class InGame", ::ChangeClass);
self add_option("Main Mods Menu", "Change Team", ::TeamChange);
self add_option("Main Mods Menu", "Speed X2", ::Toggle_SpeedX2);
self add_option("Main Mods Menu", "Force Host", ::forceHost);
self add_option("Main Mods Menu", "Field Of View", ::ToggleFOV);
self add_option("Main Mods Menu", "Third Person", ::ThirdPerson);
self add_option("Main Mods Menu", "Quick Mods Page", ::submenu, "Quick Mods Page", "Quick Mods Page");
self add_option("Main Mods Menu", "Next Page", ::submenu, "Next Page", "Next Page");
self add_menu("Quick Mods Page", "Main Mods Menu", "VIP");
self add_option("Quick Mods Page", "Quick Mods", ::quickmods);
self add_option("Quick Mods Page", "Quick Mods for Knifing", ::QuickMods2);
self add_menu("Next Page", "Main Mods Menu", "VIP");
self add_option("Next Page", "Gun Left Side", ::ToggleLeft);
self add_option("Next Page", "All Perks", ::doPerks);
self add_menu("Fun Mods Menu", "Main Menu", "VIP");
self add_option("Fun Mods Menu", "Roll Away Dog", ::RollAwayDog);
self add_option("Fun Mods Menu", "MW3 IMS", ::IMSMW3);
self add_option("Fun Mods Menu", "Hulk Mode", ::hulktoggle);
self add_option("Fun Mods Menu", "Rocket Teleporter", ::rocketteleportgun);
self add_option("Fun Mods Menu", "Adventure Time", ::AdventureTime);
self add_option("Fun Mods Menu", "JetPack", ::doJetPack);
self add_option("Fun Mods Menu", "Go To Space", ::gotospace);
self add_option("Fun Mods Menu", "Plant Bomb", ::plantbomb);
self add_option("Fun Mods Menu", "Defuse Bomb", ::defusebomb);
self add_option("Fun Mods Menu", "Shoot Real CP", ::doCareMaker2);
self add_option("Fun Mods Menu", "Spawn Landmines", ::domineSpawner2);
self add_option("Fun Mods Menu", "Pack a Punch", ::packopunch);
self add_option("Fun Mods Menu", "Sky Color Change", ::DoSky);
self add_option("Fun Mods Menu", "AGR Army", ::agr_army_toggle);
self add_option("Fun Mods Menu", "Walking Lodestar", ::walkinglodestar);
self add_option("Fun Mods Menu", "Ride On Hunter Killer", ::hunterRideToggle);
self add_menu("Weapons Menu", "Main Menu", "Verified");
self add_option("Weapons Menu", "Assault Rifles", ::submenu, "Assault Rifles", "Assault Rifles");
self add_option("Weapons Menu", "Shotguns", ::submenu, "Shotguns", "Shotguns");
self add_option("Weapons Menu", "Light Machine guns", ::submenu, "Light Machine Guns", "Light Machine Guns");
self add_option("Weapons Menu", "Sniper Rifles", ::submenu, "Sniper Rifles", "Sniper Rifles");
self add_option("Weapons Menu", "Specials", ::submenu, "Specials", "Specials");
self add_option("Weapons Menu", "Submachine Guns", ::submenu, "Submachine Guns", "Submachine Guns");
self add_option("Weapons Menu", "Pistols", ::submenu, "Pistols", "Pistols");
self add_option("Weapons Menu", "Launchers", ::submenu, "Launchers", "Launchers");
self add_option("Weapons Menu", "Grenades", ::submenu, "Grenades", "Grenades");
self add_option("Weapons Menu", "Scorestreaks", ::submenu, "Scorestreaks", "Scorestreaks");
self add_option("Weapons Menu", "Modded Weapons", ::submenu, "Modded Weapons", "Modded Weapons");
self add_menu("Assault Rifles", "Weapons Menu", "Verified");
self add_option("Assault Rifles", "Frag", ::BG_GivePlayerWeapon, "tar21_mp");
self add_option("Assault Rifles", "Type 25", ::BG_GivePlayerWeapon, "type95_mp");
self add_option("Assault Rifles", "SWAT-566", ::BG_GivePlayerWeapon, "sig566_mp");
self add_option("Assault Rifles", "FAL OSW", ::BG_GivePlayerWeapon, "sa58_mp");
self add_option("Assault Rifles", "M27", ::BG_GivePlayerWeapon, "hk416_mp");
self add_option("Assault Rifles", "SCAR-H", ::BG_GivePlayerWeapon, "scar_mp+dualclip+grip");
self add_option("Assault Rifles", "SMR", ::BG_GivePlayerWeapon, "saritch_mp");
self add_option("Assault Rifles", "M8A1", ::BG_GivePlayerWeapon, "xm8_mp");
self add_option("Assault Rifles", "AN-94", ::BG_GivePlayerWeapon, "an94_mp+reflex+fmj");
self add_menu("Shotguns", "Weapons Menu", "Verified");
self add_option("Shotguns", "R870 MCS", ::BG_GivePlayerWeapon, "870mcs_mp+extbarrel+steadyaim");
self add_option("Shotguns", "S12", ::BG_GivePlayerWeapon, "saiga12_mp");
self add_option("Shotguns", "KSG", ::BG_GivePlayerWeapon, "ksg_mp+extbarrel+steadyaim+dualclip");
self add_option("Shotguns", "M1216", ::BG_GivePlayerWeapon, "srm1216_mp");
self add_menu("Light Machine Guns", "Weapons Menu", "Verified");
self add_option("Light Machine Guns", "MK 48", ::BG_GivePlayerWeapon, "mk48_mp");
self add_option("Light Machine Guns", "QBB LSW", ::BG_GivePlayerWeapon, "qbb95_mp");
self add_option("Light Machine Guns", "LSAT", ::BG_GivePlayerWeapon, "lsat_mp");
self add_option("Light Machine Guns", "HAMR",::BG_GivePlayerWeapon, "hamr_mp");
self add_menu("Sniper Rifles", "Weapons Menu", "Verified");
self add_option("Sniper Rifles", "SVU-AS", ::BG_GivePlayerWeapon, "svu_mp");
self add_option("Sniper Rifles", "DSR 50", ::BG_GivePlayerWeapon, "dsr50_mp+swayreduc+dualclip");
self add_option("Sniper Rifles", "Ballista", ::BG_GivePlayerWeapon, "ballista_mp+dualclip+steadyaim");
self add_option("Sniper Rifles", "XPR-50", ::BG_GivePlayerWeapon, "as50_mp");
self add_menu("Specials", "Weapons Menu", "Verified");
self add_option("Specials", "Assault Shield", ::BG_GivePlayerWeapon, "riotshield_mp");
self add_option("Specials", "Crossbow", ::BG_GivePlayerWeapon, "crossbow_mp");
self add_option("Specials", "Ballistic Knife", ::BG_GivePlayerWeapon, "knife_ballistic_mp");
self add_option("Specials", "Combat Knife", ::BG_GivePlayerWeapon, "knife_held_mp");
self add_menu("Submachine Guns", "Weapons Menu", "Verified");
self add_option("Submachine Guns", "MP7", ::BG_GivePlayerWeapon, "mp7_mp");
self add_option("Submachine Guns", "PDW-57", ::BG_GivePlayerWeapon, "pdw57_mp");
self add_option("Submachine Guns", "Vector K1D", ::BG_GivePlayerWeapon, "vector_mp");
self add_option("Submachine Guns", "MSMC", ::BG_GivePlayerWeapon, "insas_mp+fmj+extbarrel");
self add_option("Submachine Guns", "Chicom CQB", ::BG_GivePlayerWeapon, "qcw05_mp");
self add_option("Submachine Guns", "Skorpion EVO", ::BG_GivePlayerWeapon, "evoskorpion_mp");
self add_option("Submachine Guns", "Peacekeeper", ::BG_GivePlayerWeapon, "peacekeeper_mp+silencer");
self add_menu("Pistols", "Weapons Menu", "Verified");
self add_option("Pistols", "Five Seven", ::BG_GivePlayerWeapon, "fiveseven_mp");
self add_option("Pistols", "Tac-45", ::BG_GivePlayerWeapon, "fnp45_mp");
self add_option("Pistols", "B23R", ::BG_GivePlayerWeapon, "beretta93r_mp+tacknife");
self add_option("Pistols", "Executioner", ::BG_GivePlayerWeapon, "judge_mp");
self add_option("Pistols", "KAP-40", ::BG_GivePlayerWeapon, "kard_mp");
self add_menu("Launchers", "Weapons Menu", "Verified");
self add_option("Launchers", "SMAW", ::BG_GivePlayerWeapon, "smaw_mp");
self add_option("Launchers", "FHJ-18 AA", ::BG_GivePlayerWeapon, "fhj18_mp");
self add_option("Launchers", "RPG", ::BG_GivePlayerWeapon, "usrpg_mp");
self add_menu("Grenades", "Weapons Menu", "Verified");
self add_option("Grenades", "Lethals", ::submenu, "Lethals", "Lethals");
self add_option("Grenades", "Tacticals", ::submenu, "Tacticals", "Tacticals");
self add_menu("Lethals", "Grenades", "Verified");
self add_option("Lethals", "Frag", ::givegrenades, "frag_grenade_mp");
self add_option("Lethals", "Semtex", ::givegrenades, "sticky_grenade_mp");
self add_option("Lethals", "Combat Axe", ::givegrenades, "hatchet_mp");
self add_option("Lethals", "Bouncing Betty", ::givegrenades, "bouncingbetty_mp");
self add_option("Lethals", "C4", ::givegrenades, "satchel_charge_mp");
self add_option("Lethals", "Claymore", ::givegrenades, "claymore_mp");
self add_menu("Tacticals", "Grenades", "Verified");
self add_option("Tacticals", "Concussion", ::givegrenades, "concussion_grenade_mp");
self add_option("Tacticals", "Smoke", ::givegrenades, "willy_pete_mp");
self add_option("Tacticals", "Sensor", ::givegrenades, "sensor_grenade_mp");
self add_option("Tacticals", "EMP", ::givegrenades, "emp_grenade_mp");
self add_option("Tacticals", "Shock Charge", ::givegrenades, "proximity_grenade_mp");
self add_option("Tacticals", "Black Hat", ::givegrenades, "pda_hack_mp");
self add_option("Tacticals", "Flash", ::givegrenades, "flash_grenade_mp");
self add_option("Tacticals", "Trophy System", ::givegrenades, "trophy_system_mp");
self add_option("Tacticals", "Tactical Insertion", ::givegrenades, "tactical_insertion_mp");
self add_menu("Scorestreaks", "Weapons Menu", "Verified");
self add_option("Scorestreaks", "Death Machine", ::BG_GivePlayerWeapon, "minigun_mp");
self add_option("Scorestreaks", "War Machine", ::BG_GivePlayerWeapon, "m32_mp");
self add_menu("Modded Weapons", "Weapons Menu", "Verified");
self add_option("Modded Weapons", "Default Weapon", ::defaultGun);
self add_option("Modded Weapons", "Counter Strike Knife", ::BG_GivePlayerWeapon, "knife_mp");
self add_option("Modded Weapons", "Earthquake Gun", ::ToggleEarthquakegun);
self add_option("Modded Weapons", "Portal Gun", ::portalToggle);
self add_option("Modded Weapons", "Ray Gun Mark I", ::initRaygun);
self add_option("Modded Weapons", "Ray Gun Mark II", ::initRaygunM2);
self add_option("Modded Weapons", "Ray Gun Mark III", ::doRaygunM3);
self add_option("Modded Weapons", "Ray Gun Mark IV", ::doRaygunM4);
self add_menu("Modded Bullets Menu", "Main Menu", "Admin");
self add_option("Modded Bullets Menu", "Care Package Bullets", ::doCarePBullets);
self add_option("Modded Bullets Menu", "Shoot Swarms", ::ToggleSwarmGun);
self add_option("Modded Bullets Menu", "Shoot Hell Missiles", ::ToggleHellGun);
self add_option("Modded Bullets Menu", "Shoot Ballistics", ::toggleSkewer);
self add_option("Modded Bullets Menu", "Shoot Grenades", ::ToggleGGun);
self add_option("Modded Bullets Menu", "Shoot RPGs", ::initRPGBullet);
self add_menu("Aimbot/Flips Menu", "Main Menu", "Admin");
self add_option("Aimbot/Flips Menu", "Classic Aimbot", ::doAimbots2);
self add_option("Aimbot/Flips Menu", "Legit Aimbot", ::doAimbotsL);
self add_option("Aimbot/Flips Menu", "Legit Aimbot No Aim", ::doAimbotsna);
self add_option("Aimbot/Flips Menu", "Unfair Aimbot", ::doAimbots);
self add_option("Aimbot/Flips Menu", "Trickshot Aimbot", ::initaimBotBILL);
self add_option("Aimbot/Flips Menu", "Tomahawk Aimbot", ::tomahawkaimbot);
self add_option("Aimbot/Flips Menu", "Front Flip", ::ToggleFlips, "FrontFlip");
self add_option("Aimbot/Flips Menu", "Back Flip", ::ToggleFlips, "BackFlip");
self add_option("Aimbot/Flips Menu", "Side Flip Left", ::ToggleFlips, "SideFlipLeft");
self add_option("Aimbot/Flips Menu", "Side Flip Right", ::ToggleFlips, "SideFlipRight");
self add_menu("Spawnables Menu", "Main Menu", "VIP");
self add_option("Spawnables Menu", "Stairway to Heaven", ::spawnstairwaytoheaven);
self add_option("Spawnables Menu", "Spawn Warpzone", ::initteletoflag);
self add_option("Spawnables Menu", "Bunker", ::initspawnbunker);
self add_option("Spawnables Menu", "Sky Plaza", ::initskyplaza);
self add_option("Spawnables Menu", "Merry Go Round", ::build);
self add_option("Spawnables Menu", "Delete Merry Go Round", ::explode);
self add_option("Spawnables Menu", "WindMill", ::windmill);
self add_option("Spawnables Menu", "Spawn SpiralStairs", ::SSpiralStairs);
self add_option("Spawnables Menu", "Spawn TrickShot Plate", ::Platform);
self add_option("Spawnables Menu", "Spawn TrickShot Steps", ::bunkerthread19);
self add_option("Spawnables Menu", "Earhquake Actor", ::toggleearthquakegirl);
self add_option("Spawnables Menu", "Actor Wave", ::mexicanwave);
self add_option("Spawnables Menu", "Dog Wave", ::dogwave);
self add_menu("Killstreaks Menu", "Main Menu", "Admin");
self add_option("Killstreaks Menu", "Give UAV", ::GiveUAV);
self add_option("Killstreaks Menu", "Give RC-XD", ::GiveRC);
self add_option("Killstreaks Menu", "Give Hunter Killer", ::GiveHunt);
self add_option("Killstreaks Menu", "Give Care Package", ::GiveCare);
self add_option("Killstreaks Menu", "Give Counter UAV", ::GiveCUAV);
self add_option("Killstreaks Menu", "Give Guardian", ::GiveGuard);
self add_option("Killstreaks Menu", "Give Hellstorm", ::GiveHell);
self add_option("Killstreaks Menu", "Give Lightning Strike", ::GiveLS);
self add_option("Killstreaks Menu", "Give Sentry Gun", ::GiveSG);
self add_option("Killstreaks Menu", "Give AGR", ::GiveAG);
self add_option("Killstreaks Menu", "Killstreaks Menu 2", ::submenu, "Killstreaks Menu 2", "Killstreaks Menu 2");
self add_menu("Killstreaks Menu 2","Killstreaks Menu", "Admin");
self add_option("Killstreaks Menu 2", "Give Stealth Chopper", ::GiveSC);
self add_option("Killstreaks Menu 2", "Give Orbital VSAT", ::GiveVSAT);
self add_option("Killstreaks Menu 2", "Give Escort Drone", ::GiveED);
self add_option("Killstreaks Menu 2", "Give EMP", ::GiveEMP);
self add_option("Killstreaks Menu 2", "Give Warthog", ::GiveWH);
self add_option("Killstreaks Menu 2", "Give Lodestar", ::GiveLST);
self add_option("Killstreaks Menu 2", "Give VTOL Warship", ::GiveVW);
self add_option("Killstreaks Menu 2", "Give Swarm", ::GiveSwarm);
self add_menu("Game Settings/XP Menu", "Main Menu", "Co-Host");
self add_option("Game Settings/XP Menu", "Super Speed", ::SuperSpeed);
self add_option("Game Settings/XP Menu", "Super Jump", ::ToggleSuperJump);
self add_option("Game Settings/XP Menu", "Bouncy Grenades", ::bouncygrenades);
self add_option("Game Settings/XP Menu", "Moon Gravity", ::gravity);
self add_option("Game Settings/XP Menu", "Toggle Timescales", ::Toggle_Timescales);
self add_option("Game Settings/XP Menu", "Hear Everyone", ::hearallplayers);
self add_option("Game Settings/XP Menu", "Anti-Quit", ::toggleAntiQuit);
self add_option("Game Settings/XP Menu", "Map Restart", ::MapRestart);
self add_option("Game Settings/XP Menu", "Remove Killcam", ::longkillcam0);
self add_option("Game Settings/XP Menu", "Pause Game", ::Pause);
self add_option("Game Settings/XP Menu", "End Game", ::endGame);
self add_option("Game Settings/XP Menu", "Unlimited Game", ::Inf_Game);
self add_option("Game Settings/XP Menu", "Hardcore Mode", ::hardcore);
self add_option("Game Settings/XP Menu", "Disable Deathbarrier", ::toggleDeathBarrier);
self add_option("Game Settings/XP Menu", "XP Menu", ::submenu, "XP Menu", "XP Menu");
self add_menu("XP Menu", "Game Settings/XP Menu", "Co-Host");
self add_option("XP Menu", "XP", ::submenu, "XP", "XP");
self add_option("XP Menu", "Kills", ::submenu, "Kills", "Kills");
self add_option("XP Menu", "Score", ::submenu, "Score", "Score");
self add_menu("XP", "XP Menu", "Host");
self add_option("XP", "Normal XP", ::xp100);
self add_option("XP", "1,000 XP", ::xp1k);
self add_option("XP", "10,000 XP", ::xp10k);
self add_option("XP", "100,000 XP", ::xp100k);
self add_option("XP", "5,000 XP", ::xp5k);
self add_option("XP", "50,000 XP", ::xp50k);
self add_option("XP", "500,000 XP", ::xp500k);
self add_menu("Kills", "XP Menu", "Co-Host");
self add_option("Kills", "100,000 Kills", ::addKillsStat, 100000);
self add_option("Kills", "300,000 Kills", ::addKillsStat, 300000);
self add_option("Kills", "500,000 Kills", ::addKillsStat, 500000);
self add_menu("Score", "XP Menu", "Co-Host");
self add_option("Score", "10,000 Score", ::addScoreStat, 10000);
self add_option("Score", "100,000 Score", ::addScoreStat, 100000);
self add_option("Score", "1 Million Score", ::addScoreStat, 1000000000);
self add_option("Score", "Ten Million Score", ::addScoreStat, 10000000);
self add_option("Score", "100 Million Score", ::addscorestat, 100000000);
self add_menu("Maps Menu", "Main Menu", "Co-Host");
self add_option("Maps Menu", "Aftermath", ::doMap, "mp_la");
self add_option("Maps Menu", "Carrier", ::doMap, "mp_carrier");
self add_option("Maps Menu", "Cargo", ::doMap, "mp_dockside");
self add_option("Maps Menu", "Drone", ::doMap, "mp_drone");
self add_option("Maps Menu", "Express", ::doMap, "mp_express");
self add_option("Maps Menu", "Hijacked", ::doMap, "mp_hijacked");
self add_option("Maps Menu", "Meltdown", ::doMap, "mp_meltdown");
self add_option("Maps Menu", "Nuketown", ::doMap, "mp_nuketown_2020");
self add_option("Maps Menu", "Overflow", ::doMap, "mp_overflow");
self add_option("Maps Menu", "Plaza", ::doMap, "mp_nightclub");
self add_option("Maps Menu", "Raid", ::doMap, "mp_raid");
self add_option("Maps Menu", "Slums", ::doMap, "mp_slums");
self add_option("Maps Menu", "Standoff", ::doMap, "mp_village");
self add_option("Maps Menu", "Turbine", ::doMap, "mp_turbine");
self add_option("Maps Menu", "Yemen", ::doMap, "mp_socotra");
self add_option("Maps Menu", "DLC", ::submenu, "DLC", "DLC");
self add_menu("DLC", "Maps Menu", "Co-Host");
self add_option("DLC", "Dig", ::doMap, "mp_dig");
self add_option("DLC", "Pod", ::doMap, "mp_pod");
self add_option("DLC", "Frost", ::doMap, "mp_frostbite");
self add_option("DLC", "Takeoff", ::doMap, "mp_takeoff");
self add_option("DLC", "Downhill", ::doMap, "mp_downhill");
self add_option("DLC", "Hydro", ::doMap, "mp_hydro");
self add_option("DLC", "Mirage", ::doMap, "mp_mirage");
self add_option("DLC", "Grind", ::doMap, "mp_skate");
self add_option("DLC", "Magma", ::doMap, "mp_magma");
self add_option("DLC", "Encore", ::doMap, "mp_concert");
self add_option("DLC", "Vertigo", ::doMap, "mp_vertigo");
self add_option("DLC", "Studio", ::doMap, "mp_studio");
self add_option("DLC", "Cove", ::doMap, "mp_castaway");
self add_option("DLC", "Detour", ::doMap, "mp_bridge");
self add_option("DLC", "Rush", ::doMap, "mp_paintball");
self add_option("DLC", "Uplink", ::doMap, "mp_uplink");
self add_menu("Lobby Menu", "Main Menu", "Co-Host");
self add_option("Lobby Menu", "Kamikaze Bomber", ::kamikaze);
self add_option("Lobby Menu", "Forge Mode", ::ToggleForgeMode);
self add_option("Lobby Menu", "Delete Objects", ::rapidDelete);
self add_option("Lobby Menu", "Pickup Players", ::togglePickup);
self add_option("Lobby Menu", "Jericho Missile", ::initJericho);
self add_option("Lobby Menu", "DoHeart", ::doHeart);
self add_option("Lobby Menu", "Advertise", ::doAdvert);
self add_option("Lobby Menu", level.hostname, ::initspintext2);
self add_option("Lobby Menu", "Time For Mods", ::initspintext);
self add_option("Lobby Menu", "Teleport Everyone To Me", ::doallplayerstome);
self add_option("Lobby Menu", "ESP Wallhack", ::ToggleWallHack);
self add_option("Lobby Menu", "News Bars", ::NewsBarsLol);
self add_menu("Colors Menu", "Main Menu", "Verified");
self add_option("Colors Menu", "Line & Scroll", ::submenu, "Line & Scroll", "Line & Scroll");
self add_option("Colors Menu", "Background", ::submenu, "Background", "Background");
self add_menu("Background", "Colors Menu", "Verified");
self add_option("Background", "White Color", ::doWhiteTheme2);
self add_option("Background", "Red Color", ::doRedtheme2);
self add_option("Background", "Blue Color", ::dobluetheme2);
self add_option("Background", "Green Color", ::doGreentheme2);
self add_option("Background", "Yellow Color", ::doYellowtheme2);
self add_option("Background", "Pink Theme", ::doPinktheme2);
self add_option("Background", "Cyan Theme", ::doCyantheme2);
self add_option("Background", "Aqua Theme", ::doAquatheme2);
self add_option("Background", "Black Theme", ::doBlackTheme2);
self add_menu("Line & Scroll", "Colors Menu", "Verified");
self add_option("Line & Scroll", "White Color", ::doWhiteTheme);
self add_option("Line & Scroll", "Red Color", ::doRedtheme);
self add_option("Line & Scroll", "Blue Color", ::dobluetheme);
self add_option("Line & Scroll", "Green Color", ::doGreentheme);
self add_option("Line & Scroll", "Yellow Color", ::doYellowtheme);
self add_option("Line & Scroll", "Pink Theme", ::doPinktheme);
self add_option("Line & Scroll", "Cyan Theme", ::doCyantheme);
self add_option("Line & Scroll", "Aqua Theme", ::doAquatheme);
self add_option("Line & Scroll", "Black Theme", ::doBlackTheme);
self add_menu("Messages Menu", "Main Menu", "Verified");
self add_option("Messages Menu", "Typewriter", ::typewrite);
self add_option("Messages Menu", "Insults", ::submenu, "Insults", "Insults");
self add_option("Messages Menu", "Advertising", ::submenu, "Advertising", "Advertising");
self add_menu("Insults", "Messages Menu", "Co-Host");
self add_option("Insults", "Sweating", ::typewriter, "^1Stop ****ing sweating");
self add_option("Insults", "Butthurt", ::typewriter, "^2Butthurt much?");
self add_option("Insults", "Script Kitty", ::typewriter, "^3Script kitty nerd");
self add_option("Insults", "I win", ::typewriter, "^4I Win :P");
self add_option("Insults", "Tryhard", ::typewriter, "^5Stop trying you're bad at it");
self add_option("Insults", "All you got", ::typewriter, "^6Lol Is That All You Got?");
self add_option("Insults", "USB Mods", ::typewriter, "^5I Bet You're one of those kids that believe in usb mods");
self add_option("Insults", "Get Laid", ::typewriter, "^4Go Get Laid Kid");
self add_option("Insults", "S.W.A.T", ::typewriter, "^3You wanna get swatted?");
self add_option("Insults", "Stop talking", ::typewriter, "^2Stop Talking ****ing squeaker");
self add_option("Insults", "****ed", ::typewriter, "^1You're all ****ed");
self add_option("Insults", "Osama", ::osama);
self add_menu("Advertising", "Messages Menu", "Host");
self add_option("Advertising", "Instagram", ::initspintext3);
self add_option("Advertising", "YoutTube", ::initspintext4);
self add_option("Advertising", "DM For Recovery", ::typewriter, "^2DM me for Co-Host @plzz_rgh");
self add_option("Advertising", "$5 Co-Host", ::typewriter, "$^25 ^5Cohost for an hour");
self add_option("Advertising", "$25 Lifetime", ::typewriter, "$^225 for lifetime");
self add_option("Advertising", "$5 XP Lobby", ::typewriter, "$^25 for an XP Lobby");
self add_menu("Visions Menu", "Main Menu", "Verified" );
self add_option("Visions Menu", "Black & White Vision", ::bwv );
self add_option("Visions Menu", "Light Vision", ::lvis );
self add_option("Visions Menu", "Enhanced Vision", ::ev );
self add_option("Visions Menu", "EMP Vision", ::emp );
self add_option("Visions Menu", "Poison Vision", ::poisonv );
self add_option("Visions Menu", "Thermal Vision", ::thermal );
self add_menu("Visions Menu", "Main Menu", "Verified");
self add_option("Visions Menu", "Black & White Vision", ::BWV);
self add_option("Visions Menu", "Light Vision", ::LVis);
self add_option("Visions Menu", "Enhanced Vision", ::EV);
self add_option("Visions Menu", "EMP Vision", ::emp);
self add_option("Visions Menu", "Poison Vision", ::poisonv);
self add_option("Visions Menu", "Thermal Vision", ::thermal);
self add_menu("Model Menu", "Main Menu", "Verified");
self add_option("Model Menu", "Default", ::setdefomodel);
self add_option("Model Menu", "Vehicle", ::spawnplayermodel, self, "defaultvehicle");
self add_option("Model Menu", "Crazy Dog", ::spawnplayermodel, self, "german_shepherd");
self add_option("Model Menu", "Suitcase Bomb", ::spawnplayermodel, self, "prop_suitcase_bomb");
self add_option("Model Menu", "Default Actor", ::modelf, "defaultactor");
self add_option("Model Menu", "Sentry Gun", ::spawnplayermodel, self, "t6_wpn_turret_sentry_gun");
self add_option("Model Menu", "Care Package", ::spawnplayermodel, self, "t6_wpn_supply_drop_ally");
self add_option("Model Menu", "A.G.R", ::spawnplayermodel, self, "veh_t6_drone_tank");
self add_option("Model Menu", "Trophy System", ::spawnplayermodel, self, "t6_wpn_trophy_system_world");
self add_option("Model Menu", "Hunter Killer", ::spawnplayermodel, self, "veh_t6_drone_hunterkiller");
self add_option("Model Menu", "Bomb Site", ::spawnplayermodel, self, "p_glo_bomb_stack");
self add_option("Model Menu", "Hellfire Projectile", ::spawnplayermodel, self, "projectile_hellfire_missile");
self add_option("Model Menu", "VTOL", ::spawnplayermodel, self, "veh_t6_air_v78_vtol_killstreak");
self add_option("Model Menu", "UAV", ::spawnplayermodel, self, "veh_t6_drone_uav");
self add_option("Model Menu", "RC-XD", ::spawnplayermodel, self, "veh_t6_drone_rcxd");
self add_menu("Modded Killstreaks", "Main Menu", "VIP");
self add_option("Modded Killstreaks", "Escort Airdrop", ::MegaAirDrop);
self add_option("Modded Killstreaks", "Escort Airdrop (AGR)", ::megaairdrop2);
self add_option("Modded Killstreaks", "Strafe Run", ::initstraferun);
self add_option("Modded Killstreaks", "Swarm Barrage", ::hunterbarrage);
self add_option("Modded Killstreaks", "Missile Barrage", ::missilebarrage);
self add_option("Modded Killstreaks", "Grenade Barrage", ::nadebarrage);
self add_option("Modded Killstreaks", "Hellstorm Barrage", ::hellbarrage);
self add_option("Modded Killstreaks", "Shoot Retard Actor", ::initdogbullets);
self add_option("Modded Killstreaks", "Shoot Retard Man", ::retardman);
self add_option("Modded Killstreaks", "Shoot AGR Dog", ::agrdog);
self add_menu("PlayersMenu", "Main Menu", "Co-Host");
for (i = 0; i < 12; i++)
{
self add_menu("pOpt " + i, "PlayersMenu", "Co-Host");
}
self add_menu("Next Page", "Main Menu", "Co-Host");
self add_option("Next Page", "Team Mods Menu", ::submenu, "Team Mods Menu", "Team Mods Menu");
self add_option("Next Page", "Bot Spawn Menu", ::submenu, "Bot Spawn Menu", "Bot Spawn Menu");
self add_option("Next Page", "All Players", ::submenu, "AllPlayers", "All Players");
self add_menu("Team Mods Menu", "Next Page", "Co-Host");
self add_option("Team Mods Menu", "^2Team", ::submenu, "^2Team", "^2Team");
self add_option("Team Mods Menu", "^1Enemy Team", ::submenu, "^1Enemy Team", "^1Enemy Team");
self add_menu("^2Team", "Team Mods Menu", "Co-Host");
self add_option("^2Team", "Godmode for Teammates", ::godmodeteam);
self add_option("^2Team", "Revive Teammates", ::reviveALLIES);
self add_option("^2Team", "Teleport Team To Crosshairs", ::teleTeamtoCrosshairs);
self add_option("^2Team", "Invisibility for Teammates", ::invisibleteam);
self add_option("^2Team", "Give Teammates Hunter Killer Ride", ::giveteamhunterRide);
self add_option("^2Team", "Give Team ESP", ::teamESP);
self add_option("^2Team", "Give Team Rapid Fire", ::giveteamRapid);
self add_option("^2Team", "Give Teammates Aimbot", ::giveTeamAimbot);
self add_option("^2Team", "Give Team All Perks", ::teamperks);
self add_menu("^1Enemy Team", "Team Mods Menu", "Co-Host");
self add_option("^1Enemy Team", "Revive Enemy Teammates", ::reviveAXIS);
self add_option("^1Enemy Team", "Kill Enemy Team", ::enemykill);
self add_option("^1Enemy Team", "Kick Enemy Team", ::enemykick);
self add_option("^1Enemy Team", "Blind Enemy Team", ::blindenemy);
self add_option("^1Enemy Team", "Freeze Enemy Team", ::freezeenemy);
self add_option("^1Enemy Team", "Teleport Enemy Team To Crosshairs", ::teleenemytocrosshairs);
self add_option("^1Enemy Team", "Take Weapons From Enemies", ::takewepsfromenemy);
self add_option("^1Enemy Team", "Take Perks From Enemies", ::****perks);
self add_option("^1Enemy Team", "Send Enemy Team To Space", ::enemyspace);
self add_menu("Bot Spawn Menu", "Main Menu", "Co-Host");
self add_option("Bot Spawn Menu", "Spawn 1 Bot", ::spawn1);
self add_option("Bot Spawn Menu", "Spawn 3 Bots", ::spawn3);
self add_option("Bot Spawn Menu", "Spawn 6 Bots", ::spawn6);
self add_option("Bot Spawn Menu", "Spawn 18 Bots", ::spawn18);
self add_menu("AllPlayers", "Main Menu", "Host");
self add_option("AllPlayers", "Kill All", ::killall);
self add_option("AllPlayers", "Kick All Unverified", ::kickall);
self add_option("AllPlayers", "Godmode All", ::godmodeall);
self add_option("AllPlayers", "Infinite Ammo All", ::infiniteammoall);
self add_option("AllPlayers", "Freeze/Unfreeze All", ::freezeall);
self add_option("AllPlayers", "Blind All", ::blindall);
self add_option("AllPlayers", "TP To Crosshairs", ::teletocrosshairs);
self add_option("AllPlayers", "Third Person All", ::thirdpersall);
self add_option("AllPlayers", "Take All Weapons", ::takeallplayerweapons);
self add_option("AllPlayers", "Send All To Space", ::sendalltospace);
self add_option("AllPlayers", "Adventure Time All", ::allplayersadventure);
self add_option("AllPlayers", "Verify All", ::verifyall);
self add_option("AllPlayers", "VIP All", ::vipall);
self add_option("AllPlayers", "Unverify All", ::unverifyall);
self add_option("AllPlayers", "More", ::submenu, "More", "More");
self add_menu("More", "AllPlayers", "Host");
self add_option("More", "Give all Raygun Mark I", ::AllPlayersRayGun);
self add_option("More", "Give all Raygun Mark II", ::AllPlayersRayGunM2);
self add_option("More", "Give all Raygun Mark III", ::AllPlayersRayGunM3);
self add_option("More", "Give all Raygun Mark IV", ::AllPlayersRayGunM4);
}
updatePlayersMenu()
{
self.menu.menucount["PlayersMenu"] = 0;
for (i = 0; i < 12; i++)
{
player = level.players[i];
name = player.name;
playersizefixed = level.players.size - 1;
if(self.menu.curs["PlayersMenu"] > playersizefixed)
{
self.menu.scrollerpos["PlayersMenu"] = playersizefixed;
self.menu.curs["PlayersMenu"] = playersizefixed;
}
self add_option("PlayersMenu", name, ::submenu, "pOpt " + i, "[" + verificationtocolor(player.status) + "^7] " + name);
self add_menu_alt("pOpt " + i, "PlayersMenu");
self add_option("pOpt " + i, "Give Co-Host", ::changeVerificationMenu, player, "Co-Host");
self add_option("pOpt " + i, "Co-Host List", ::addCoList, player);
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, "Teleport To Me", ::teletome, player);
self add_option("pOpt " + i, "Teleport To Him", ::teletohim, player);
self add_option("pOpt " + i, "Give Godmode", ::givegodmode, player);
self add_option("pOpt " + i, "Give Unlimited Ammo", ::giveammo, player);
self add_option("pOpt " + i, "Give Invisibility", ::giveInvisibility, player);
self add_option("pOpt " + i, "Kill", ::killplayer, player);
self add_option("pOpt " + i, "Kick", ::kickplayer, player);
self add_option("pOpt " + i, "Freeze/Unfreeze", ::freezeplayer, player);
self add_option("pOpt " + i, "Freeze Console", ::freezeconsole, player);
self add_option("pOpt " + i, "Blind", ::blindplayer, player);
self add_option("pOpt " + i, "Spin", ::ToggleSpin, player);
self add_option("pOpt " + i, "Send to Space", ::sendtospace, player);
self add_option("pOpt " + i, "Page 2", ::submenu, "pOpt2 " + i, "[" + verificationtocolor(player.status) + "^7] " + name);
self add_menu("pOpt2 " + i, "pOpt " + i, "Co-Host" );
self add_option("pOpt2 " + i, "Clear Co-Host list", ::clearcolist);
self add_option("pOpt2 " + i, "Revive Player", ::reviveplayer, player);
self add_option("pOpt2 " + i, "Give Hunter Killer Ride", ::givehunterride, player);
self add_option("pOpt2 " + i, "Take All Weapons", ::takewepsfromplayer, player);
self add_option("pOpt2 " + i, "Give Unfair Aimbot", ::giveunfair, player);
self add_option("pOpt2 " + i, "Give Super Speed", ::givespeed, player);
self add_option("pOpt2 " + i, "Give Rocket Teleporter", ::giverocketteleportgun, player);
self add_option("pOpt2 " + i, "Give Portal Gun", ::giveportal, player );
self add_option("pOpt2 " + i, "Give Default Weapon", ::givedefaultgun, player);
self add_option("pOpt2 " + i, "Give Rapid Fire", ::giverapid, player);
self add_option("pOpt2 " + i, "Page 3", ::submenu, "pOpt3 " + i, "[" + verificationtocolor(player.status) + "^7] " + name);
self add_menu("pOpt3 " + i, "pOpt2 " + i, "Co-Host" );
self add_option("pOpt3 " + i, "Let Player Change Class", ::giveclass, player);
self add_option("pOpt3 " + i, "Change Player Team", ::changePlayerTeam, player);
self add_option("pOpt3 " + i, "Teleport to Crosshairs", ::teleplayerToCrosshairs, player);
}
}
add_menu_alt(Menu, prevmenu)
{
self.menu.getmenu[Menu] = Menu;
self.menu.menucount[Menu] = 0;
self.menu.previousmenu[Menu] = prevmenu;
}
add_menu(Menu, prevmenu, status)
{
self.menu.status[Menu] = status;
self.menu.getmenu[Menu] = Menu;
self.menu.scrollerpos[Menu] = 0;
self.menu.curs[Menu] = 0;
self.menu.menucount[Menu] = 0;
self.menu.previousmenu[Menu] = prevmenu;
}
add_option(Menu, Text, Func, arg1, arg2)
{
Menu = self.menu.getmenu[Menu];
Num = self.menu.menucount[Menu];
self.menu.menuopt[Menu][Num] = Text;
self.menu.menufunc[Menu][Num] = Func;
self.menu.menuinput[Menu][Num] = arg1;
self.menu.menuinput1[Menu][Num] = arg2;
self.menu.menucount[Menu] += 1;
}
updateScrollbar()
{
self.menu.scroller MoveOverTime(.15);
self.menu.scroller.archived = false;
self.menu.scroller.y = 68 + (self.menu.curs[self.menu.currentmenu] * 19.20);
}
openMenu()
{
self freezeControls(false);
self StoreText("Main Menu", "Main Menu");
self.menu.background FadeOverTime(0.3);
self.menu.background.alpha = 0.65;
self.menu.background.archived = false;
self.menu.background2 FadeOverTime(0.3);
self.menu.background2.alpha = 0.65;
self.menu.background2.archived = false;
self.menu.line MoveOverTime(0.15);
self.menu.line.y = -50;
self.menu.line.archived = false;
self.menu.line2 MoveOverTime(0.15);
self.menu.line2.y = -50;
self.menu.line2.archived = false;
self updateScrollbar();
self.menu.open = true;
self setclientuivisibilityflag( "hud_visible", 1 );
}
closeMenu()
{
self.menu.options FadeOverTime(0.3);
self.menu.options.alpha = 0;
self.menu.background FadeOverTime(0.3);
self.menu.background.alpha = 0;
self.menu.background2 FadeOverTime(0.3);
self.menu.background2.alpha = 0;
self.menu.title FadeOverTime(0.3);
self.menu.title.alpha = 0;
self.tez FadeOverTime(0.3);
self.tez.alpha = 0;
self.menu.line MoveOverTime(0.15);
self.menu.line.y = -550;
self.menu.line2 MoveOverTime(0.15);
self.menu.line2.y = -550;
self.menu.scroller MoveOverTime(0.15);
self.menu.scroller.y = -500;
self.menu.open = false;
self setclientuivisibilityflag( "hud_visible", 1 );
}
scaleLol()
{
self endon("stopScale");
for(;;)
{
self.tez.fontscale = 2.5;
wait .05;
self.tez.fontscale = 2.6;
wait .05;
self.tez.fontscale = 2.7;
wait .05;
self.tez.fontscale = 2.8;
wait .05;
self.tez.fontscale = 2.9;
wait .05;
self.tez.fontscale = 3;
wait .05;
self.tez.fontscale = 2.9;
wait .05;
self.tez.fontscale = 2.8;
wait .05;
self.tez.fontscale = 2.7;
wait .05;
self.tez.fontscale = 2.6;
wait .05;
}
}
destroyMenu(player)
{
player.MenuInit = false;
closeMenu();
wait 0.3;
player.menu.options destroy();
player.menu.background destroy();
player.menu.background2 destroy();
player.menu.scroller destroy();
player.menu.line destroy();
player.menu.line2 destroy();
player.menu.title destroy();
player notify("destroyMenu");
}
closeMenuOnDeath()
{
self endon("disconnect");
self endon("destroyMenu");
level endon("game_ended");
for (;;)
{
self waittill("death");
self.menu.closeondeath = true;
self submenu("Main Menu", "Main Menu");
closeMenu();
self.menu.closeondeath = false;
}
}
StoreShaders()
{
self.menu.background = self drawShader("white", 235, -100, 230, 1000, (0, 0, 0), 0, 0);
self.menu.background2 = self drawShader("compass_emp", 235, -100, 230, 1000, (0, 0, 1), 0, 0);
self.menu.scroller = self drawShader("white", 235, -100, 230, 17, (255, 255, 255), 255, 1);
self.menu.line = self drawShader("white", 120, -1000, 2, 500, (0, 0, 1), 255, 3);
self.menu.line2 = self drawShader("white", 350, -1000, 2, 500, (0, 0, 1), 255, 2);
}
StoreText(menu, title)
{
self.menu.currentmenu = menu;
string = "";
self.menu.title destroy();
self.menu.title = drawText(title, "default", 1.6, 220, 30, (1, 1, 1), 0, (0, 0, 0), 1, 3);
self.menu.title FadeOverTime(0.3);
self.menu.title.alpha = 1;
self.menu.title.archived = false;
self notify ("stopScale");
self notify ("stop_rainText4");
self notify ("stop_rainTextC4");
self thread scaleLol();
self thread rainbowtext4();
self thread changerainbowtextcolor4();
self.tez destroy();
self.tez = self createFontString( "default", 2.5);
self.tez setPoint( "LEFT", "LEFT", 503, -195 );
self.tez FadeOverTime(0.3);
self.tez.alpha = 1;
self.tez.foreground = true;
self.tez.archived = false;
self.tez.glowAlpha = 1;
self.tez.glowColor = (0,0,1);
for(i = 0; i < self.menu.menuopt[menu].size; i++)
{
string += self.menu.menuopt[menu][i] + "\n";
}
self.menu.options destroy();
self.menu.options = drawText(string, "objective", 1.6, 265, 68, (1, 1, 1), 0, (0, 0, 0), 0, 4);
self.menu.options FadeOverTime(0.3);
self.menu.options.alpha = 1;
self.menu.options.archived = false;
self.menu.options setPoint( "LEFT", "LEFT", 503, -128 );
}
rainbowtext4()
{
self endon("stop_rainText4");
self endon("death");
self thread changerainbowtextcolor4();
coordx = 50;
coordy = 50;
radius = 100;
index = 0;
for(;;)
{
self.tez setText("Operation MKG");
wait 0.01;
index++;
}
}
changerainbowtextcolor4()
{
self endon("stop_rainTextC4");
self endon("death");
for(;;)
{
self.tez fadeovertime(1);
self.tez.color = (1, 0, 0);
self.tez fadeovertime(1);
self.tez.glowalpha = 1;
self.tez.glowcolor = (1, 0, 0);
wait 1;
self.tez fadeovertime(1);
self.tez.color = (0, 1, 0);
self.tez fadeovertime(1);
self.tez.glowalpha = 1;
self.tez.glowcolor = (0, 1, 0);
wait 1;
self.tez fadeovertime(1);
self.tez.color = (0, 0, 1);
self.tez fadeovertime(1);
self.tez.glowalpha = 1;
self.tez.glowcolor = (0, 0, 1);
wait 1;
self.tez fadeovertime(1);
self.tez.color = (255, 0, 255);
self.tez fadeovertime(1);
self.tez.glowalpha = 1;
self.tez.glowcolor = (255, 0, 255);
wait 1;
self.tez fadeovertime(1);
self.tez.color = (0, 255, 0);
self.tez fadeovertime(1);
self.tez.glowalpha = 1;
self.tez.glowcolor = (0, 255, 0);
wait 1;
self.tez fadeovertime(1);
self.tez.color = (255, 255, 0);
self.tez fadeovertime(1);
self.tez.glowalpha = 1;
self.tez.glowcolor = (255, 255, 0);
wait 1;
}
}
MenuInit()
{
self endon("disconnect");
self endon("destroyMenu");
self.menu = spawnstruct();
self.toggles = spawnstruct();
self.menu.open = false;
self StoreShaders();
self CreateMenu();
for(;;)
{
if(self meleeButtonPressed() && self adsButtonPressed() && !self.menu.open)
{
self playsoundtoplayer("cac_enter_cac", self);
openMenu();
}
if(self.menu.open)
{
if(self useButtonPressed())
{
if(isDefined(self.menu.previousmenu[self.menu.currentmenu]))
{
self submenu(self.menu.previousmenu[self.menu.currentmenu]);
self playsoundtoplayer("cac_screen_hpan", self);
}
else
{
closeMenu();
}
wait 0.2;
}
if(self actionSlotOneButtonPressed() || self actionSlotTwoButtonPressed())
{
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 playsoundtoplayer("cac_grid_nav", self);
self updateScrollbar();
}
if(self jumpButtonPressed())
{
self thread [[self.menu.menufunc[self.menu.currentmenu][self.menu.curs[self.menu.currentmenu]]]](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("cac_grid_equip_item", self);
wait 0.2;
}
}
wait 0.05;
}
}
submenu(input, title)
{
if (verificationToNum(self.status) >= verificationToNum(self.menu.status[input]))
{
self.menu.options destroy();
if (input == "Main Menu")
self thread StoreText(input, "Main Menu");
else if (input == "PlayersMenu")
{
self updatePlayersMenu();
self thread StoreText(input, "Players");
}
else
self thread StoreText(input, title);
self.CurMenu = input;
self.CurTitle = title;
self.menu.scrollerpos[self.CurMenu] = self.menu.curs[self.CurMenu];
self.menu.curs[input] = self.menu.scrollerpos[input];
level.result += 1;
level notify("textset");
if (!self.menu.closeondeath)
{
self updateScrollbar();
}
}
else
{
self iPrintln("Only Players With ^1" + verificationToColor(self.menu.status[input]) + " ^7Can Access This Menu!");
}
}
elemcolor(time, color)
{
self fadeovertime(time);
self.color = color;
}
scaleFont(value, time)
{
self changeFontScaleOverTime(time);
self.fontScale = value;
}
elemMoveY(time, input)
{
self moveOverTime(time);
self.y = input;
}
elemMoveX(time, input)
{
self moveOverTime(time);
self.x = input;
}
elemFade(time, alpha)
{
self fadeOverTime(time);
self.alpha = alpha;
}
h( aw, bg )
{
setdvar( aw, bg );
}
addCoList(player)
{
if(self isHost())
{
if(!player isHost())
{
nameDvarStick = player getName();
if(nameDvarStick == getDvar("coHost1") || nameDvarStick == getDvar("coHost2") || nameDvarStick == getDvar("coHost3") || nameDvarStick == getDvar("coHost4") || nameDvarStick == getDvar("coHost5") || nameDvarStick == getDvar("coHost6") || nameDvarStick == getDvar("coHost7") || nameDvarStick == getDvar("coHost8") || nameDvarStick == getDvar("coHost9") || nameDvarStick == getDvar("coHost10"))
self iprintln("^1Player is already stored in Co-Host list.");
else if(getDvar("dvarCoNumber") == "0" || getDvar("dvarCoNumber") == "")
{
self iprintln("^6" + nameDvarStick + " added to Co-Host list.");
h("coHost1", nameDvarStick);
h("dvarCoNumber", "1");
}
else if(getDvar("dvarCoNumber") == "1")
{
self iprintln("^6" + nameDvarStick + " added to Co-Host list.");
h("coHost2", nameDvarStick);
h("dvarCoNumber", "2");
}
else if(getDvar("dvarCoNumber") == "2")
{
self iprintln("^6" + nameDvarStick + " added to Co-Host list.");
h("coHost3", nameDvarStick);
h("dvarCoNumber", "3");
}
else if(getDvar("dvarCoNumber") == "3")
{
self iprintln("^6" + nameDvarStick + " added to Co-Host list.");
h("coHost4", nameDvarStick);
h("dvarCoNumber", "4");
}
else if(getDvar("dvarCoNumber") == "4")
{
self iprintln("^6" + nameDvarStick + " added to Co-Host list.");
h("coHost5", nameDvarStick);
h("dvarCoNumber", "5");
}
else if(getDvar("dvarCoNumber") == "5")
{
self iprintln("^6" + nameDvarStick + " added to Co-Host list.");
h("coHost6", nameDvarStick);
h("dvarCoNumber", "6");
}
else if(getDvar("dvarCoNumber") == "6")
{
self iprintln("^6" + nameDvarStick + " added to Co-Host list.");
h("coHost7", nameDvarStick);
h("dvarCoNumber", "7");
}
else if(getDvar("dvarCoNumber") == "7")
{
self iprintln("^6" + nameDvarStick + " added to Co-Host list.");
h("coHost8", nameDvarStick);
h("dvarCoNumber", "8");
}
else if(getDvar("dvarCoNumber") == "8")
{
self iprintln("^6" + nameDvarStick + " added to Co-Host list.");
h("coHost9", nameDvarStick);
h("dvarCoNumber", "9");
}
else if(getDvar("dvarCoNumber") == "9")
{
self iprintln("^6" + nameDvarStick + " added to Co-Host list.");
h("coHost10", nameDvarStick);
h("dvarCoNumber", "10");
}
else if(getDvar("dvarCoNumber") == "10")
{
self iprintln("^6" + nameDvarStick + " added to Co-Host list.");
h("coHost11", nameDvarStick);
h("dvarCoNumber", "11");
}
else if(getDvar("dvarCoNumber") == "11")
{
self iprintln("^6" + nameDvarStick + " added to Co-Host list.");
h("coHost12", nameDvarStick);
h("dvarCoNumber", "12");
}
else if(getDvar("dvarCoNumber") == "12")
{
self iprintln("^6" + nameDvarStick + " added to Co-Host list.");
h("coHost13", nameDvarStick);
h("dvarCoNumber", "13");
}
else if(getDvar("dvarCoNumber") == "13")
{
self iprintln("^6" + nameDvarStick + " added to Co-Host list.");
h("coHost14", nameDvarStick);
h("dvarCoNumber", "14");
}
else if(getDvar("dvarCoNumber") == "14")
{
self iprintln("^6" + nameDvarStick + " added to Co-Host list.");
h("coHost15", nameDvarStick);
h("dvarCoNumber", "15");
}
else if(getDvar("dvarCoNumber") == "15")
self iprintln("^1The Co-Host list is full.");
}
else
self iprintln("^1Cant add host to list!");
}
else
self iprintln("^1Only Host can do this!");
}
clearcolist()
{
self iprintln( "^2Co-Host List ^1cleared!" );
h( "dvarCoNumber", "0" );
h( "coHost1", "" );
h( "coHost2", "" );
h( "coHost3", "" );
h( "coHost4", "" );
h( "coHost5", "" );
h( "coHost6", "" );
h( "coHost7", "" );
h( "coHost8", "" );
h( "coHost9", "" );
h( "coHost10", "" );
}
Last edited: