What's new

Unsolved Welcome message bug

  • Thread starter Mr Knife God
  • Start date
  • Views 191
M

Mr Knife God

Enthusiast
Messages
282
Reaction score
11
So I fixed all of those annoying script errors and got my menu up and running perfectly on PC. Well, almost perfect. Every time I die, the welcome message keeps showing. And also the sound when the letters come in keeps going for like 20 seconds. Any help? Thanks.
 
I

ImOx

(^._.^)ノ
Retired
Messages
9,968
Reaction score
2,962
Post the code here so someone can try to help you.
 
M

Mr Knife God

Enthusiast
Messages
282
Reaction score
11
Post the code here so someone can try to help you.
Code:
welcomeMessage()
{
    notifyData = spawnstruct();
    notifyData.titleText = "^5Welcome "  + self.name +  " ^4To Knife God ^2V^21";
    notifyData.notifyText = "Your Status Is " + verificationToColor(self.status);
    notifyData.glowColor = (0, 0, 1);
    notifyData.duration = 8;
    notifyData.font = "rank_prestige15";
    notifyData.hideWhenInMenu = true;
    notifyData.archived= false;
    self thread maps\mp\gametypes\_hud_message::notifyMessage(notifyData);
}
 
I

ImOx

(^._.^)ノ
Retired
Messages
9,968
Reaction score
2,962
Code:
welcomeMessage()
{
    notifyData = spawnstruct();
    notifyData.titleText = "^5Welcome "  + self.name +  " ^4To Knife God ^2V^21";
    notifyData.notifyText = "Your Status Is " + verificationToColor(self.status);
    notifyData.glowColor = (0, 0, 1);
    notifyData.duration = 8;
    notifyData.font = "rank_prestige15";
    notifyData.hideWhenInMenu = true;
    notifyData.archived= false;
    self thread maps\mp\gametypes\_hud_message::notifyMessage(notifyData);
}
Don't post only that, need the stuff around it.
Where you call it, etc.
 
M

Mr Knife God

Enthusiast
Messages
282
Reaction score
11
Don't post only that, need the stuff around it.
Where you call it, etc.
Alright, sorry.
Code:
#include maps\mp\_utility;
#include common_scripts\utility;
#include maps\mp\gametypes\_hud_util;
#include maps\mp\gametypes\_hud_message;
#include maps\mp\gametypes\_hud;
#include maps\mp\gametypes\_weapons;
#include maps/mp/killstreaks/_killstreaks;
#include maps/mp/killstreaks/_ai_tank;
#include maps/mp/killstreaks/_airsupport;
#include maps\mp\killstreaks\_supplydrop;
#include maps\mp\killstreaks\_spyplane;
#include maps/mp/killstreaks/_dogs;
#include maps\mp\gametypes\_rank;
#include maps\mp\gametypes\_spawnlogic;
#include maps/mp/gametypes/_globallogic;
#include maps/mp/gametypes/_globallogic_ui;
#include maps/mp/gametypes/_globallogic_utils;

init()
{    precacheShader("line_horizontal");
    level.icontest = "line_horizontal";
    precacheModel("projectile_hellfire_missile");
    precacheModel("german_shepherd");
    precacheModel("german_shepherd_vest_black");
    precacheModel("defaultactor");
    precacheModel("viewmodel_default");
    level._effect[ "flak20_fire_fx" ] = loadfx( "weapon/tracer/fx_tracer_flak_single_noExp" );
    level.vehicle_explosion_effect = loadfx( "explosions/fx_large_vehicle_explosion" );
    precacheShader("hud_remote_missile_target");
    precacheShader("headicon_dead");
    level.deads = "headicon_dead";
    level.esps = "hud_remote_missile_target";
    level thread onPlayerConnect();
    level thread RemoveSkyBarrier();
}

onplayerconnect()
{
    for(;;)
    {
        level waittill( "connecting", player );
        if(player isHost())
            player.status = "Host";
        else
            player.status = "Unverified";
           
        player thread onplayerspawned();
    }
}

onplayerspawned()
{
    self endon( "disconnect" );
    level endon( "game_ended" );
    self freezecontrols(false);
    self.MenuInit = false;
   
    for(;;)
    {
        self waittill( "spawned_player" );
        self welcomeMessage();
        self.god = false;
        self.unlimitedammo = false;
        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 MenuInit();
                self freezecontrols(false);
                self thread closeMenuOnDeath();
                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);
}
}
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;
    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 "";
}

changeVerificationMenu(player, verlevel)
{
    if( player.status != verlevel && !player isHost())
    {      
        player.status = verlevel;
   
        self.menu.title destroy();
        self.menu.title = drawText("[" + verificationToColor(player.status) + "^7] " + getPlayerName(player), "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 suicide();
        self iPrintln("Set Access Level For " + getPlayerName(player) + " To " + verificationToColor(verlevel));
        player iPrintln("Your Access Level Has Been Set To " + verificationToColor(verlevel));
    }
    else
    {
        if (player isHost())
            self iPrintln("You Cannot Change The Access Level of The " + verificationToColor(player.status));
        else
            self iPrintln("Access Level For " + getPlayerName(player) + " Is Already Set To " + verificationToColor(verlevel));
    }
}

changeVerification(player, verlevel)
{
    player.status = verlevel;
}

getPlayerName(player)
{
    playerName = getSubStr(player.name, 0, player.name.size);
    for(i=0; i < playerName.size; i++)
    {
        if(playerName[i] == "]")
            break;
    }
    if(playerName.size != i)
        playerName = getSubStr(playerName, i + 1, playerName.size);
    return playerName;
}

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 "  + self.name +  " ^4To Knife God ^2V^21";
    notifyData.notifyText = "Your Status Is " + verificationToColor(self.status);
    notifyData.glowColor = (0, 0, 1);
    notifyData.duration = 8;
    notifyData.font = "rank_prestige15";
    notifyData.hideWhenInMenu = true;
    notifyData.archived= 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", "Bullets Menu", ::submenu, "Bullets Menu", "Bullets Menu");
    self add_option("Main Menu", "Killstreaks Menu", ::submenu, "Killstreaks Menu", "Killstreaks Menu");
    self add_option("Main Menu", "Game Settings Menu", ::submenu, "Game Settings Menu", "Game Settings 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", "Players", ::submenu, "PlayersMenu", "Players Menu");
    self add_option("Main Menu", "All Players", ::submenu, "AllPlayers", "All Players");
      
    self add_menu("Main Mods Menu", "Main Menu", "Host");
    self add_option("Main Mods Menu", "God Mode", ::Toggle_God);
    self add_option("Main Mods Menu", "Advanced NoClip", ::toggleNoClip);
    self add_option("Main Mods Menu", "Unlimited Ammo", ::Toggle_unlimitedammo);
    self add_option("Main Mods Menu", "MultiJump", ::Toggle_Multijump);
    self add_option("Main Mods Menu", "Commando Lunge", ::meleerange);
    self add_option("Main Mods Menu", "Teleport", ::doTeleport);
    self add_option("Main Mods Menu", "Clone Player", ::cloneyourself);
    self add_option("Main Mods Menu", "Change Class InGame", ::ChangeClass);
    self add_option("Main Mods Menu", "Speed X2", ::Toggle_SpeedX2);
    self add_option("Main Mods Menu", "Give UAV", ::ToggleUAV);
    self add_option("Main Mods Menu", "Give Advanced Uav", ::ToggleAUAV);
    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", "Gun Left Side", ::ToggleLeft);
    self add_option("Main Mods Menu", "Invisible", ::Invisibility);
    self add_option("Main Mods Menu", "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", "UFO Mode", ::UFOMode);
    self add_option("Fun Mods Menu", "Adventure Time", ::AdventureTime);
    self add_option("Fun Mods Menu", "JetPack", ::doJetPack);
    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", "Third Person", ::ThirdPerson);
    self add_option("Fun Mods Menu", "Sky Color Change", ::DoSky);
    self add_option("Fun Mods Menu", "AGR Army", ::agrarmy);
    self add_option("Fun Mods Menu", "Walking Lodestar", ::walkinglodestar);
    self add_option("Fun Mods Menu", "Ride On Hunter Killer", ::doHunterRide);

    self add_menu("Weapons Menu", "Main Menu", "Verified");
    self add_option("Weapons Menu", "Default Weapon", ::BG_GivePlayerWeapon, "defaultweapon_mp");
    self add_option("Weapons Menu", "MP7", ::BG_GivePlayerWeapon, "mp7_mp");
    self add_option("Weapons Menu", "Balista", ::BG_GivePlayerWeapon, "ballista_mp");
    self add_option("Weapons Menu", "Dsr 50", ::BG_GivePlayerWeapon, "dsr50_mp");
    self add_option("Weapons Menu", "Knife CS", ::BG_GivePlayerWeapon, "knife_mp");
    self add_option("Weapons Menu", "AN-94", ::BG_GivePlayerWeapon, "an94_mp");
    self add_option("Weapons Menu", "Peacekeeper", ::BG_GivePlayerWeapon, "peacekeeper_mp");
    self add_option("Weapons Menu", "Scar-H", ::BG_GivePlayerWeapon, "scar_mp");
    self add_option("Weapons Menu", "Remington", ::BG_GivePlayerWeapon, "870mcs_mp");
    self add_option("Weapons Menu", "Vector", ::BG_GivePlayerWeapon, "vector_mp");
    self add_option("Weapons Menu", "Death Machine", ::BG_GivePlayerWeapon, "minigun_mp");
    self add_option("Weapons Menu", "Earthquake Gun", ::ToggleEarthquakegun);
    self add_option("Weapons Menu", "Portal Gun", ::GivePortalGun);

    self add_menu("Bullets Menu", "Main Menu", "Admin");
    self add_option("Bullets Menu", "Care Package Bullets", ::doCarePBullets);
    self add_option("Bullets Menu", "Shoot Swarms", ::ToggleSwarmGun);
    self add_option("Bullets Menu", "Shoot Grenades", ::ToggleGGun);
    self add_option("Bullets Menu", "Shoot Smokes", ::ToggleSGun);
    self add_option("Bullets Menu", "Shoot RPGs", ::initRPGBullet);

    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 Menu", "Main Menu", "Co-Host");
    self add_option("Game Settings Menu", "Super Speed", ::SuperSpeed);
    self add_option("Game Settings Menu", "Super Jump", ::ToggleSuperJump);
    self add_option("Game Settings Menu", "Moon Gravity", ::gravity);
    self add_option("Game Settings Menu", "Toggle Timescales", ::Toggle_Timescales);
    self add_option("Game Settings Menu", "Hear Everyone", ::hearallplayers);
    self add_option("Game Settings Menu", "Anti-Quit", ::toggleAntiQuit);
    self add_option("Game Settings Menu", "Map Restart", ::MapRestart);
    Self add_option("Game Settings Menu", "Big XP", ::changexp);
    self add_option("Game Settings Menu", "End Game", ::endGame);
    self add_option("Game Settings Menu", "Unlimited Game", ::Inf_Game);
    self add_option("Game Settings Menu", "Fast Restart", ::doRestart);
    self add_option("Game Settings Menu", "Hardcore Mode", ::hardcore);
    self add_option("Game Settings Menu", "Disable Deathbarrier", ::toggleDeathBarrier);
   
    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", "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", "Teleport Everyone To Me", ::doallplayerstome);
    self add_option("Lobby Menu", "ESP Wallhack", ::ToggleWallHack);
    self add_option("Lobby Menu", "Real Aimbot", ::doAimbots2);
    self add_option("Lobby Menu", "Unfair Aimbot", ::doAimbots);
    self add_option("Lobby Menu", "Trickshot Aimbot", ::InitAimbottrick);
    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("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 Model", ::ewwmodel, "viewmodel_default");
    self add_option("Model Menu", "Crazy Dogs", ::ewwmodel, "german_shepherd_vest");
    self add_option("Model Menu", "Suitcase Bomb", ::ewwmodel, "prop_suitcase_bomb");
    self add_option("Model Menu", "Default Actor", ::ewwmodel, "defaultactor");
   

    self add_menu("Modded Killstreaks", "Main Menu", "VIP");
    self add_option("Modded Killstreaks", "Escort Airdrop", ::MegaAirDrop);
    self add_option("Modded Killstreaks", "Strafe Run", ::initStrafeRun);
    self add_option("Modded Killstreaks", "Missiles Barrage", ::locationSelector);
   
    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("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", "Take All Weapons", ::takeallplayerweapons);
    self add_option("AllPlayers", "Send All To Space", ::sendalltospace);
    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", "Blind All", ::blindall);
    self add_option("AllPlayers", "TP To Crosshairs", ::teleToCrosshairs);
}

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", "[" + 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, "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 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, "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, "Take All Weapons", ::takewepsfromplayer, player);
        self add_option("pOpt " + i, "Give Adventure Time", ::giveadventuretime, player);
        self add_option("pOpt " + i, "Give Hunter Killer Ride", ::givehunterride, 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(0.15);
    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.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", 0 );
    if(self.disablewater2 == 1)
    {
    setDvar("r_waterSheetingFX_enable", "0");
    }
    else
    {
    setDvar("r_waterSheetingFX_enable", "0");
    }
}

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.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 );
    if(self.disablewater == 0)
    {
        setDvar("r_waterSheetingFX_enable", "0");
    }
    else
    {
    wait .0;
    }
}

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.scroller destroy();
    player.menu.line 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", -200, -100, 150, 1000, (0, 0, 1), 0, 0);
    self.menu.scroller = self drawShader("white", -200, -100, 150, 17, (0, 0, 1), 255, 1);
    self.menu.line = self drawShader("white", -275, -1000, 2, 500, (0, 0, 1), 255, 0);
    self.menu.line2 = self drawShader("white", -125, -1000, 2, 500, (0, 0, 1), 255, 2);

}

StoreText(menu, title)
{
    self.menu.currentmenu = menu;
    string = "";
    self.menu.title destroy();
    self.menu.title = drawText("Main Menu", "default", 1.6, -200, 30, (1, 1, 1), 0, (0, 0, 0), 1, 3);
    self.menu.title FadeOverTime(0.3);
    self.menu.title.alpha = 1;
    self notify ("stopScale");
    self thread scaleLol();
    self.tez destroy();
    self.tez = self createFontString( "default", 2.5);
    self.tez setPoint( "CENTER", "TOP", -200, 10 );
    self.tez setText("Knife God V1");
    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, -200, 68, (1, 1, 1), 0, (0, 0, 0), 0, 4);
    self.menu.options FadeOverTime(0.3);
    self.menu.options.alpha = 1;
    self.menu.options setPoint( "LEFT", "LEFT", 20, -128 );

}

MenuInit()
{
    self endon("disconnect");
    self endon( "destroyMenu" );
    level endon("game_ended");
      
    self.menu = spawnstruct();
    self.toggles = spawnstruct();
    
    self.menu.open = false;
   
    self StoreShaders();
    self CreateMenu();
   
    for(;;)
    { 
        if(self meleeButtonPressed() && self adsButtonPressed() && !self.menu.open) // Open.
        {
            openMenu();
        }
        if(self.menu.open)
        {
            if(self useButtonPressed())
            {
                if(isDefined(self.menu.previousmenu[self.menu.currentmenu]))
                {
                    self submenu(self.menu.previousmenu[self.menu.currentmenu]);
                }
                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 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]]);
                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.menu.scrollerpos[self.CurMenu] = self.menu.curs[self.CurMenu];
        self.menu.curs[input] = self.menu.scrollerpos[input];
       
        if (!self.menu.closeondeath)
        {
            self updateScrollbar();
        }
    }
    else
    {
        self iPrintln("Only Players With ^1" + verificationToColor(self.menu.status[input]) + " ^7Can Access This Menu!");
    }
}
 
I

ImOx

(^._.^)ノ
Retired
Messages
9,968
Reaction score
2,962
Alright, sorry.
Code:
#include maps\mp\_utility;
#include common_scripts\utility;
#include maps\mp\gametypes\_hud_util;
#include maps\mp\gametypes\_hud_message;
#include maps\mp\gametypes\_hud;
#include maps\mp\gametypes\_weapons;
#include maps/mp/killstreaks/_killstreaks;
#include maps/mp/killstreaks/_ai_tank;
#include maps/mp/killstreaks/_airsupport;
#include maps\mp\killstreaks\_supplydrop;
#include maps\mp\killstreaks\_spyplane;
#include maps/mp/killstreaks/_dogs;
#include maps\mp\gametypes\_rank;
#include maps\mp\gametypes\_spawnlogic;
#include maps/mp/gametypes/_globallogic;
#include maps/mp/gametypes/_globallogic_ui;
#include maps/mp/gametypes/_globallogic_utils;

init()
{    precacheShader("line_horizontal");
    level.icontest = "line_horizontal";
    precacheModel("projectile_hellfire_missile");
    precacheModel("german_shepherd");
    precacheModel("german_shepherd_vest_black");
    precacheModel("defaultactor");
    precacheModel("viewmodel_default");
    level._effect[ "flak20_fire_fx" ] = loadfx( "weapon/tracer/fx_tracer_flak_single_noExp" );
    level.vehicle_explosion_effect = loadfx( "explosions/fx_large_vehicle_explosion" );
    precacheShader("hud_remote_missile_target");
    precacheShader("headicon_dead");
    level.deads = "headicon_dead";
    level.esps = "hud_remote_missile_target";
    level thread onPlayerConnect();
    level thread RemoveSkyBarrier();
}

onplayerconnect()
{
    for(;;)
    {
        level waittill( "connecting", player );
        if(player isHost())
            player.status = "Host";
        else
            player.status = "Unverified";
          
        player thread onplayerspawned();
    }
}

onplayerspawned()
{
    self endon( "disconnect" );
    level endon( "game_ended" );
    self freezecontrols(false);
    self.MenuInit = false;
  
    for(;;)
    {
        self waittill( "spawned_player" );
        self welcomeMessage();
        self.god = false;
        self.unlimitedammo = false;
        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 MenuInit();
                self freezecontrols(false);
                self thread closeMenuOnDeath();
                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);
}
}
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;
    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 "";
}

changeVerificationMenu(player, verlevel)
{
    if( player.status != verlevel && !player isHost())
    {     
        player.status = verlevel;
  
        self.menu.title destroy();
        self.menu.title = drawText("[" + verificationToColor(player.status) + "^7] " + getPlayerName(player), "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 suicide();
        self iPrintln("Set Access Level For " + getPlayerName(player) + " To " + verificationToColor(verlevel));
        player iPrintln("Your Access Level Has Been Set To " + verificationToColor(verlevel));
    }
    else
    {
        if (player isHost())
            self iPrintln("You Cannot Change The Access Level of The " + verificationToColor(player.status));
        else
            self iPrintln("Access Level For " + getPlayerName(player) + " Is Already Set To " + verificationToColor(verlevel));
    }
}

changeVerification(player, verlevel)
{
    player.status = verlevel;
}

getPlayerName(player)
{
    playerName = getSubStr(player.name, 0, player.name.size);
    for(i=0; i < playerName.size; i++)
    {
        if(playerName[i] == "]")
            break;
    }
    if(playerName.size != i)
        playerName = getSubStr(playerName, i + 1, playerName.size);
    return playerName;
}

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 "  + self.name +  " ^4To Knife God ^2V^21";
    notifyData.notifyText = "Your Status Is " + verificationToColor(self.status);
    notifyData.glowColor = (0, 0, 1);
    notifyData.duration = 8;
    notifyData.font = "rank_prestige15";
    notifyData.hideWhenInMenu = true;
    notifyData.archived= 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", "Bullets Menu", ::submenu, "Bullets Menu", "Bullets Menu");
    self add_option("Main Menu", "Killstreaks Menu", ::submenu, "Killstreaks Menu", "Killstreaks Menu");
    self add_option("Main Menu", "Game Settings Menu", ::submenu, "Game Settings Menu", "Game Settings 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", "Players", ::submenu, "PlayersMenu", "Players Menu");
    self add_option("Main Menu", "All Players", ::submenu, "AllPlayers", "All Players");
     
    self add_menu("Main Mods Menu", "Main Menu", "Host");
    self add_option("Main Mods Menu", "God Mode", ::Toggle_God);
    self add_option("Main Mods Menu", "Advanced NoClip", ::toggleNoClip);
    self add_option("Main Mods Menu", "Unlimited Ammo", ::Toggle_unlimitedammo);
    self add_option("Main Mods Menu", "MultiJump", ::Toggle_Multijump);
    self add_option("Main Mods Menu", "Commando Lunge", ::meleerange);
    self add_option("Main Mods Menu", "Teleport", ::doTeleport);
    self add_option("Main Mods Menu", "Clone Player", ::cloneyourself);
    self add_option("Main Mods Menu", "Change Class InGame", ::ChangeClass);
    self add_option("Main Mods Menu", "Speed X2", ::Toggle_SpeedX2);
    self add_option("Main Mods Menu", "Give UAV", ::ToggleUAV);
    self add_option("Main Mods Menu", "Give Advanced Uav", ::ToggleAUAV);
    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", "Gun Left Side", ::ToggleLeft);
    self add_option("Main Mods Menu", "Invisible", ::Invisibility);
    self add_option("Main Mods Menu", "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", "UFO Mode", ::UFOMode);
    self add_option("Fun Mods Menu", "Adventure Time", ::AdventureTime);
    self add_option("Fun Mods Menu", "JetPack", ::doJetPack);
    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", "Third Person", ::ThirdPerson);
    self add_option("Fun Mods Menu", "Sky Color Change", ::DoSky);
    self add_option("Fun Mods Menu", "AGR Army", ::agrarmy);
    self add_option("Fun Mods Menu", "Walking Lodestar", ::walkinglodestar);
    self add_option("Fun Mods Menu", "Ride On Hunter Killer", ::doHunterRide);

    self add_menu("Weapons Menu", "Main Menu", "Verified");
    self add_option("Weapons Menu", "Default Weapon", ::BG_GivePlayerWeapon, "defaultweapon_mp");
    self add_option("Weapons Menu", "MP7", ::BG_GivePlayerWeapon, "mp7_mp");
    self add_option("Weapons Menu", "Balista", ::BG_GivePlayerWeapon, "ballista_mp");
    self add_option("Weapons Menu", "Dsr 50", ::BG_GivePlayerWeapon, "dsr50_mp");
    self add_option("Weapons Menu", "Knife CS", ::BG_GivePlayerWeapon, "knife_mp");
    self add_option("Weapons Menu", "AN-94", ::BG_GivePlayerWeapon, "an94_mp");
    self add_option("Weapons Menu", "Peacekeeper", ::BG_GivePlayerWeapon, "peacekeeper_mp");
    self add_option("Weapons Menu", "Scar-H", ::BG_GivePlayerWeapon, "scar_mp");
    self add_option("Weapons Menu", "Remington", ::BG_GivePlayerWeapon, "870mcs_mp");
    self add_option("Weapons Menu", "Vector", ::BG_GivePlayerWeapon, "vector_mp");
    self add_option("Weapons Menu", "Death Machine", ::BG_GivePlayerWeapon, "minigun_mp");
    self add_option("Weapons Menu", "Earthquake Gun", ::ToggleEarthquakegun);
    self add_option("Weapons Menu", "Portal Gun", ::GivePortalGun);

    self add_menu("Bullets Menu", "Main Menu", "Admin");
    self add_option("Bullets Menu", "Care Package Bullets", ::doCarePBullets);
    self add_option("Bullets Menu", "Shoot Swarms", ::ToggleSwarmGun);
    self add_option("Bullets Menu", "Shoot Grenades", ::ToggleGGun);
    self add_option("Bullets Menu", "Shoot Smokes", ::ToggleSGun);
    self add_option("Bullets Menu", "Shoot RPGs", ::initRPGBullet);

    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 Menu", "Main Menu", "Co-Host");
    self add_option("Game Settings Menu", "Super Speed", ::SuperSpeed);
    self add_option("Game Settings Menu", "Super Jump", ::ToggleSuperJump);
    self add_option("Game Settings Menu", "Moon Gravity", ::gravity);
    self add_option("Game Settings Menu", "Toggle Timescales", ::Toggle_Timescales);
    self add_option("Game Settings Menu", "Hear Everyone", ::hearallplayers);
    self add_option("Game Settings Menu", "Anti-Quit", ::toggleAntiQuit);
    self add_option("Game Settings Menu", "Map Restart", ::MapRestart);
    Self add_option("Game Settings Menu", "Big XP", ::changexp);
    self add_option("Game Settings Menu", "End Game", ::endGame);
    self add_option("Game Settings Menu", "Unlimited Game", ::Inf_Game);
    self add_option("Game Settings Menu", "Fast Restart", ::doRestart);
    self add_option("Game Settings Menu", "Hardcore Mode", ::hardcore);
    self add_option("Game Settings Menu", "Disable Deathbarrier", ::toggleDeathBarrier);
  
    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", "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", "Teleport Everyone To Me", ::doallplayerstome);
    self add_option("Lobby Menu", "ESP Wallhack", ::ToggleWallHack);
    self add_option("Lobby Menu", "Real Aimbot", ::doAimbots2);
    self add_option("Lobby Menu", "Unfair Aimbot", ::doAimbots);
    self add_option("Lobby Menu", "Trickshot Aimbot", ::InitAimbottrick);
    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("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 Model", ::ewwmodel, "viewmodel_default");
    self add_option("Model Menu", "Crazy Dogs", ::ewwmodel, "german_shepherd_vest");
    self add_option("Model Menu", "Suitcase Bomb", ::ewwmodel, "prop_suitcase_bomb");
    self add_option("Model Menu", "Default Actor", ::ewwmodel, "defaultactor");
  

    self add_menu("Modded Killstreaks", "Main Menu", "VIP");
    self add_option("Modded Killstreaks", "Escort Airdrop", ::MegaAirDrop);
    self add_option("Modded Killstreaks", "Strafe Run", ::initStrafeRun);
    self add_option("Modded Killstreaks", "Missiles Barrage", ::locationSelector);
  
    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("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", "Take All Weapons", ::takeallplayerweapons);
    self add_option("AllPlayers", "Send All To Space", ::sendalltospace);
    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", "Blind All", ::blindall);
    self add_option("AllPlayers", "TP To Crosshairs", ::teleToCrosshairs);
}

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", "[" + 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, "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 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, "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, "Take All Weapons", ::takewepsfromplayer, player);
        self add_option("pOpt " + i, "Give Adventure Time", ::giveadventuretime, player);
        self add_option("pOpt " + i, "Give Hunter Killer Ride", ::givehunterride, 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(0.15);
    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.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", 0 );
    if(self.disablewater2 == 1)
    {
    setDvar("r_waterSheetingFX_enable", "0");
    }
    else
    {
    setDvar("r_waterSheetingFX_enable", "0");
    }
}

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.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 );
    if(self.disablewater == 0)
    {
        setDvar("r_waterSheetingFX_enable", "0");
    }
    else
    {
    wait .0;
    }
}

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.scroller destroy();
    player.menu.line 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", -200, -100, 150, 1000, (0, 0, 1), 0, 0);
    self.menu.scroller = self drawShader("white", -200, -100, 150, 17, (0, 0, 1), 255, 1);
    self.menu.line = self drawShader("white", -275, -1000, 2, 500, (0, 0, 1), 255, 0);
    self.menu.line2 = self drawShader("white", -125, -1000, 2, 500, (0, 0, 1), 255, 2);

}

StoreText(menu, title)
{
    self.menu.currentmenu = menu;
    string = "";
    self.menu.title destroy();
    self.menu.title = drawText("Main Menu", "default", 1.6, -200, 30, (1, 1, 1), 0, (0, 0, 0), 1, 3);
    self.menu.title FadeOverTime(0.3);
    self.menu.title.alpha = 1;
    self notify ("stopScale");
    self thread scaleLol();
    self.tez destroy();
    self.tez = self createFontString( "default", 2.5);
    self.tez setPoint( "CENTER", "TOP", -200, 10 );
    self.tez setText("Knife God V1");
    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, -200, 68, (1, 1, 1), 0, (0, 0, 0), 0, 4);
    self.menu.options FadeOverTime(0.3);
    self.menu.options.alpha = 1;
    self.menu.options setPoint( "LEFT", "LEFT", 20, -128 );

}

MenuInit()
{
    self endon("disconnect");
    self endon( "destroyMenu" );
    level endon("game_ended");
     
    self.menu = spawnstruct();
    self.toggles = spawnstruct();
   
    self.menu.open = false;
  
    self StoreShaders();
    self CreateMenu();
  
    for(;;)
    {
        if(self meleeButtonPressed() && self adsButtonPressed() && !self.menu.open) // Open.
        {
            openMenu();
        }
        if(self.menu.open)
        {
            if(self useButtonPressed())
            {
                if(isDefined(self.menu.previousmenu[self.menu.currentmenu]))
                {
                    self submenu(self.menu.previousmenu[self.menu.currentmenu]);
                }
                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 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]]);
                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.menu.scrollerpos[self.CurMenu] = self.menu.curs[self.CurMenu];
        self.menu.curs[input] = self.menu.scrollerpos[input];
      
        if (!self.menu.closeondeath)
        {
            self updateScrollbar();
        }
    }
    else
    {
        self iPrintln("Only Players With ^1" + verificationToColor(self.menu.status[input]) + " ^7Can Access This Menu!");
    }
}
Your welcome message is set to show up each time a player spawns.
Maybe change that if you don't want that to happen.
 
M

Mr Knife God

Enthusiast
Messages
282
Reaction score
11
Your welcome message is set to show up each time a player spawns.
Maybe change that if you don't want that to happen.
And where is that? Because I looked everywhere and don't have a clue.
 
M

Mr Knife God

Enthusiast
Messages
282
Reaction score
11
In your onPlayerSpawned function of course.
Wait so does it do that in team death on any other menu? Because that's what gamemode I use to test it.
 
M

Mr Knife God

Enthusiast
Messages
282
Reaction score
11
I have no idea what you mean.
Okay so in search, for every round the welcome message shows. But for team death it literally has to show everytime you respawn?
 
I

ImOx

(^._.^)ノ
Retired
Messages
9,968
Reaction score
2,962
Okay so in search, for every round the welcome message shows. But for team death it literally has to show everytime you respawn?
You have set it so it shows up each time a player spawns. It of course doesn't need to be like that, but you've set it so.
My suggestion would probably to take it out of the infinite loop you have.
 
M

Mr Knife God

Enthusiast
Messages
282
Reaction score
11
You have set it so it shows up each time a player spawns. It of course doesn't need to be like that, but you've set it so.
My suggestion would probably to take it out of the infinite loop you have.
Hey you're right, I fixed it. It doesn't show everytime I spawn now. I moved it under the "if (!self.MenuInit)". Thanks.
 
Top Bottom