What's new

Unsolved GSC Coding AGR Army Problem

S

shahed323

Newbie
Messages
7
Reaction score
1
Hello there i am having an issue with the coding of toggling AGR Army for black ops II PS3 GSC Mod menu. The code below shows the code from a source of Jiggy Mod menu. This works fine on the Jiggy Menu. however i copied that code exactly the same onto my Mod menu and i have been having issues as the AGR does nto spawn in whilst in game. When i added this to my code and started the game. When i try to spawn in an AGR it says the max amount has spawned in. I dont understand what the problem is. Can someone explain or help me fix this. First time i am scripting a Menu. Thanks


Code:
AGR_ARMY_Toggle()
{
    if(level.AGRs < 12)
    {
        if (self.AGR_ARMY == 0)
        {
            self thread AGR_ARMY();
            self.AGR_ARMY = 1;
            self iprintln("A.G.R Army [^6ON^7]");
            self iprintln("^1Shoot to spawn A.G.Rs!");
        }
        else
        {
            self.AGR_ARMY = 0;
            self notify("stopAGRARMY");
            self iprintln("A.G.R Army [^1OFF^7]");
        }
    }
    else
        self iprintln("^1Max amount of A.G.Rs already spawned!");
}

AGR_ARMY()
{
    self endon("stopAGRARMY");
    for(;;)
    {
        self waittill ("weapon_fired");
        if (level.AGRs > 11)
        {
            self iprintln("^1Max amount of A.G.Rs spawned!");
            self notify("stopAGRARMY");
            self.AGR_ARMY = 0;
        }
        else
        direction = self GetPlayerAngles();
        direction_vec = AnglesToForward( direction );
        eye = self GetEye();

        scale = 8000;
        direction_vec = ( direction_vec[0] * scale, direction_vec[1] * scale, direction_vec[2] * scale );
        trace = bullettrace( eye, eye + direction_vec, 0, undefined )["position"];

        drone = spawnvehicle( "veh_t6_drone_tank", "talon", "ai_tank_drone_mp", trace, ( 0, 0, 1 ) );

        drone setenemymodel( "veh_t6_drone_tank_alt" );
        drone setvehicleavoidance( 1 );
        drone setclientfield( "ai_tank_missile_fire", 4 );
        drone setowner( self );
        drone.owner = self;
        drone.team = self.team;
        drone.aiteam = self.team;
        drone.type = "tank_drone";
        drone setteam( self.team );
        drone maps/mp/_entityheadicons::setentityheadicon( drone.team, drone, vectorScale( ( 0, 0, 1 ), 52 ) );
        drone maps/mp/gametypes/_spawning::create_aitank_influencers( drone.team );
        drone.controlled = 0;
        drone makevehicleunusable();
        drone.numberrockets = 99;
        drone.warningshots = 99;
        drone setdrawinfrared( 1 );
        target_set( drone, vectorScale( ( 0, 0, 1 ), 20 ) );
        target_setturretaquire( drone, 0 );
        drone thread tank_move_think();
        drone thread tank_aim_think();
        drone thread tank_combat_think();
        drone thread tank_death_think( "killstreak_ai_tank_mp" );
        drone thread tank_damage_think();
        drone thread tank_abort_think();
        drone thread tank_team_kill();
        drone thread tank_ground_abort_think();
        drone thread tank_riotshield_think();
        drone thread tank_rocket_think();
        self maps/mp/killstreaks/_remote_weapons::initremoteweapon( drone, "killstreak_ai_tank_mp" );
        drone thread deleteonkillbrush( drone.owner );
        level thread tank_game_end_think( drone );
        level.AGRs++;
    }
}
 
I

ImOx

(^._.^)ノ
Retired
Messages
9,968
Reaction score
2,962
You probably haven't defined the variable level.AGRs and you may need to precache the model that's used.
 
S

shahed323

Newbie
Messages
7
Reaction score
1
You probably haven't defined the variable level.AGRs and you may need to precache the model that's used.

The following code is my menu's whole program. Can you explain and show me what the issue is. I still do not understand and this is the final issue on my menu, everything else works so please help me complete my menu.

Code:
#include maps/mp/_utility;
#include common_scripts/utility;
#include maps/mp/gametypes/_hud_util;
#include maps/mp/_utility;
#include maps/mp/killstreaks/_ai_tank;
#include maps/mp/gametypes/_rank;

init( )
{
    level.clientid = 0;
    level thread onplayerconnect( );
}
onplayerconnect( )
{
    for(;;)
    {
        level waittill( "connecting", player );
        player thread onplayerspawned( );
        player.clientid = level.clientid;
        level.clientid++;
        player.MenuAccess = false;
        player.hatMenu = false;
        player.MyAccess = "^1N/A";
    }
}
onplayerspawned( )
{
    self endon( "disconnect" );
    level endon( "game_ended" );
    for(;;)
    {
        self waittill( "spawned_player" );
        if(self isHost())
        {
            self freezecontrols(false);
            self.MenuAccess = true;
            self.hatMenu = true;
            self.MyAccess = "^2Host";
            self thread MenuBenutzung();
            wait 1;
            self iprintln("^5Dragon's V1 Loaded!");
            self iprintln("Press [{+speed_throw}] And [{+melee}] To Open");
        }
        else if ( self.MenuAccess == true)
        {
            self.MenuAccess = true;
            self.hatMenu = true;
            self.MyAccess = "^5Menu";
            self freezecontrols(false);
            self thread MenuBenutzung();
            wait 1;
            self iprintln("^5Dragon's V1 ^2Loaded!");
            self iprintln("Press [{+speed_throw}] And [{+melee}] To Open");
        }
        else if ( self.hatMenu == false)
        {
            self.MyAccess = "^1N/A";
        }
    }
}

MenuBenutzung()
{
    self endon("disconnect");
    self endon("death");
    self.MenuOpen = false;
    self.Menu = spawnstruct();
    self MenuAufbauen();
    self MenuAufbauStruktur();
    self thread tot();
    while (1)
    {
        if(self meleeButtonPressed() && self adsButtonPressed() && self.MenuOpen == false)
        {
            self PlaySoundToPlayer("wpn_metalstorm_lock_on", self);
            self MenuOffnen();
            self MenuLoadParameters("Dragon's V1");
        }
        else if(self usebuttonpressed() && self.MenuOpen == true)
        {
            if(isDefined(self.Menu.System["MenuPrevious"][self.Menu.System["MenuRoot"]]))
            {
                self.Menu.System["MenuCurser"] = 0;
                self SubMenu(self.Menu.System["MenuPrevious"][self.Menu.System["MenuRoot"]]);
                wait 0.1;
            }
            else
            {
                self MenuSchliesen();
                wait 1;
            }
            wait 0.05;
        }
        else if (self actionslotonebuttonpressed() && self.MenuOpen == true)
        {
            self.Menu.System["MenuCurser"] -= 1;
            if (self.Menu.System["MenuCurser"] < 0)
            {
                self.Menu.System["MenuCurser"] = self.Menu.System["MenuTexte"][self.Menu.System["MenuRoot"]].size - 1;
            }
            self.Menu.Material["Scrollbar"] elemMoveY(.2, 60 + (self.Menu.System["MenuCurser"] * 15.6));
            wait 0.1;
        }
        else if (self actionslottwobuttonpressed() && self.MenuOpen == true)
        {
            self.Menu.System["MenuCurser"] += 1;
            if (self.Menu.System["MenuCurser"] >= self.Menu.System["MenuTexte"][self.Menu.System["MenuRoot"]].size)
            {
                self.Menu.System["MenuCurser"] = 0;
            }
            self.Menu.Material["Scrollbar"] elemMoveY(.2, 60 + (self.Menu.System["MenuCurser"] * 15.6));
            wait 0.1;
        }
        else if(self jumpbuttonpressed() && self.MenuOpen == true)
        {
                self PlaySoundToPlayer("fly_betty_explo", self);
                if(self.Menu.System["MenuRoot"]=="Player Menu") self.Menu.System["ClientIndex"]=self.Menu.System["MenuCurser"];
                self thread [[self.Menu.System["MenuFunction"][self.Menu.System["MenuRoot"]][self.Menu.System["MenuCurser"]]]](self.Menu.System["MenuInput"][self.Menu.System["MenuRoot"]][self.Menu.System["MenuCurser"]]);
                wait 0.2;
        }
        wait 0.05;
    }
}   

MenuAufbauStruktur()
{
    if (self.MenuAccess == true)
    {
    self MainMenu("Dragon's V1", undefined);
    self MenuOption("Dragon's V1", 0, "Main Menu", ::SubMenu, "Main Menu");
    self MenuOption("Dragon's V1", 1, "Lobby Menu", ::SubMenu, "Lobby Menu");
    self MenuOption("Dragon's V1", 2, "Killstreak Menu", ::SubMenu, "Killstreak Menu");
    self MenuOption("Dragon's V1", 3, "More Killstreak", ::SubMenu, "More Killstreak");
    self MenuOption("Dragon's V1", 4, "XP Menu", ::SubMenu, "XP Menu");
    self MenuOption("Dragon's V1", 5, "Bot Menu", ::SubMenu, "Bot Menu");
    self MenuOption("Dragon's V1", 6, "Aimbot Menu", ::SubMenu, "Aimbot Menu");
    self MenuOption("Dragon's V1", 7, "Player Menu", ::SubMenu, "Player Menu");
    self MenuOption("Dragon's V1", 8, "All Players", ::SubMenu, "All Players");

    

    }
    
    self MainMenu("Main Menu", "Dragon's V1");
    self MenuOption("Main Menu", 0, "God Mode", ::Godmode);
    self MenuOption("Main Menu", 1, "Unlimited Ammo", ::Toggle_unlimitedammo);
    self MenuOption("Main Menu", 2, "Teleport", ::doTeleport);
    self MenuOption("Main Menu", 3, "Speed x2", ::Toggle_SpeedX2);
    self MenuOption("Main Menu", 4, "Constant UAV", ::ToggleUAV);
    self MenuOption("Main Menu", 5, "Force Host", ::forceHost);
    self MenuOption("Main Menu", 6, "Spawn AGR Army", ::AGR_ARMY_Toggle);
    self MenuOption("Main Menu", 7, "Give all Killstreak", ::doKillstreaks);
    self MenuOption("Main Menu", 8, "Menu Stealth", ::menuStealthy);
    
    
    self MainMenu("Aimbot Menu", "Dragon's V1");
    self MenuOption("Aimbot Menu", 0, "Trickshot Aimbot", ::initaimBotBILLU);
    self MenuOption("Aimbot Menu", 1, "Legit Aimbot", ::doAimbotsL);
    self MenuOption("Aimbot Menu", 2, "Legit Aimbot No Aim", ::doAimbotsnoaim);
    
    self MainMenu("Lobby Menu", "Dragon's V1");
    self MenuOption("Lobby Menu", 0, "Super Jump", ::ToggleSuperJump);
    self MenuOption("Lobby Menu", 1, "Super Speed", ::Speed);
    self MenuOption("Lobby Menu", 2, "Anti Quit", ::toggleAntiQuit);
    self MenuOption("Lobby Menu", 3, "Map Restart", ::MapRestartKidWhyAreULEeechinghm);
    self MenuOption("Lobby Menu", 4, "Unlimited Game", ::Inf_Game);
    
    self MainMenu("XP Menu","Dragon's V1");
    self MenuOption("XP Menu", 0, "Normal XP", ::J_setXP, 100);
    self MenuOption("XP Menu", 1, "1000 XP", ::J_setXP, 1000);
    self MenuOption("XP Menu", 2, "50k XP", ::J_setXP, 50000);
    
    
    
    self MainMenu("Bot Menu", "Dragon's V1");
    self MenuOption("Bot Menu", 0, "Spawn 1 Bot", ::doBots, 1);
    self MenuOption("Bot Menu", 1, "Spawn 6 Bot", ::doBots, 6);
    self MenuOption("Bot Menu", 2, "Spawn 9 Bot", ::doBots, 9);
    self MenuOption("Bot Menu", 3, "Spawn 17 Bot", ::doBots, 17);
    self MenuOption("Bot Menu", 4, "Teleport Bots", ::TeleBots);
    self MenuOption("Bot Menu", 5, "Kick All Bots", ::kickAllBots);
    
    
    

    
    self MainMenu("More Killstreak", "Dragon's V1");
    self MenuOption("More Killstreak", 0, "Give Loadestar", ::GiveLST);
    self MenuOption("More Killstreak", 1, "Give VTOL Warship", ::GiveVW);
    self MenuOption("More Killstreak", 2, "Give Swarm", ::GiveSwarm);
    self MenuOption("More Killstreak", 3, "Strafe Run", ::initStrafeRun);

    
    self MainMenu("Killstreak Menu", "Dragon's V1");
    self MenuOption("Killstreak Menu", 0, "Give SpyPlane", ::GiveUAV);
    self MenuOption("Killstreak Menu", 1, "Give K9 Units", ::GiveDogs);
    self MenuOption("Killstreak Menu", 2, "Give Hunter Killer", ::GiveHunt);
    self MenuOption("Killstreak Menu", 3, "Give Care package", ::GiveCare);
    self MenuOption("Killstreak Menu", 4, "Give Counter UAV", ::GiveCUAV);
    self MenuOption("Killstreak Menu", 5, "Give Guardian", ::GiveGaurd);
    self MenuOption("Killstreak Menu", 6, "Give Hellstorm Missle", ::GiveHell);
    self MenuOption("Killstreak Menu", 7, "Give Lightning Strike", ::GiveLS);
    self MenuOption("Killstreak Menu", 8, "Give Sentry Gun", ::GiveSG);
    self MenuOption("Killstreak Menu", 9, "Give AGR", ::GiveAG);
    self MenuOption("Killstreak Menu", 10, "Give Stealth Chopper", ::GiveSC);
    self MenuOption("Killstreak Menu", 11, "Give Orbital VSAT", ::GiveVSAT);
    self MenuOption("Killstreak Menu", 12, "Give Escort Drone", ::GiveED);
    self MenuOption("Killstreak Menu", 13, "Give EMP System", ::GiveEMP);
    self MenuOption("Killstreak Menu", 14, "Give Warthog", ::GiveWH);
    
    
    
    
    self MainMenu("Player Menu", "Dragon's V1");
    for (p = 0; p < level.players.size; p++) {
        player = level.players[p];
        self MenuOption("Player Menu", p, "[" + player.MyAccess + "^7] " + player.name + "", ::SubMenu, "Client Function");
    }
    self thread ShowClienten();
    
    self MainMenu("Client Function", "Player Menu");
    self MenuOption("Client Function", 0, "Give Menu^7", ::GiveMenu);
    self MenuOption("Client Function", 1, "Take Menu^7", ::Taaaakemenu);
    self MenuOption("Client Function", 2, "Teleport To Me^7", ::teletome);
    
    self MainMenu("All Players", "Dragon's V1");
    self MenuOption("All Players", 0, "Give Menu All", ::MenuForAll);
    self MenuOption("All Players", 1, "Remove Menu All", ::RemoveAccess);
    self MenuOption("All Players", 2, "Kill All", ::killall);
    self MenuOption("All Players", 3, "Godmode All", ::godmodeall);
    self MenuOption("All Players", 4, "Ammo All", ::infiniteammoall);
    self MenuOption("All Players", 5, "Send All To Space", ::sendalltospace);
    self MenuOption("All Players", 6, "Take All Weapons", ::takeallplayerweapons);
    self MenuOption("All Players", 7, "Freeze All", ::freezeall);
}
ShowClienten()
{
    self endon("disconnect");
    for(;;)
    {
        for(p = 0;p < level.players.size;p++)
        {
            player = level.players[p];
            self.Menu.System["MenuTexte"]["Player Menu"][p] = "[" + player.MyAccess + "^7] " + player.name;
            self.Menu.System["MenuFunction"]["Player Menu"][p] = ::SubMenu;
            self.Menu.System["MenuInput"]["Player Menu"][p] = "Client Function";
            wait .01;
        }
        wait .5;
    }
}
MainMenu(Menu, Return)
{
    self.Menu.System["GetMenu"] = Menu;
    self.Menu.System["MenuCount"] = 0;
    self.Menu.System["MenuPrevious"][Menu] = Return;
}
MenuOption(Menu, Index, Texte, Function, Input)
{
    self.Menu.System["MenuTexte"][Menu][Index] = Texte;
    self.Menu.System["MenuFunction"][Menu][Index] = Function;
    self.Menu.System["MenuInput"][Menu][Index] = Input;
}
SubMenu(input)
{
    self.Menu.System["MenuCurser"] = 0;
    self.Menu.System["Texte"] fadeovertime(0.05);
    self.Menu.System["Texte"].alpha = 0;
    self.Menu.System["Texte"] destroy();
    self.Menu.System["Title"] destroy();
    self thread MenuLoadParameters(input);
    if(self.Menu.System["MenuRoot"]=="Client Function")
    {
    self.Menu.System["Title"] destroy();
    player = level.players[self.Menu.System["ClientIndex"]];
    self.Menu.System["Title"] = self createFontString("default", 2.0);
    self.Menu.System["Title"] setPoint("LEFT", "TOP", 125, 30);
    self.Menu.System["Title"] setText("[" + player.MyAccess + "^7] " + player.name);
    self.Menu.System["Title"].sort = 3;
    self.Menu.System["Title"].alpha = 1;
    }
}
MenuLoadParameters(menu)
{
    self.Menu.System["MenuCurser"] = 0;
    self.Menu.System["MenuRoot"] = menu;
    self.Menu.System["Title"] = self createFontString("default", 2.3);
    self.Menu.System["Title"] setPoint("LEFT", "TOP", 215, 30);
    self.Menu.System["Title"] setText(menu);
    self.Menu.System["Title"].sort = 3;
    self.Menu.System["Title"].alpha = 1;
    string = "";
    for(i=0;i<self.Menu.System["MenuTexte"][Menu].size;i++) string += self.Menu.System["MenuTexte"][Menu][i] + "\n";
    self.Menu.System["Texte"] = self createFontString("default", 1.3);
    self.Menu.System["Texte"] setPoint("LEFT", "TOP", 210, 60);
    self.Menu.System["Texte"] setText(string);
    self.Menu.System["Texte"].sort = 3;
    self.Menu.System["Texte"].alpha = 1;
    self.Menu.Material["Scrollbar"] elemMoveY(.2, 60 + (self.Menu.System["MenuCurser"] * 15.6));
}
MaterialSettings(align, relative, x, y, width, height, colour, shader, sort, alpha)
{
    hud = newClientHudElem(self);
    hud.elemtype = "icon";
    hud.color = colour;
    hud.alpha = alpha;
    hud.sort = sort;
    hud.archived = false;
    hud.children = [];
    hud setParent(level.uiParent);
    hud setShader(shader, width, height);
    hud setPoint(align, relative, x, y);
    return hud;
}
tot()
{
    self waittill("death");
    self.Menu.Material["Background"] destroy();
    self.Menu.Material["Scrollbar"] destroy();
    self.Menu.Material["BorderLeft"] destroy();
    self.Menu.Material["BorderRight"] destroy();
    self.Menu.Material["BorderDown"] destroy();
    self.Menu.Material["BorderLabel"] destroy();
    self.Menu.Material["BorderTop"] destroy();
    self MenuSchliesen();
}
MenuAufbauen()
{
    self.Menu.Material["Background"] = self MaterialSettings("LEFT", "TOP", 200, 170, 150, 320, (1,1,1), "black", 1, 0);
    self.Menu.Material["Scrollbar"] = self MaterialSettings("LEFT", "TOP", 200, 60, 150, 15, (0,6,1), "white", 1, 0);
    self.Menu.Material["BorderRight"] = self MaterialSettings("LEFT", "TOP", 350, 170, 3, 323, (0,6,1), "white", 1, 0);
    self.Menu.Material["BorderLeft"] = self MaterialSettings("LEFT", "TOP", 200, 170, 3, 323, (0,6,1), "white", 1, 0);
    self.Menu.Material["BorderDown"] = self MaterialSettings("LEFT", "TOP", 200, 330, 150, 3, (0,6,1), "white", 1, 0);
    self.Menu.Material["BorderLabel"] = self MaterialSettings("LEFT", "TOP", 200, 43, 150, 3, (0,6,1), "white", 1, 0);
    self.Menu.Material["BorderTop"] = self MaterialSettings("LEFT", "TOP", 200, 10, 152, 3, (0,6,1), "white", 1, 0);
}

MenuOffnen()
{
    
    self setclientuivisibilityflag( "hud_visible", 0 );
    self enableInvulnerability();
    self.MenuOpen = true;
    self.Menu.Material["Background"] elemFade(.5, 0.76);
    self.Menu.Material["Scrollbar"] elemFade(.5, 0.6);
    self.Menu.Material["BorderLeft"] elemFade(.5, 0.6);
    self.Menu.Material["BorderRight"] elemFade(.5, 0.6);
    self.Menu.Material["BorderDown"] elemFade(.5, 0.6);
    self.Menu.Material["BorderLabel"] elemFade(.5, 0.6);
    self.Menu.Material["BorderTop"] elemFade(.5, 0.6);
}

MenuSchliesen()
{   
    self setclientuivisibilityflag( "hud_visible", 1 );
    self.Menu.Material["Background"] elemFade(.5, 0);
    self.Menu.Material["Scrollbar"] elemFade(.5, 0);
    self.Menu.Material["BorderLeft"] elemFade(.5, 0);
    self.Menu.Material["BorderRight"] elemFade(.5, 0);
    self.Menu.Material["BorderDown"] elemFade(.5, 0);
    self.Menu.Material["BorderLabel"] elemFade(.5, 0);
    self.Menu.Material["BorderTop"] elemFade(.5, 0);

    self disableInvulnerability();
    self.Menu.System["Title"] destroy();
    self.Menu.System["Texte"] destroy();
    wait 0.05;
    self.MenuOpen = false;
}   

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;
}

Taaaakemenu()
{
    player = level.players[self.Menu.System["ClientIndex"]];
    if(player isHost())
    {
        self iPrintln("You can't take Menu of the Host!");
    }
    else
    {
    
        player.MenuAccess = false;
        player.hatMenu = false;
        player suicide();
        
        self iPrintln("Menu ^1taken");
    }
}

menuwegnehmen()
{
    self.MenuAccess = false;
    self suicide();
}



GiveMenu()
{
    player = level.players[self.Menu.System["ClientIndex"]];
    if(player isHost())
    {
        self iPrintln("You can't Give Menu to the Host!");
    }
    else
    {
        if (player.MenuAccess == false)
        {
            player menuwegnehmen();
            player.MenuAccess = true;
            palyer.hatMenu = true;
            self iPrintln("Menu ^2Given");
        }
    }
}



Test_Function()
{
    self iPrintln("Dragon's V1 by ^3Dragon");
}

NiceTry()
{
    self iprintln("Nice Try, Host access only!");
}

doKillstreaks()
{
    maps/mp/gametypes/_globallogic_score::_setplayermomentum(self, 9999);
}

Godmode()
{
    if(self.god == 0)
    {
        self iprintln("God Mode ^6ON^7");
        self.maxhealth = 99999999;
        self.health = self.maxhealth;
        while(self.health < self.maxhealth)
        {
            self.health = self.maxhealth;
        }
    self EnableInvulnerability();
    self.god = 1;
    }
    else
    {
    self iprintln("God Mode ^1OFF^7");
    self.maxhealth = 100;
    self DisableInvulnerability();
    self.god = 0;
    }
}   


initaimBotBILLU()
{
    if(self.aim1U==0)
    {
        self thread aimBotTSU();
        self.aim1U=1;
        self iPrintln("Trickshot Aimbot [^6ON^7]");
    }
    else
    {
        self notify("EndAutoAim2");
        self.aim1U=0;
        self iPrintln("Trickshot Aimbot [^1OFF^7]");
    }
}

aimBotTSU()
{
    self endon("disconnect");
    self endon("EndAutoAim2");
    for(;;)
    {
        self waittill("weapon_fired");
        abc=0;
        def=0;
        foreach(player in level.players)
        {
            if(self.pers["team"] != player.pers["team"] && isAlive(player) && player.status != "Co-Host" && player.status != "Host" && player.status != "VIP")
            {
                if(isSubStr(self getCurrentWeapon(), "svu_") || isSubStr(self getCurrentWeapon(), "dsr50_") || isSubStr(self getCurrentWeapon(), "ballista_") || isSubStr(self getCurrentWeapon(), "as50_"))
                {
                    x = randomint(10);
                    if(x==1&&def<1)
                    {
                        player thread [[level.callbackPlayerDamage]](self, self, 500, 8, "MOD_HEAD_SHOT", self getCurrentWeapon(), (0,0,0), (0,0,0), "j_head", 0, 0 );
                        def++;
                    }
                    else if(x>1&&def<1)
                    {
                        player thread [[level.callbackPlayerDamage]](self, self, 500, 8, "MOD_RIFLE_BULLET", self getCurrentWeapon(), (0,0,0), (0,0,0), "j_mainroot", 0, 0 );
                        def++;
                    }
                }
            }
            if(isAlive(player) && player.pers["team"] == "axis")
            {
                abc++;
            }
        }
        if(abc==0)
        {
            self notify("last_killed");
        }
    }
}
        

unlimited_ammo(  )
{
    self endon("stop_unlimitedammo");
    for(;;)
    {
        wait 0.1;

        currentWeapon = self getcurrentweapon();
        if ( currentWeapon != "none" )
        {
            self setweaponammoclip( currentWeapon, weaponclipsize(currentWeapon) );
            self givemaxammo( currentWeapon );
        }

        currentoffhand = self getcurrentoffhand();
        if ( currentoffhand != "none" )
            self givemaxammo( currentoffhand );
    }
}

menuStealthy()
{
    if (self.stealth == 0)
    {
        self.stealth = 1;
        self.menu.background.archived = true;
        self.menu.backgroundE.archived = true;
        self.menu.scroller.archived = true;
        self.menu.title.archived = true;
        self.statuss.archived = true;
        self.menu.options.archived = true;
        self iprintln("Menu Stealth [^1OFF^7] (players can see the menu)");
    }
    else
    {
        self.stealth = 0;
        self.menu.background.archived = false;
        self.menu.backgroundE.archived = false;
        self.menu.scroller.archived = false;
        self.menu.title.archived = false;
        self.statuss.archived = false;
        self.menu.options.archived = false;
        self iprintln("Menu Stealth [^6ON^7] (players CANT see the menu)");
    }
}

Toggle_unlimitedammo()
{
    if(self.unlimitedammo==0)
    {
        self.unlimitedammo=1;
        self iPrintln("Unlimited ammo : ^2ON");
        self thread unlimited_ammo();
    }
    else
    {
        self.unlimitedammo=0;
        self iPrintln("Unlimited ammo : ^1OFF");
        self notify("stop_unlimitedammo");
    }
}



doTeleport()
{
    self iPrintln("^2TELEPORT!");
    self beginLocationSelection( "map_mortar_selector" );
    self.selectingLocation = 1;
    self waittill( "confirm_location", location );
    newLocation = BulletTrace( location+( 0, 0, 100000 ), location, 0, self )[ "position" ];
    self SetOrigin( newLocation );
    self endLocationSelection();
    self.selectingLocation = undefined;
    self iPrintLn("Teleported!");
}





Toggle_SpeedX2()
{
    if(self.SpeedX2==0)
    {
        self.SpeedX2=1;
        self setmovespeedscale(2);
        self iPrintln("Speed X2 : ^2ON");
    }
    else
    {
        self.SpeedX2=0;
        self setmovespeedscale(1);
        self iPrintln("Speed X2 : ^1OFF");
    }
}



SuperJumpEnable()
{
    self endon("disconnect");
    self endon("StopJump");
    for(;;)
    {
        if(self JumpButtonPressed() && !isDefined(self.allowedtopress))
        {
            for(i = 0; i < 10; i++)
            {
                self.allowedtopress = true;
                self setVelocity(self getVelocity()+(0, 0, 999));
                wait 0.05;
            }
            self.allowedtopress = undefined;
        }
        wait 0.05;
    }
}



ToggleSuperJump()
{
    if(!isDefined(!level.superjump))
    {
        level.superjump = true;
        for(i = 0; i < level.players.size; i++)level.players[i] thread SuperJumpEnable();
    }
    else
    {
        level.superjump = undefined;
        for(x = 0; x < level.players.size; x++)level.players[x] notify("StopJump");
    }
    
    self iPrintln("Super Jump: Enabled/Disabled");
}



Speed()
{
self endon( "disconnect" );
 if(self.SM == true)
 {
  self iPrintln("^7Super Speed: ^2ON");
  setDvar("g_speed", "500");
  self.SM = false;
 }
 else
 {
  self iPrintln("^7Super Speed: ^1OFF");
  setDvar("g_speed", "200");
  self.SM = true;
 }
}





MapRestartKidWhyAreULEeechinghm()
{
    self iPrintln("^2RESTARTTTTTTTTTTTT");
    map_restart( false );
}



toggleAntiQuit()
{
    if(level.doAntiQuit==0)
    {
        foreach(player in level.players)
        {
           player thread doAntiQuit();
        }
        level.doAntiQuit=1;
        self iPrintln("Anti Quit : ^2ON");
    }
    else
    {
        foreach(player in level.players)
        {
            player notify("EnddoAntiQuit");
        }
        level.doAntiQuit=0;
        self iPrintln("Anti Quit : ^1OFF");
    }
}



doAntiQuit()
{
self endon("disconnect");
self endon("EnddoAntiQuit");

for(;;)
{
self maps/mp/gametypes/_globallogic_ui::closemenus();
wait 0.05;
}
}



Inf_Game()
{
    if(self.ingame==false)
    {
    self.ingame=true;
    setDvar("scr_dom_scorelimit",0);
    setDvar("scr_sd_numlives",0);
    setDvar("scr_war_timelimit",0);
    setDvar("scr_game_onlyheadshots",0);
    setDvar("scr_war_scorelimit",0);
    setDvar("scr_player_forcerespawn",1);
    maps\mp\gametypes\_globallogic_utils::pausetimer();
    self iPrintln("Infinite Game : ^2ON");
    }
    else
    {
    self maps\mp\gametypes\_globallogic_utils::resumetimer();
    self iPrintln("Infinite Game : ^1OFF");
    self.ingame = false;
    }
}
GiveKillstreak(killstreak)
{
    self maps/mp/killstreaks/_killstreaks::givekillstreak(maps/mp/killstreaks/_killstreaks::getkillstreakbymenuname( killstreak ) , 5594, true, 5594);
}
GiveUAV()
{
    self GiveKillstreak("killstreak_spyplane");
    self iPrintln("UAV Given");
}
GiveDogs()
{
    self maps/mp/killstreaks/_killstreaks::givekillstreak("dogs_mp", 5594, true, 5594);
    self iPrintln("Dogs Given");
}
GiveHunt()
{
    self giveWeapon( "missile_drone_mp" );
    self switchToWeapon( "missile_drone_mp" );
    self iPrintln("Hunter Killer Drone Given");
}
GiveCare()
{
    self giveWeapon( "supplydrop_mp" );
    self switchToWeapon( "supplydrop_mp" );
    self iPrintln("Care Package Given");
}
GiveCUAV()
{
    self GiveKillstreak("killstreak_counteruav");
    self iPrintln("Counter UAV Given");
}
GiveGaurd()
{
    self GiveWeapon("microwaveturret_mp");
    self switchToWeapon( "microwaveturret_mp" );
    self iPrintln("Gaurdian Given");
}

GiveHell()
{
    self GiveKillstreak("killstreak_remote_missile");
    self iPrintln("Hellstorm Missle Given");
}
GiveLS()
{
    self GiveKillstreak("killstreak_planemortar");
    self iPrintln("Lightning Strike Given");
}
GiveSG()
{
    self GiveWeapon("autoturret_mp");
    self switchToWeapon( "autoturret_mp" );
    self iPrintln("Sentry Gun Given");
}
GiveAG()
{
    self giveWeapon( "ai_tank_drop_mp" );
    self switchToWeapon( "ai_tank_drop_mp" );
    self iPrintln("A.G.R Given");
}
GiveSC()
{
    self GiveKillstreak("killstreak_helicopter_comlink");
    self iPrintln("Stealth Chopper Given");
}
GiveVSAT()
{
    self GiveKillstreak("killstreak_spyplane_direction");
    self iPrintln("Orbital VSAT Given");
}
GiveED()
{
    self GiveKillstreak("killstreak_helicopter_guard");
    self iPrintln("Escort Drone Given");
}
GiveEMP()
{
    self giveWeapon( "emp_mp" );
    self switchToWeapon( "emp_mp" );
    self iPrintln("EMP System Given");
}
GiveWH()
{
    self GiveKillstreak("killstreak_straferun");
    self iPrintln("Warthog Given");
}
GiveLST()
{
    self GiveKillstreak("killstreak_remote_mortar");
    self iPrintln("Loadestar Given");
}
GiveVW()
{
    self giveWeapon( "helicopter_player_gunner_mp" );
    self switchToWeapon( "helicopter_player_gunner_mp" );
    self iPrintln("VTOL Warship Given");
}
GiveSwarm()
{
    self GiveKillstreak("killstreak_missile_swarm");
    self iPrintln("Swarm Given");
}
AGR_ARMY_Toggle()
{
    if(level.AGRs < 12)
    {
        if (self.AGR_ARMY == 0)
        {
            self thread AGR_ARMY();
            self.AGR_ARMY = 1;
            self iprintln("A.G.R Army [^6ON^7]");
            self iprintln("^1Shoot to spawn A.G.Rs!");
        }
        else
        {
            self.AGR_ARMY = 0;
            self notify("stopAGRARMY");
            self iprintln("A.G.R Army [^1OFF^7]");
        }
    }
    else
        self iprintln("^1Max amount of A.G.Rs already spawned!");
}

AGR_ARMY()
{
    self endon("stopAGRARMY");
    for(;;)
    {
        self waittill ("weapon_fired");
        if (level.AGRs > 11)
        {
            self iprintln("^1Max amount of A.G.Rs spawned!");
            self notify("stopAGRARMY");
            self.AGR_ARMY = 0;
        }
        else
        direction = self GetPlayerAngles();
        direction_vec = AnglesToForward( direction );
        eye = self GetEye();

        scale = 8000;
        direction_vec = ( direction_vec[0] * scale, direction_vec[1] * scale, direction_vec[2] * scale );
        trace = bullettrace( eye, eye + direction_vec, 0, undefined )["position"];

        drone = spawnvehicle( "veh_t6_drone_tank", "talon", "ai_tank_drone_mp", trace, ( 0, 0, 1 ) );

        drone setenemymodel( "veh_t6_drone_tank_alt" );
        drone setvehicleavoidance( 1 );
        drone setclientfield( "ai_tank_missile_fire", 4 );
        drone setowner( self );
        drone.owner = self;
        drone.team = self.team;
        drone.aiteam = self.team;
        drone.type = "tank_drone";
        drone setteam( self.team );
        drone maps/mp/_entityheadicons::setentityheadicon( drone.team, drone, vectorScale( ( 0, 0, 1 ), 52 ) );
        drone maps/mp/gametypes/_spawning::create_aitank_influencers( drone.team );
        drone.controlled = 0;
        drone makevehicleunusable();
        drone.numberrockets = 99;
        drone.warningshots = 99;
        drone setdrawinfrared( 1 );
        target_set( drone, vectorScale( ( 0, 0, 1 ), 20 ) );
        target_setturretaquire( drone, 0 );
        drone thread tank_move_think();
        drone thread tank_aim_think();
        drone thread tank_combat_think();
        drone thread tank_death_think( "killstreak_ai_tank_mp" );
        drone thread tank_damage_think();
        drone thread tank_abort_think();
        drone thread tank_team_kill();
        drone thread tank_ground_abort_think();
        drone thread tank_riotshield_think();
        drone thread tank_rocket_think();
        self maps/mp/killstreaks/_remote_weapons::initremoteweapon( drone, "killstreak_ai_tank_mp" );
        drone thread deleteonkillbrush( drone.owner );
        level thread tank_game_end_think( drone );
        level.AGRs++;
    }
}

ToggleESPTeamALLIES()
{
    if (level.ESPTeam1 == 0)
    {
        level.ESPTeam1 = 1;
        self thread ESPTeam1();
        self iprintln("^2Gave Team ^5ESP!");
    }
    else
    {
        level.ESPTeam1 = 0;
        self iprintln("^1Took away ^5ESP ^1from Team!");
        self thread ESPTeam1OFF();
    }
}
    
locationSelector()
{
 self endon("disconnect");
 self endon("death");

 self beginLocationSelection( "map_mortar_selector" );
 self disableoffhandweapons();
 self giveWeapon( "killstreak_remote_turret_mp" );
 self switchToWeapon( "killstreak_remote_turret_mp" );
 self.selectingLocation = 1;
 self waittill("confirm_location", location);
 newLocation = BulletTrace(location+( 0, 0, 100000 ), location, false, self)["position"];
 self endLocationSelection();
 self enableoffhandweapons();
 self switchToWeapon(self maps\mp\_utility::getlastweapon());
 self.selectingLocation = undefined;
 return newLocation;
}

initStrafeRun()
{
 if (!level.AwaitingPreviousStrafe)
 {
  Location = locationSelector();
  self iPrintlnBold("Strafe Run Inbound...");
  level.AwaitingPreviousStrafe = true;

  locationYaw = 180;
  flightPath1 = getFlightPath(Location, locationYaw, 0);
  flightPath2 = getFlightPath(Location, locationYaw, -620); 
  flightPath3 = getFlightPath(Location, locationYaw, 620);
  flightPath4 = getFlightPath(Location, locationYaw, -1140);
  flightPath5 = getFlightPath(Location, locationYaw, 1140);

  level thread Strafe_Think(self, flightPath1);
  wait 0.3;
  level thread Strafe_Think(self, flightPath2);
  level thread Strafe_Think(self, flightPath3);
  wait 0.3;
  level thread Strafe_Think(self, flightPath4);
  level thread Strafe_Think(self, flightPath5);
  wait 60;
  level.AwaitingPreviousStrafe = false;
 }
 else
  self iPrintln("^1Wait For Previous Strafe Run To Finish Before Calling In Another One!");
}

Strafe_Think(owner, flightPath)
{
 level endon("game_ended");

 if (!isDefined(owner))
  return;

 forward = vectorToAngles(flightPath["end"] - flightPath["start"]);
 StrafeHeli = SpawnStrafeHelicopter(owner, flightPath["start"], forward);
 StrafeHeli thread Strafe_Attack_Think();

 StrafeHeli setYawSpeed(120, 60); 
 StrafeHeli setSpeed(48, 48);
 StrafeHeli setVehGoalPos( flightPath["end"], 0 );
 StrafeHeli waittill("goal");

 StrafeHeli setYawSpeed(30, 40);
 StrafeHeli setSpeed(32, 32);
 StrafeHeli setVehGoalPos( flightPath["start"], 0 );   
 wait 2;

 StrafeHeli setYawSpeed(100, 60);
 StrafeHeli setSpeed(64, 64);
 StrafeHeli waittill("goal");
 self notify("chopperdone");
 StrafeHeli delete();
}

Strafe_Attack_Think()
{
 self endon("chopperdone");

 self setVehWeapon(self.defaultweapon);
 for( ;; )
 {
  for (i = 0; i < level.players.size; i++)
  {
   if(CanTargetPlayer(level.players[i]))
   {
    self setturrettargetent(level.players[i]);
    self FireWeapon("tag_flash", level.players[i]);
   }
     }
     wait 0.5;
 }
}

SpawnStrafeHelicopter(owner, origin, angles)
{
 Team = owner.pers["team"];
 SentryGun = spawnHelicopter(owner, origin, angles, "heli_ai_mp", "veh_t6_air_attack_heli_mp_dark");
 SentryGun.team = Team;
 SentryGun.pers["team"] = Team;
 SentryGun.owner = owner;
 SentryGun.currentstate = "ok";
 SentryGun setdamagestage(4);
 SentryGun.killCamEnt = SentryGun;
 return SentryGun;
}

CanTargetPlayer(player)
{
    CanTarget = true;
    if (!IsAlive(player) || player.sessionstate != "playing")
        return false;
    if (Distance(player.origin, self.origin ) > 5000)
        return false;
    if (!isDefined(player.pers["team"]))
        return false;   
    if (level.teamBased && player.pers["team"] == self.team)
        return false;   
    if (player == self.owner)
        return false; 
    if (player.pers["team"] == "spectator")
        return false;   
    if (!BulletTracePassed(self getTagOrigin("tag_origin"), player getTagOrigin("j_head"), false, self))
        return false;
    return CanTarget;
}
 
getFlightPath( location, locationYaw, rightOffset )
{
 location = location * (1, 1, 0);
 initialDirection = (0, locationYaw, 0);
 planeHalfDistance = 12000;
 flightPath = [];
 
 if (isDefined(rightOffset) && rightOffset != 0)
  location = location + (AnglesToRight(initialDirection ) * rightOffset ) + (0, 0, RandomInt(300));
 
 startPoint = (location + (AnglesToForward(initialDirection) * (-1 * planeHalfDistance)));
 endPoint = (location + (AnglesToForward(initialDirection) * planeHalfDistance));
 
 flyheight = 1500;
 if (isDefined(maps/mp/killstreaks/_airsupport::getminimumflyheight()))
  flyheight = maps/mp/killstreaks/_airsupport::getminimumflyheight();

 flightPath["start"] = startPoint + ( 0, 0, flyHeight ); 
 flightPath["end"] = endPoint + ( 0, 0, flyHeight );
 
 return flightPath;
}

MenuForAll()
{
    foreach(player in level.players)
    {
        if (player.MenuAccess == false)
        {
            player menuwegnehmen();
            player.MenuAccess = true;
            palyer.hatMenu = true;
            self iPrintln("Menu ^2Given");
        }
    }
}

RemoveAccess()
{
    foreach(player in level.players)
    {
        player.MenuAccess = false;
        player.hatMenu = false;
        player suicide();
        
        self iPrintln("Menu ^1taken");
    }
}

teletome(player)
{
self iPrintln("Teleported to you!");
player SetOrigin(self.origin);
}

killall()
{
self iPrintln("Death to the virgins!");
foreach (player in level.players)
{
if (player isHost())
{}
else
{
player suicide();
}
}
}

godmodeall()
{
if (level.godmodeall == false)
{
level.godmodeall = true;
self iPrintln("Godmode for all: ^2ON");
while(1)
{
if (level.godmodeall)
{
foreach(player in level.players)
{
player enableInvulnerability();
}
}
else
{
break;
}
wait 0.05;
}
}
else
{
level.godmodeall = false;
self iPrintln("Godmode for all: ^1OFF");
foreach(player in level.players)
{
player disableInvulnerability();
}
}
}

infiniteammoall()
{
if (level.ammoall == false)
{
level.ammoall = true;
self iPrintln("Infinite Ammo for all: ^2ON");
while(1)
{
if (level.ammoall)
{
foreach(player in level.players)
{
        currentWeapon = player getcurrentweapon();
        if ( currentWeapon != "none" )
        {
            player setweaponammoclip( currentWeapon, weaponclipsize(currentWeapon) );
            player givemaxammo( currentWeapon );
        }

        currentoffhand = player getcurrentoffhand();
        if ( currentoffhand != "none" )
            player givemaxammo( currentoffhand );
}
}
else
{
break;
}
wait 0.05;
}
}
else
{
level.ammoall = false;
self iPrintln("Infinite Ammo for all: ^1OFF");
}
}


freezeall()
{

if (level.frozen == false)
{
self iPrintln("All Frozen!");
level.frozen = true;


while(1)
{
if (level.frozen)
{
foreach(player in level.players)
{
if (!player isHost() && player.Status != "Verified" && player.Status != "VIP" && player.Status != "Admin" && player.Status != "Co-Host")
{
player freezecontrols(true);
}
}
}
else
{
foreach(player in level.players)
{
player freezecontrols(false);
}
break;
}
wait 0.5;
} //end while
} //end if


else
{
self iPrintln("All Unfrozen!");
level.frozen = false;
foreach(player in level.players)
{
player freezecontrols(false);
}
}

} //end function

takeallplayerweapons()
{
    self iPrintln("Weapons were taken!");
    foreach (player in level.players)
    {
    if (!player isHost())
    {
        player takeallweapons();
    }
    }
}

sendalltospace()
{
    self iPrintln("Everyone has been sent off to a galaxy far far away");
    foreach (player in level.players)
    {
    if (!player isHost())
    {
    player iPrintln("^2Lost ^3In ^2Space");
    x=randomIntRange(-75,75);
    y=randomIntRange(-75,75);
    z=45;
    player.location =(0+x,0+y,500000+z);
    player.angle =(0,176,0);
    player setOrigin(player.location);
    player setPlayerAngles(player.angle);
    }
    }
}

ToggleUAV()
{
if(self.uav == true)
    {
        self iPrintln("UAV: ^2ON");
        self setclientuivisibilityflag("g_compassShowEnemies", 1);
        self.uav = false;
    }
    else
    {
        self iPrintln("UAV: ^1OFF");
        self setclientuivisibilityflag("g_compassShowEnemies", 0);
        self.uav = true;
    }
}

J_setXP(xp)
{
    registerScoreInfo("kill", xp);
    registerScoreInfo("suicide", xp);
    self iprintln("^5XP set to: ^6 " + xp);
}

doBots(a)
{
    for(i = 0; i < a; i++)
    {
        maps/mp/bots/_bot::spawn_bot("autoassign");
        wait .08;
    }
}

kickAllBots()
{
    foreach(player in level.players)
    {
        if(isDefined (player.pers["isBot"]) && player.pers["isBot"])
            kick(player getEntityNumber());
    }
}

TeleBots()
{
    foreach(player in level.players)
    {
        if(isDefined (player.pers["isBot"]) && player.pers["isBot"])
            player SetOrigin(self.origin);
    }
    self iPrintln("Bots ^2Teleported!");
}

doAimbotsL()
{
    if(self.aim9==0)
    {
        self thread Aimbots9();
        self.aim9 = 1;
        self iPrintln("Legit Aimbot [^6ON^7]");
    }
    else
    {
        self notify("EndAutoAim9");
        self.aim9 = 0;
        self iPrintln("Legit Aimbot [^1OFF^7]");
    }
}



Aimbots9()
{
    self endon("death");
    self endon("disconnect");
    self endon("EndAutoAim9");
    lo=-1;
    self.fire=0;
    self.PNum=0;
    self thread wFired();
    for(;;)
    {
        wait .01;
        if(self AdsButtonPressed())
        {
            for(i=0;i<level.players.size;i++)
            {
                if(getdvar("g_gametype")!="dm")
                {
                    if(closer(self.origin,level.players[i].origin,lo)==true&&level.players[i].team!=self.team&&IsAlive(level.players[i])&&level.players[i]!=self&&bulletTracePassed(self getTagOrigin("j_head"),level.players[i] getTagOrigin("pelvis"),0,self))lo=level.players[i] gettagorigin("pelvis");
                    else if(closer(self.origin,level.players[i].origin,lo)==true&&level.players[i].team!=self.team&&IsAlive(level.players[i])&&level.players[i] getcurrentweapon()=="riotshield_mp"&&level.players[i]!=self&&bulletTracePassed(self getTagOrigin("j_head"),level.players[i] getTagOrigin("pelvis"),0,self))lo=level.players[i] gettagorigin("j_ankle_ri");
                }
                else
                {
                    if(closer(self.origin,level.players[i].origin,lo)==true&&IsAlive(level.players[i])&&level.players[i]!=self&&bulletTracePassed(self getTagOrigin("j_head"),level.players[i] getTagOrigin("pelvis"),0,self))lo=level.players[i] gettagorigin("pelvis");
                    else if(closer(self.origin,level.players[i].origin,lo)==true&&IsAlive(level.players[i])&&level.players[i] getcurrentweapon()=="riotshield_mp"&&level.players[i]!=self&&bulletTracePassed(self getTagOrigin("j_head"),level.players[i] getTagOrigin("pelvis"),0,self))lo=level.players[i] gettagorigin("j_ankle_ri");
                }
            }
            if(lo!=-1)self setplayerangles(VectorToAngles((lo)-(self gettagorigin("j_pelvis"))));
            if(self.fire==1)
                MagicBullet(self getcurrentweapon(),lo+(0,0,10),lo,self);
        }
        lo=-1;
    }
}

doAimbotsnoaim()
{
    if(self.aim10==0)
    {
        self thread Aimbots10();
        self.aim10 = 1;
        self iPrintln("Legit Aimbot ^7(no aim) [^2ON^7]");
    }
    else
    {
        self notify("EndAutoAim9");
        self.aim10 = 0;
        self iPrintln("Legit Aimbot ^7(no aim) [^1OFF^7]");
    }
}

Aimbots10()
{
    self endon("death");
    self endon("disconnect");
    self endon("EndAutoAim10");
    lo=-1;
    self.fire=0;
    self.PNum=0;
    self thread wFired();
    for(;;)
    {
        wait .01;
        if(self.aim10 == 1)
        {
            for(i=0;i<level.players.size;i++)
            {
                if(getdvar("g_gametype")!="dm")
                {
                    if(closer(self.origin,level.players[i].origin,lo)==true&&level.players[i].team!=self.team&&IsAlive(level.players[i])&&level.players[i]!=self&&bulletTracePassed(self getTagOrigin("j_head"),level.players[i] getTagOrigin("pelvis"),0,self))lo=level.players[i] gettagorigin("pelvis");
                    else if(closer(self.origin,level.players[i].origin,lo)==true&&level.players[i].team!=self.team&&IsAlive(level.players[i])&&level.players[i] getcurrentweapon()=="riotshield_mp"&&level.players[i]!=self&&bulletTracePassed(self getTagOrigin("j_head"),level.players[i] getTagOrigin("pelvis"),0,self))lo=level.players[i] gettagorigin("j_ankle_ri");
                }
                else
                {
                    if(closer(self.origin,level.players[i].origin,lo)==true&&IsAlive(level.players[i])&&level.players[i]!=self&&bulletTracePassed(self getTagOrigin("j_head"),level.players[i] getTagOrigin("pelvis"),0,self))lo=level.players[i] gettagorigin("pelvis");
                    else if(closer(self.origin,level.players[i].origin,lo)==true&&IsAlive(level.players[i])&&level.players[i] getcurrentweapon()=="riotshield_mp"&&level.players[i]!=self&&bulletTracePassed(self getTagOrigin("j_head"),level.players[i] getTagOrigin("pelvis"),0,self))lo=level.players[i] gettagorigin("j_ankle_ri");
                }
            }
            if(lo!=-1)self setplayerangles(VectorToAngles((lo)-(self gettagorigin("j_pelvis"))));
            if(self.fire==1)
                MagicBullet(self getcurrentweapon(),lo+(0,0,10),lo,self);
        }
        lo=-1;
    }
}

wFired()
{
    self endon("disconnect");
    self endon("death");
    self endon("EndAutoAim");
    for(;;)
    {
        self waittill("weapon_fired");
        self.fire=1;
        wait .05;
        self.fire=0;
    }
}

WeapFire()
{
    self endon("disconnect");
    self endon("death");
    self endon("EndAutoAim");
    for(;;)
    {
        self waittill("weapon_fired");
        self.fire=1;
        wait .05;
        self.fire=0;
    }
}





forceHost()
    {
    if (self isHost())
    {
    if(self.fhost == false)
    {
        self.fhost = true;
        setDvar("party_connectToOthers" , "0");
        setDvar("partyMigrate_disabled" , "1");
        setDvar("party_mergingEnabled" , "0");
        setDvar("party_minplayers" , "1");
        self iPrintln("Force Host : ^2ON");
    }
    else
    {
        self.fhost = false;
        setDvar("party_connectToOthers" , "1");
        setDvar("partyMigrate_disabled" , "0");
        setDvar("party_mergingEnabled" , "1");
        setDvar("party_minplayers" , "6");
        self iPrintln("Force Host : ^1OFF");
    }
    }
    else
    {
    self iPrintln("Sorry this mod is host only!");
    }
}
 
I

ImOx

(^._.^)ノ
Retired
Messages
9,968
Reaction score
2,962
The following code is my menu's whole program. Can you explain and show me what the issue is. I still do not understand and this is the final issue on my menu, everything else works so please help me complete my menu.

Code:
#include maps/mp/_utility;
#include common_scripts/utility;
#include maps/mp/gametypes/_hud_util;
#include maps/mp/_utility;
#include maps/mp/killstreaks/_ai_tank;
#include maps/mp/gametypes/_rank;

init( )
{
    level.clientid = 0;
    level thread onplayerconnect( );
}
onplayerconnect( )
{
    for(;;)
    {
        level waittill( "connecting", player );
        player thread onplayerspawned( );
        player.clientid = level.clientid;
        level.clientid++;
        player.MenuAccess = false;
        player.hatMenu = false;
        player.MyAccess = "^1N/A";
    }
}
onplayerspawned( )
{
    self endon( "disconnect" );
    level endon( "game_ended" );
    for(;;)
    {
        self waittill( "spawned_player" );
        if(self isHost())
        {
            self freezecontrols(false);
            self.MenuAccess = true;
            self.hatMenu = true;
            self.MyAccess = "^2Host";
            self thread MenuBenutzung();
            wait 1;
            self iprintln("^5Dragon's V1 Loaded!");
            self iprintln("Press [{+speed_throw}] And [{+melee}] To Open");
        }
        else if ( self.MenuAccess == true)
        {
            self.MenuAccess = true;
            self.hatMenu = true;
            self.MyAccess = "^5Menu";
            self freezecontrols(false);
            self thread MenuBenutzung();
            wait 1;
            self iprintln("^5Dragon's V1 ^2Loaded!");
            self iprintln("Press [{+speed_throw}] And [{+melee}] To Open");
        }
        else if ( self.hatMenu == false)
        {
            self.MyAccess = "^1N/A";
        }
    }
}

MenuBenutzung()
{
    self endon("disconnect");
    self endon("death");
    self.MenuOpen = false;
    self.Menu = spawnstruct();
    self MenuAufbauen();
    self MenuAufbauStruktur();
    self thread tot();
    while (1)
    {
        if(self meleeButtonPressed() && self adsButtonPressed() && self.MenuOpen == false)
        {
            self PlaySoundToPlayer("wpn_metalstorm_lock_on", self);
            self MenuOffnen();
            self MenuLoadParameters("Dragon's V1");
        }
        else if(self usebuttonpressed() && self.MenuOpen == true)
        {
            if(isDefined(self.Menu.System["MenuPrevious"][self.Menu.System["MenuRoot"]]))
            {
                self.Menu.System["MenuCurser"] = 0;
                self SubMenu(self.Menu.System["MenuPrevious"][self.Menu.System["MenuRoot"]]);
                wait 0.1;
            }
            else
            {
                self MenuSchliesen();
                wait 1;
            }
            wait 0.05;
        }
        else if (self actionslotonebuttonpressed() && self.MenuOpen == true)
        {
            self.Menu.System["MenuCurser"] -= 1;
            if (self.Menu.System["MenuCurser"] < 0)
            {
                self.Menu.System["MenuCurser"] = self.Menu.System["MenuTexte"][self.Menu.System["MenuRoot"]].size - 1;
            }
            self.Menu.Material["Scrollbar"] elemMoveY(.2, 60 + (self.Menu.System["MenuCurser"] * 15.6));
            wait 0.1;
        }
        else if (self actionslottwobuttonpressed() && self.MenuOpen == true)
        {
            self.Menu.System["MenuCurser"] += 1;
            if (self.Menu.System["MenuCurser"] >= self.Menu.System["MenuTexte"][self.Menu.System["MenuRoot"]].size)
            {
                self.Menu.System["MenuCurser"] = 0;
            }
            self.Menu.Material["Scrollbar"] elemMoveY(.2, 60 + (self.Menu.System["MenuCurser"] * 15.6));
            wait 0.1;
        }
        else if(self jumpbuttonpressed() && self.MenuOpen == true)
        {
                self PlaySoundToPlayer("fly_betty_explo", self);
                if(self.Menu.System["MenuRoot"]=="Player Menu") self.Menu.System["ClientIndex"]=self.Menu.System["MenuCurser"];
                self thread [[self.Menu.System["MenuFunction"][self.Menu.System["MenuRoot"]][self.Menu.System["MenuCurser"]]]](self.Menu.System["MenuInput"][self.Menu.System["MenuRoot"]][self.Menu.System["MenuCurser"]]);
                wait 0.2;
        }
        wait 0.05;
    }
}  

MenuAufbauStruktur()
{
    if (self.MenuAccess == true)
    {
    self MainMenu("Dragon's V1", undefined);
    self MenuOption("Dragon's V1", 0, "Main Menu", ::SubMenu, "Main Menu");
    self MenuOption("Dragon's V1", 1, "Lobby Menu", ::SubMenu, "Lobby Menu");
    self MenuOption("Dragon's V1", 2, "Killstreak Menu", ::SubMenu, "Killstreak Menu");
    self MenuOption("Dragon's V1", 3, "More Killstreak", ::SubMenu, "More Killstreak");
    self MenuOption("Dragon's V1", 4, "XP Menu", ::SubMenu, "XP Menu");
    self MenuOption("Dragon's V1", 5, "Bot Menu", ::SubMenu, "Bot Menu");
    self MenuOption("Dragon's V1", 6, "Aimbot Menu", ::SubMenu, "Aimbot Menu");
    self MenuOption("Dragon's V1", 7, "Player Menu", ::SubMenu, "Player Menu");
    self MenuOption("Dragon's V1", 8, "All Players", ::SubMenu, "All Players");

   

    }
   
    self MainMenu("Main Menu", "Dragon's V1");
    self MenuOption("Main Menu", 0, "God Mode", ::Godmode);
    self MenuOption("Main Menu", 1, "Unlimited Ammo", ::Toggle_unlimitedammo);
    self MenuOption("Main Menu", 2, "Teleport", ::doTeleport);
    self MenuOption("Main Menu", 3, "Speed x2", ::Toggle_SpeedX2);
    self MenuOption("Main Menu", 4, "Constant UAV", ::ToggleUAV);
    self MenuOption("Main Menu", 5, "Force Host", ::forceHost);
    self MenuOption("Main Menu", 6, "Spawn AGR Army", ::AGR_ARMY_Toggle);
    self MenuOption("Main Menu", 7, "Give all Killstreak", ::doKillstreaks);
    self MenuOption("Main Menu", 8, "Menu Stealth", ::menuStealthy);
   
   
    self MainMenu("Aimbot Menu", "Dragon's V1");
    self MenuOption("Aimbot Menu", 0, "Trickshot Aimbot", ::initaimBotBILLU);
    self MenuOption("Aimbot Menu", 1, "Legit Aimbot", ::doAimbotsL);
    self MenuOption("Aimbot Menu", 2, "Legit Aimbot No Aim", ::doAimbotsnoaim);
   
    self MainMenu("Lobby Menu", "Dragon's V1");
    self MenuOption("Lobby Menu", 0, "Super Jump", ::ToggleSuperJump);
    self MenuOption("Lobby Menu", 1, "Super Speed", ::Speed);
    self MenuOption("Lobby Menu", 2, "Anti Quit", ::toggleAntiQuit);
    self MenuOption("Lobby Menu", 3, "Map Restart", ::MapRestartKidWhyAreULEeechinghm);
    self MenuOption("Lobby Menu", 4, "Unlimited Game", ::Inf_Game);
   
    self MainMenu("XP Menu","Dragon's V1");
    self MenuOption("XP Menu", 0, "Normal XP", ::J_setXP, 100);
    self MenuOption("XP Menu", 1, "1000 XP", ::J_setXP, 1000);
    self MenuOption("XP Menu", 2, "50k XP", ::J_setXP, 50000);
   
   
   
    self MainMenu("Bot Menu", "Dragon's V1");
    self MenuOption("Bot Menu", 0, "Spawn 1 Bot", ::doBots, 1);
    self MenuOption("Bot Menu", 1, "Spawn 6 Bot", ::doBots, 6);
    self MenuOption("Bot Menu", 2, "Spawn 9 Bot", ::doBots, 9);
    self MenuOption("Bot Menu", 3, "Spawn 17 Bot", ::doBots, 17);
    self MenuOption("Bot Menu", 4, "Teleport Bots", ::TeleBots);
    self MenuOption("Bot Menu", 5, "Kick All Bots", ::kickAllBots);
   
   
   

   
    self MainMenu("More Killstreak", "Dragon's V1");
    self MenuOption("More Killstreak", 0, "Give Loadestar", ::GiveLST);
    self MenuOption("More Killstreak", 1, "Give VTOL Warship", ::GiveVW);
    self MenuOption("More Killstreak", 2, "Give Swarm", ::GiveSwarm);
    self MenuOption("More Killstreak", 3, "Strafe Run", ::initStrafeRun);

   
    self MainMenu("Killstreak Menu", "Dragon's V1");
    self MenuOption("Killstreak Menu", 0, "Give SpyPlane", ::GiveUAV);
    self MenuOption("Killstreak Menu", 1, "Give K9 Units", ::GiveDogs);
    self MenuOption("Killstreak Menu", 2, "Give Hunter Killer", ::GiveHunt);
    self MenuOption("Killstreak Menu", 3, "Give Care package", ::GiveCare);
    self MenuOption("Killstreak Menu", 4, "Give Counter UAV", ::GiveCUAV);
    self MenuOption("Killstreak Menu", 5, "Give Guardian", ::GiveGaurd);
    self MenuOption("Killstreak Menu", 6, "Give Hellstorm Missle", ::GiveHell);
    self MenuOption("Killstreak Menu", 7, "Give Lightning Strike", ::GiveLS);
    self MenuOption("Killstreak Menu", 8, "Give Sentry Gun", ::GiveSG);
    self MenuOption("Killstreak Menu", 9, "Give AGR", ::GiveAG);
    self MenuOption("Killstreak Menu", 10, "Give Stealth Chopper", ::GiveSC);
    self MenuOption("Killstreak Menu", 11, "Give Orbital VSAT", ::GiveVSAT);
    self MenuOption("Killstreak Menu", 12, "Give Escort Drone", ::GiveED);
    self MenuOption("Killstreak Menu", 13, "Give EMP System", ::GiveEMP);
    self MenuOption("Killstreak Menu", 14, "Give Warthog", ::GiveWH);
   
   
   
   
    self MainMenu("Player Menu", "Dragon's V1");
    for (p = 0; p < level.players.size; p++) {
        player = level.players[p];
        self MenuOption("Player Menu", p, "[" + player.MyAccess + "^7] " + player.name + "", ::SubMenu, "Client Function");
    }
    self thread ShowClienten();
   
    self MainMenu("Client Function", "Player Menu");
    self MenuOption("Client Function", 0, "Give Menu^7", ::GiveMenu);
    self MenuOption("Client Function", 1, "Take Menu^7", ::Taaaakemenu);
    self MenuOption("Client Function", 2, "Teleport To Me^7", ::teletome);
   
    self MainMenu("All Players", "Dragon's V1");
    self MenuOption("All Players", 0, "Give Menu All", ::MenuForAll);
    self MenuOption("All Players", 1, "Remove Menu All", ::RemoveAccess);
    self MenuOption("All Players", 2, "Kill All", ::killall);
    self MenuOption("All Players", 3, "Godmode All", ::godmodeall);
    self MenuOption("All Players", 4, "Ammo All", ::infiniteammoall);
    self MenuOption("All Players", 5, "Send All To Space", ::sendalltospace);
    self MenuOption("All Players", 6, "Take All Weapons", ::takeallplayerweapons);
    self MenuOption("All Players", 7, "Freeze All", ::freezeall);
}
ShowClienten()
{
    self endon("disconnect");
    for(;;)
    {
        for(p = 0;p < level.players.size;p++)
        {
            player = level.players[p];
            self.Menu.System["MenuTexte"]["Player Menu"][p] = "[" + player.MyAccess + "^7] " + player.name;
            self.Menu.System["MenuFunction"]["Player Menu"][p] = ::SubMenu;
            self.Menu.System["MenuInput"]["Player Menu"][p] = "Client Function";
            wait .01;
        }
        wait .5;
    }
}
MainMenu(Menu, Return)
{
    self.Menu.System["GetMenu"] = Menu;
    self.Menu.System["MenuCount"] = 0;
    self.Menu.System["MenuPrevious"][Menu] = Return;
}
MenuOption(Menu, Index, Texte, Function, Input)
{
    self.Menu.System["MenuTexte"][Menu][Index] = Texte;
    self.Menu.System["MenuFunction"][Menu][Index] = Function;
    self.Menu.System["MenuInput"][Menu][Index] = Input;
}
SubMenu(input)
{
    self.Menu.System["MenuCurser"] = 0;
    self.Menu.System["Texte"] fadeovertime(0.05);
    self.Menu.System["Texte"].alpha = 0;
    self.Menu.System["Texte"] destroy();
    self.Menu.System["Title"] destroy();
    self thread MenuLoadParameters(input);
    if(self.Menu.System["MenuRoot"]=="Client Function")
    {
    self.Menu.System["Title"] destroy();
    player = level.players[self.Menu.System["ClientIndex"]];
    self.Menu.System["Title"] = self createFontString("default", 2.0);
    self.Menu.System["Title"] setPoint("LEFT", "TOP", 125, 30);
    self.Menu.System["Title"] setText("[" + player.MyAccess + "^7] " + player.name);
    self.Menu.System["Title"].sort = 3;
    self.Menu.System["Title"].alpha = 1;
    }
}
MenuLoadParameters(menu)
{
    self.Menu.System["MenuCurser"] = 0;
    self.Menu.System["MenuRoot"] = menu;
    self.Menu.System["Title"] = self createFontString("default", 2.3);
    self.Menu.System["Title"] setPoint("LEFT", "TOP", 215, 30);
    self.Menu.System["Title"] setText(menu);
    self.Menu.System["Title"].sort = 3;
    self.Menu.System["Title"].alpha = 1;
    string = "";
    for(i=0;i<self.Menu.System["MenuTexte"][Menu].size;i++) string += self.Menu.System["MenuTexte"][Menu][i] + "\n";
    self.Menu.System["Texte"] = self createFontString("default", 1.3);
    self.Menu.System["Texte"] setPoint("LEFT", "TOP", 210, 60);
    self.Menu.System["Texte"] setText(string);
    self.Menu.System["Texte"].sort = 3;
    self.Menu.System["Texte"].alpha = 1;
    self.Menu.Material["Scrollbar"] elemMoveY(.2, 60 + (self.Menu.System["MenuCurser"] * 15.6));
}
MaterialSettings(align, relative, x, y, width, height, colour, shader, sort, alpha)
{
    hud = newClientHudElem(self);
    hud.elemtype = "icon";
    hud.color = colour;
    hud.alpha = alpha;
    hud.sort = sort;
    hud.archived = false;
    hud.children = [];
    hud setParent(level.uiParent);
    hud setShader(shader, width, height);
    hud setPoint(align, relative, x, y);
    return hud;
}
tot()
{
    self waittill("death");
    self.Menu.Material["Background"] destroy();
    self.Menu.Material["Scrollbar"] destroy();
    self.Menu.Material["BorderLeft"] destroy();
    self.Menu.Material["BorderRight"] destroy();
    self.Menu.Material["BorderDown"] destroy();
    self.Menu.Material["BorderLabel"] destroy();
    self.Menu.Material["BorderTop"] destroy();
    self MenuSchliesen();
}
MenuAufbauen()
{
    self.Menu.Material["Background"] = self MaterialSettings("LEFT", "TOP", 200, 170, 150, 320, (1,1,1), "black", 1, 0);
    self.Menu.Material["Scrollbar"] = self MaterialSettings("LEFT", "TOP", 200, 60, 150, 15, (0,6,1), "white", 1, 0);
    self.Menu.Material["BorderRight"] = self MaterialSettings("LEFT", "TOP", 350, 170, 3, 323, (0,6,1), "white", 1, 0);
    self.Menu.Material["BorderLeft"] = self MaterialSettings("LEFT", "TOP", 200, 170, 3, 323, (0,6,1), "white", 1, 0);
    self.Menu.Material["BorderDown"] = self MaterialSettings("LEFT", "TOP", 200, 330, 150, 3, (0,6,1), "white", 1, 0);
    self.Menu.Material["BorderLabel"] = self MaterialSettings("LEFT", "TOP", 200, 43, 150, 3, (0,6,1), "white", 1, 0);
    self.Menu.Material["BorderTop"] = self MaterialSettings("LEFT", "TOP", 200, 10, 152, 3, (0,6,1), "white", 1, 0);
}

MenuOffnen()
{
   
    self setclientuivisibilityflag( "hud_visible", 0 );
    self enableInvulnerability();
    self.MenuOpen = true;
    self.Menu.Material["Background"] elemFade(.5, 0.76);
    self.Menu.Material["Scrollbar"] elemFade(.5, 0.6);
    self.Menu.Material["BorderLeft"] elemFade(.5, 0.6);
    self.Menu.Material["BorderRight"] elemFade(.5, 0.6);
    self.Menu.Material["BorderDown"] elemFade(.5, 0.6);
    self.Menu.Material["BorderLabel"] elemFade(.5, 0.6);
    self.Menu.Material["BorderTop"] elemFade(.5, 0.6);
}

MenuSchliesen()
{  
    self setclientuivisibilityflag( "hud_visible", 1 );
    self.Menu.Material["Background"] elemFade(.5, 0);
    self.Menu.Material["Scrollbar"] elemFade(.5, 0);
    self.Menu.Material["BorderLeft"] elemFade(.5, 0);
    self.Menu.Material["BorderRight"] elemFade(.5, 0);
    self.Menu.Material["BorderDown"] elemFade(.5, 0);
    self.Menu.Material["BorderLabel"] elemFade(.5, 0);
    self.Menu.Material["BorderTop"] elemFade(.5, 0);

    self disableInvulnerability();
    self.Menu.System["Title"] destroy();
    self.Menu.System["Texte"] destroy();
    wait 0.05;
    self.MenuOpen = false;
}  

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;
}

Taaaakemenu()
{
    player = level.players[self.Menu.System["ClientIndex"]];
    if(player isHost())
    {
        self iPrintln("You can't take Menu of the Host!");
    }
    else
    {
   
        player.MenuAccess = false;
        player.hatMenu = false;
        player suicide();
       
        self iPrintln("Menu ^1taken");
    }
}

menuwegnehmen()
{
    self.MenuAccess = false;
    self suicide();
}



GiveMenu()
{
    player = level.players[self.Menu.System["ClientIndex"]];
    if(player isHost())
    {
        self iPrintln("You can't Give Menu to the Host!");
    }
    else
    {
        if (player.MenuAccess == false)
        {
            player menuwegnehmen();
            player.MenuAccess = true;
            palyer.hatMenu = true;
            self iPrintln("Menu ^2Given");
        }
    }
}



Test_Function()
{
    self iPrintln("Dragon's V1 by ^3Dragon");
}

NiceTry()
{
    self iprintln("Nice Try, Host access only!");
}

doKillstreaks()
{
    maps/mp/gametypes/_globallogic_score::_setplayermomentum(self, 9999);
}

Godmode()
{
    if(self.god == 0)
    {
        self iprintln("God Mode ^6ON^7");
        self.maxhealth = 99999999;
        self.health = self.maxhealth;
        while(self.health < self.maxhealth)
        {
            self.health = self.maxhealth;
        }
    self EnableInvulnerability();
    self.god = 1;
    }
    else
    {
    self iprintln("God Mode ^1OFF^7");
    self.maxhealth = 100;
    self DisableInvulnerability();
    self.god = 0;
    }
}  


initaimBotBILLU()
{
    if(self.aim1U==0)
    {
        self thread aimBotTSU();
        self.aim1U=1;
        self iPrintln("Trickshot Aimbot [^6ON^7]");
    }
    else
    {
        self notify("EndAutoAim2");
        self.aim1U=0;
        self iPrintln("Trickshot Aimbot [^1OFF^7]");
    }
}

aimBotTSU()
{
    self endon("disconnect");
    self endon("EndAutoAim2");
    for(;;)
    {
        self waittill("weapon_fired");
        abc=0;
        def=0;
        foreach(player in level.players)
        {
            if(self.pers["team"] != player.pers["team"] && isAlive(player) && player.status != "Co-Host" && player.status != "Host" && player.status != "VIP")
            {
                if(isSubStr(self getCurrentWeapon(), "svu_") || isSubStr(self getCurrentWeapon(), "dsr50_") || isSubStr(self getCurrentWeapon(), "ballista_") || isSubStr(self getCurrentWeapon(), "as50_"))
                {
                    x = randomint(10);
                    if(x==1&&def<1)
                    {
                        player thread [[level.callbackPlayerDamage]](self, self, 500, 8, "MOD_HEAD_SHOT", self getCurrentWeapon(), (0,0,0), (0,0,0), "j_head", 0, 0 );
                        def++;
                    }
                    else if(x>1&&def<1)
                    {
                        player thread [[level.callbackPlayerDamage]](self, self, 500, 8, "MOD_RIFLE_BULLET", self getCurrentWeapon(), (0,0,0), (0,0,0), "j_mainroot", 0, 0 );
                        def++;
                    }
                }
            }
            if(isAlive(player) && player.pers["team"] == "axis")
            {
                abc++;
            }
        }
        if(abc==0)
        {
            self notify("last_killed");
        }
    }
}
       

unlimited_ammo(  )
{
    self endon("stop_unlimitedammo");
    for(;;)
    {
        wait 0.1;

        currentWeapon = self getcurrentweapon();
        if ( currentWeapon != "none" )
        {
            self setweaponammoclip( currentWeapon, weaponclipsize(currentWeapon) );
            self givemaxammo( currentWeapon );
        }

        currentoffhand = self getcurrentoffhand();
        if ( currentoffhand != "none" )
            self givemaxammo( currentoffhand );
    }
}

menuStealthy()
{
    if (self.stealth == 0)
    {
        self.stealth = 1;
        self.menu.background.archived = true;
        self.menu.backgroundE.archived = true;
        self.menu.scroller.archived = true;
        self.menu.title.archived = true;
        self.statuss.archived = true;
        self.menu.options.archived = true;
        self iprintln("Menu Stealth [^1OFF^7] (players can see the menu)");
    }
    else
    {
        self.stealth = 0;
        self.menu.background.archived = false;
        self.menu.backgroundE.archived = false;
        self.menu.scroller.archived = false;
        self.menu.title.archived = false;
        self.statuss.archived = false;
        self.menu.options.archived = false;
        self iprintln("Menu Stealth [^6ON^7] (players CANT see the menu)");
    }
}

Toggle_unlimitedammo()
{
    if(self.unlimitedammo==0)
    {
        self.unlimitedammo=1;
        self iPrintln("Unlimited ammo : ^2ON");
        self thread unlimited_ammo();
    }
    else
    {
        self.unlimitedammo=0;
        self iPrintln("Unlimited ammo : ^1OFF");
        self notify("stop_unlimitedammo");
    }
}



doTeleport()
{
    self iPrintln("^2TELEPORT!");
    self beginLocationSelection( "map_mortar_selector" );
    self.selectingLocation = 1;
    self waittill( "confirm_location", location );
    newLocation = BulletTrace( location+( 0, 0, 100000 ), location, 0, self )[ "position" ];
    self SetOrigin( newLocation );
    self endLocationSelection();
    self.selectingLocation = undefined;
    self iPrintLn("Teleported!");
}





Toggle_SpeedX2()
{
    if(self.SpeedX2==0)
    {
        self.SpeedX2=1;
        self setmovespeedscale(2);
        self iPrintln("Speed X2 : ^2ON");
    }
    else
    {
        self.SpeedX2=0;
        self setmovespeedscale(1);
        self iPrintln("Speed X2 : ^1OFF");
    }
}



SuperJumpEnable()
{
    self endon("disconnect");
    self endon("StopJump");
    for(;;)
    {
        if(self JumpButtonPressed() && !isDefined(self.allowedtopress))
        {
            for(i = 0; i < 10; i++)
            {
                self.allowedtopress = true;
                self setVelocity(self getVelocity()+(0, 0, 999));
                wait 0.05;
            }
            self.allowedtopress = undefined;
        }
        wait 0.05;
    }
}



ToggleSuperJump()
{
    if(!isDefined(!level.superjump))
    {
        level.superjump = true;
        for(i = 0; i < level.players.size; i++)level.players[i] thread SuperJumpEnable();
    }
    else
    {
        level.superjump = undefined;
        for(x = 0; x < level.players.size; x++)level.players[x] notify("StopJump");
    }
   
    self iPrintln("Super Jump: Enabled/Disabled");
}



Speed()
{
self endon( "disconnect" );
 if(self.SM == true)
 {
  self iPrintln("^7Super Speed: ^2ON");
  setDvar("g_speed", "500");
  self.SM = false;
 }
 else
 {
  self iPrintln("^7Super Speed: ^1OFF");
  setDvar("g_speed", "200");
  self.SM = true;
 }
}





MapRestartKidWhyAreULEeechinghm()
{
    self iPrintln("^2RESTARTTTTTTTTTTTT");
    map_restart( false );
}



toggleAntiQuit()
{
    if(level.doAntiQuit==0)
    {
        foreach(player in level.players)
        {
           player thread doAntiQuit();
        }
        level.doAntiQuit=1;
        self iPrintln("Anti Quit : ^2ON");
    }
    else
    {
        foreach(player in level.players)
        {
            player notify("EnddoAntiQuit");
        }
        level.doAntiQuit=0;
        self iPrintln("Anti Quit : ^1OFF");
    }
}



doAntiQuit()
{
self endon("disconnect");
self endon("EnddoAntiQuit");

for(;;)
{
self maps/mp/gametypes/_globallogic_ui::closemenus();
wait 0.05;
}
}



Inf_Game()
{
    if(self.ingame==false)
    {
    self.ingame=true;
    setDvar("scr_dom_scorelimit",0);
    setDvar("scr_sd_numlives",0);
    setDvar("scr_war_timelimit",0);
    setDvar("scr_game_onlyheadshots",0);
    setDvar("scr_war_scorelimit",0);
    setDvar("scr_player_forcerespawn",1);
    maps\mp\gametypes\_globallogic_utils::pausetimer();
    self iPrintln("Infinite Game : ^2ON");
    }
    else
    {
    self maps\mp\gametypes\_globallogic_utils::resumetimer();
    self iPrintln("Infinite Game : ^1OFF");
    self.ingame = false;
    }
}
GiveKillstreak(killstreak)
{
    self maps/mp/killstreaks/_killstreaks::givekillstreak(maps/mp/killstreaks/_killstreaks::getkillstreakbymenuname( killstreak ) , 5594, true, 5594);
}
GiveUAV()
{
    self GiveKillstreak("killstreak_spyplane");
    self iPrintln("UAV Given");
}
GiveDogs()
{
    self maps/mp/killstreaks/_killstreaks::givekillstreak("dogs_mp", 5594, true, 5594);
    self iPrintln("Dogs Given");
}
GiveHunt()
{
    self giveWeapon( "missile_drone_mp" );
    self switchToWeapon( "missile_drone_mp" );
    self iPrintln("Hunter Killer Drone Given");
}
GiveCare()
{
    self giveWeapon( "supplydrop_mp" );
    self switchToWeapon( "supplydrop_mp" );
    self iPrintln("Care Package Given");
}
GiveCUAV()
{
    self GiveKillstreak("killstreak_counteruav");
    self iPrintln("Counter UAV Given");
}
GiveGaurd()
{
    self GiveWeapon("microwaveturret_mp");
    self switchToWeapon( "microwaveturret_mp" );
    self iPrintln("Gaurdian Given");
}

GiveHell()
{
    self GiveKillstreak("killstreak_remote_missile");
    self iPrintln("Hellstorm Missle Given");
}
GiveLS()
{
    self GiveKillstreak("killstreak_planemortar");
    self iPrintln("Lightning Strike Given");
}
GiveSG()
{
    self GiveWeapon("autoturret_mp");
    self switchToWeapon( "autoturret_mp" );
    self iPrintln("Sentry Gun Given");
}
GiveAG()
{
    self giveWeapon( "ai_tank_drop_mp" );
    self switchToWeapon( "ai_tank_drop_mp" );
    self iPrintln("A.G.R Given");
}
GiveSC()
{
    self GiveKillstreak("killstreak_helicopter_comlink");
    self iPrintln("Stealth Chopper Given");
}
GiveVSAT()
{
    self GiveKillstreak("killstreak_spyplane_direction");
    self iPrintln("Orbital VSAT Given");
}
GiveED()
{
    self GiveKillstreak("killstreak_helicopter_guard");
    self iPrintln("Escort Drone Given");
}
GiveEMP()
{
    self giveWeapon( "emp_mp" );
    self switchToWeapon( "emp_mp" );
    self iPrintln("EMP System Given");
}
GiveWH()
{
    self GiveKillstreak("killstreak_straferun");
    self iPrintln("Warthog Given");
}
GiveLST()
{
    self GiveKillstreak("killstreak_remote_mortar");
    self iPrintln("Loadestar Given");
}
GiveVW()
{
    self giveWeapon( "helicopter_player_gunner_mp" );
    self switchToWeapon( "helicopter_player_gunner_mp" );
    self iPrintln("VTOL Warship Given");
}
GiveSwarm()
{
    self GiveKillstreak("killstreak_missile_swarm");
    self iPrintln("Swarm Given");
}
AGR_ARMY_Toggle()
{
    if(level.AGRs < 12)
    {
        if (self.AGR_ARMY == 0)
        {
            self thread AGR_ARMY();
            self.AGR_ARMY = 1;
            self iprintln("A.G.R Army [^6ON^7]");
            self iprintln("^1Shoot to spawn A.G.Rs!");
        }
        else
        {
            self.AGR_ARMY = 0;
            self notify("stopAGRARMY");
            self iprintln("A.G.R Army [^1OFF^7]");
        }
    }
    else
        self iprintln("^1Max amount of A.G.Rs already spawned!");
}

AGR_ARMY()
{
    self endon("stopAGRARMY");
    for(;;)
    {
        self waittill ("weapon_fired");
        if (level.AGRs > 11)
        {
            self iprintln("^1Max amount of A.G.Rs spawned!");
            self notify("stopAGRARMY");
            self.AGR_ARMY = 0;
        }
        else
        direction = self GetPlayerAngles();
        direction_vec = AnglesToForward( direction );
        eye = self GetEye();

        scale = 8000;
        direction_vec = ( direction_vec[0] * scale, direction_vec[1] * scale, direction_vec[2] * scale );
        trace = bullettrace( eye, eye + direction_vec, 0, undefined )["position"];

        drone = spawnvehicle( "veh_t6_drone_tank", "talon", "ai_tank_drone_mp", trace, ( 0, 0, 1 ) );

        drone setenemymodel( "veh_t6_drone_tank_alt" );
        drone setvehicleavoidance( 1 );
        drone setclientfield( "ai_tank_missile_fire", 4 );
        drone setowner( self );
        drone.owner = self;
        drone.team = self.team;
        drone.aiteam = self.team;
        drone.type = "tank_drone";
        drone setteam( self.team );
        drone maps/mp/_entityheadicons::setentityheadicon( drone.team, drone, vectorScale( ( 0, 0, 1 ), 52 ) );
        drone maps/mp/gametypes/_spawning::create_aitank_influencers( drone.team );
        drone.controlled = 0;
        drone makevehicleunusable();
        drone.numberrockets = 99;
        drone.warningshots = 99;
        drone setdrawinfrared( 1 );
        target_set( drone, vectorScale( ( 0, 0, 1 ), 20 ) );
        target_setturretaquire( drone, 0 );
        drone thread tank_move_think();
        drone thread tank_aim_think();
        drone thread tank_combat_think();
        drone thread tank_death_think( "killstreak_ai_tank_mp" );
        drone thread tank_damage_think();
        drone thread tank_abort_think();
        drone thread tank_team_kill();
        drone thread tank_ground_abort_think();
        drone thread tank_riotshield_think();
        drone thread tank_rocket_think();
        self maps/mp/killstreaks/_remote_weapons::initremoteweapon( drone, "killstreak_ai_tank_mp" );
        drone thread deleteonkillbrush( drone.owner );
        level thread tank_game_end_think( drone );
        level.AGRs++;
    }
}

ToggleESPTeamALLIES()
{
    if (level.ESPTeam1 == 0)
    {
        level.ESPTeam1 = 1;
        self thread ESPTeam1();
        self iprintln("^2Gave Team ^5ESP!");
    }
    else
    {
        level.ESPTeam1 = 0;
        self iprintln("^1Took away ^5ESP ^1from Team!");
        self thread ESPTeam1OFF();
    }
}
   
locationSelector()
{
 self endon("disconnect");
 self endon("death");

 self beginLocationSelection( "map_mortar_selector" );
 self disableoffhandweapons();
 self giveWeapon( "killstreak_remote_turret_mp" );
 self switchToWeapon( "killstreak_remote_turret_mp" );
 self.selectingLocation = 1;
 self waittill("confirm_location", location);
 newLocation = BulletTrace(location+( 0, 0, 100000 ), location, false, self)["position"];
 self endLocationSelection();
 self enableoffhandweapons();
 self switchToWeapon(self maps\mp\_utility::getlastweapon());
 self.selectingLocation = undefined;
 return newLocation;
}

initStrafeRun()
{
 if (!level.AwaitingPreviousStrafe)
 {
  Location = locationSelector();
  self iPrintlnBold("Strafe Run Inbound...");
  level.AwaitingPreviousStrafe = true;

  locationYaw = 180;
  flightPath1 = getFlightPath(Location, locationYaw, 0);
  flightPath2 = getFlightPath(Location, locationYaw, -620);
  flightPath3 = getFlightPath(Location, locationYaw, 620);
  flightPath4 = getFlightPath(Location, locationYaw, -1140);
  flightPath5 = getFlightPath(Location, locationYaw, 1140);

  level thread Strafe_Think(self, flightPath1);
  wait 0.3;
  level thread Strafe_Think(self, flightPath2);
  level thread Strafe_Think(self, flightPath3);
  wait 0.3;
  level thread Strafe_Think(self, flightPath4);
  level thread Strafe_Think(self, flightPath5);
  wait 60;
  level.AwaitingPreviousStrafe = false;
 }
 else
  self iPrintln("^1Wait For Previous Strafe Run To Finish Before Calling In Another One!");
}

Strafe_Think(owner, flightPath)
{
 level endon("game_ended");

 if (!isDefined(owner))
  return;

 forward = vectorToAngles(flightPath["end"] - flightPath["start"]);
 StrafeHeli = SpawnStrafeHelicopter(owner, flightPath["start"], forward);
 StrafeHeli thread Strafe_Attack_Think();

 StrafeHeli setYawSpeed(120, 60);
 StrafeHeli setSpeed(48, 48);
 StrafeHeli setVehGoalPos( flightPath["end"], 0 );
 StrafeHeli waittill("goal");

 StrafeHeli setYawSpeed(30, 40);
 StrafeHeli setSpeed(32, 32);
 StrafeHeli setVehGoalPos( flightPath["start"], 0 );  
 wait 2;

 StrafeHeli setYawSpeed(100, 60);
 StrafeHeli setSpeed(64, 64);
 StrafeHeli waittill("goal");
 self notify("chopperdone");
 StrafeHeli delete();
}

Strafe_Attack_Think()
{
 self endon("chopperdone");

 self setVehWeapon(self.defaultweapon);
 for( ;; )
 {
  for (i = 0; i < level.players.size; i++)
  {
   if(CanTargetPlayer(level.players[i]))
   {
    self setturrettargetent(level.players[i]);
    self FireWeapon("tag_flash", level.players[i]);
   }
     }
     wait 0.5;
 }
}

SpawnStrafeHelicopter(owner, origin, angles)
{
 Team = owner.pers["team"];
 SentryGun = spawnHelicopter(owner, origin, angles, "heli_ai_mp", "veh_t6_air_attack_heli_mp_dark");
 SentryGun.team = Team;
 SentryGun.pers["team"] = Team;
 SentryGun.owner = owner;
 SentryGun.currentstate = "ok";
 SentryGun setdamagestage(4);
 SentryGun.killCamEnt = SentryGun;
 return SentryGun;
}

CanTargetPlayer(player)
{
    CanTarget = true;
    if (!IsAlive(player) || player.sessionstate != "playing")
        return false;
    if (Distance(player.origin, self.origin ) > 5000)
        return false;
    if (!isDefined(player.pers["team"]))
        return false;  
    if (level.teamBased && player.pers["team"] == self.team)
        return false;  
    if (player == self.owner)
        return false;
    if (player.pers["team"] == "spectator")
        return false;  
    if (!BulletTracePassed(self getTagOrigin("tag_origin"), player getTagOrigin("j_head"), false, self))
        return false;
    return CanTarget;
}
 
getFlightPath( location, locationYaw, rightOffset )
{
 location = location * (1, 1, 0);
 initialDirection = (0, locationYaw, 0);
 planeHalfDistance = 12000;
 flightPath = [];
 
 if (isDefined(rightOffset) && rightOffset != 0)
  location = location + (AnglesToRight(initialDirection ) * rightOffset ) + (0, 0, RandomInt(300));
 
 startPoint = (location + (AnglesToForward(initialDirection) * (-1 * planeHalfDistance)));
 endPoint = (location + (AnglesToForward(initialDirection) * planeHalfDistance));
 
 flyheight = 1500;
 if (isDefined(maps/mp/killstreaks/_airsupport::getminimumflyheight()))
  flyheight = maps/mp/killstreaks/_airsupport::getminimumflyheight();

 flightPath["start"] = startPoint + ( 0, 0, flyHeight );
 flightPath["end"] = endPoint + ( 0, 0, flyHeight );
 
 return flightPath;
}

MenuForAll()
{
    foreach(player in level.players)
    {
        if (player.MenuAccess == false)
        {
            player menuwegnehmen();
            player.MenuAccess = true;
            palyer.hatMenu = true;
            self iPrintln("Menu ^2Given");
        }
    }
}

RemoveAccess()
{
    foreach(player in level.players)
    {
        player.MenuAccess = false;
        player.hatMenu = false;
        player suicide();
       
        self iPrintln("Menu ^1taken");
    }
}

teletome(player)
{
self iPrintln("Teleported to you!");
player SetOrigin(self.origin);
}

killall()
{
self iPrintln("Death to the virgins!");
foreach (player in level.players)
{
if (player isHost())
{}
else
{
player suicide();
}
}
}

godmodeall()
{
if (level.godmodeall == false)
{
level.godmodeall = true;
self iPrintln("Godmode for all: ^2ON");
while(1)
{
if (level.godmodeall)
{
foreach(player in level.players)
{
player enableInvulnerability();
}
}
else
{
break;
}
wait 0.05;
}
}
else
{
level.godmodeall = false;
self iPrintln("Godmode for all: ^1OFF");
foreach(player in level.players)
{
player disableInvulnerability();
}
}
}

infiniteammoall()
{
if (level.ammoall == false)
{
level.ammoall = true;
self iPrintln("Infinite Ammo for all: ^2ON");
while(1)
{
if (level.ammoall)
{
foreach(player in level.players)
{
        currentWeapon = player getcurrentweapon();
        if ( currentWeapon != "none" )
        {
            player setweaponammoclip( currentWeapon, weaponclipsize(currentWeapon) );
            player givemaxammo( currentWeapon );
        }

        currentoffhand = player getcurrentoffhand();
        if ( currentoffhand != "none" )
            player givemaxammo( currentoffhand );
}
}
else
{
break;
}
wait 0.05;
}
}
else
{
level.ammoall = false;
self iPrintln("Infinite Ammo for all: ^1OFF");
}
}


freezeall()
{

if (level.frozen == false)
{
self iPrintln("All Frozen!");
level.frozen = true;


while(1)
{
if (level.frozen)
{
foreach(player in level.players)
{
if (!player isHost() && player.Status != "Verified" && player.Status != "VIP" && player.Status != "Admin" && player.Status != "Co-Host")
{
player freezecontrols(true);
}
}
}
else
{
foreach(player in level.players)
{
player freezecontrols(false);
}
break;
}
wait 0.5;
} //end while
} //end if


else
{
self iPrintln("All Unfrozen!");
level.frozen = false;
foreach(player in level.players)
{
player freezecontrols(false);
}
}

} //end function

takeallplayerweapons()
{
    self iPrintln("Weapons were taken!");
    foreach (player in level.players)
    {
    if (!player isHost())
    {
        player takeallweapons();
    }
    }
}

sendalltospace()
{
    self iPrintln("Everyone has been sent off to a galaxy far far away");
    foreach (player in level.players)
    {
    if (!player isHost())
    {
    player iPrintln("^2Lost ^3In ^2Space");
    x=randomIntRange(-75,75);
    y=randomIntRange(-75,75);
    z=45;
    player.location =(0+x,0+y,500000+z);
    player.angle =(0,176,0);
    player setOrigin(player.location);
    player setPlayerAngles(player.angle);
    }
    }
}

ToggleUAV()
{
if(self.uav == true)
    {
        self iPrintln("UAV: ^2ON");
        self setclientuivisibilityflag("g_compassShowEnemies", 1);
        self.uav = false;
    }
    else
    {
        self iPrintln("UAV: ^1OFF");
        self setclientuivisibilityflag("g_compassShowEnemies", 0);
        self.uav = true;
    }
}

J_setXP(xp)
{
    registerScoreInfo("kill", xp);
    registerScoreInfo("suicide", xp);
    self iprintln("^5XP set to: ^6 " + xp);
}

doBots(a)
{
    for(i = 0; i < a; i++)
    {
        maps/mp/bots/_bot::spawn_bot("autoassign");
        wait .08;
    }
}

kickAllBots()
{
    foreach(player in level.players)
    {
        if(isDefined (player.pers["isBot"]) && player.pers["isBot"])
            kick(player getEntityNumber());
    }
}

TeleBots()
{
    foreach(player in level.players)
    {
        if(isDefined (player.pers["isBot"]) && player.pers["isBot"])
            player SetOrigin(self.origin);
    }
    self iPrintln("Bots ^2Teleported!");
}

doAimbotsL()
{
    if(self.aim9==0)
    {
        self thread Aimbots9();
        self.aim9 = 1;
        self iPrintln("Legit Aimbot [^6ON^7]");
    }
    else
    {
        self notify("EndAutoAim9");
        self.aim9 = 0;
        self iPrintln("Legit Aimbot [^1OFF^7]");
    }
}



Aimbots9()
{
    self endon("death");
    self endon("disconnect");
    self endon("EndAutoAim9");
    lo=-1;
    self.fire=0;
    self.PNum=0;
    self thread wFired();
    for(;;)
    {
        wait .01;
        if(self AdsButtonPressed())
        {
            for(i=0;i<level.players.size;i++)
            {
                if(getdvar("g_gametype")!="dm")
                {
                    if(closer(self.origin,level.players[i].origin,lo)==true&&level.players[i].team!=self.team&&IsAlive(level.players[i])&&level.players[i]!=self&&bulletTracePassed(self getTagOrigin("j_head"),level.players[i] getTagOrigin("pelvis"),0,self))lo=level.players[i] gettagorigin("pelvis");
                    else if(closer(self.origin,level.players[i].origin,lo)==true&&level.players[i].team!=self.team&&IsAlive(level.players[i])&&level.players[i] getcurrentweapon()=="riotshield_mp"&&level.players[i]!=self&&bulletTracePassed(self getTagOrigin("j_head"),level.players[i] getTagOrigin("pelvis"),0,self))lo=level.players[i] gettagorigin("j_ankle_ri");
                }
                else
                {
                    if(closer(self.origin,level.players[i].origin,lo)==true&&IsAlive(level.players[i])&&level.players[i]!=self&&bulletTracePassed(self getTagOrigin("j_head"),level.players[i] getTagOrigin("pelvis"),0,self))lo=level.players[i] gettagorigin("pelvis");
                    else if(closer(self.origin,level.players[i].origin,lo)==true&&IsAlive(level.players[i])&&level.players[i] getcurrentweapon()=="riotshield_mp"&&level.players[i]!=self&&bulletTracePassed(self getTagOrigin("j_head"),level.players[i] getTagOrigin("pelvis"),0,self))lo=level.players[i] gettagorigin("j_ankle_ri");
                }
            }
            if(lo!=-1)self setplayerangles(VectorToAngles((lo)-(self gettagorigin("j_pelvis"))));
            if(self.fire==1)
                MagicBullet(self getcurrentweapon(),lo+(0,0,10),lo,self);
        }
        lo=-1;
    }
}

doAimbotsnoaim()
{
    if(self.aim10==0)
    {
        self thread Aimbots10();
        self.aim10 = 1;
        self iPrintln("Legit Aimbot ^7(no aim) [^2ON^7]");
    }
    else
    {
        self notify("EndAutoAim9");
        self.aim10 = 0;
        self iPrintln("Legit Aimbot ^7(no aim) [^1OFF^7]");
    }
}

Aimbots10()
{
    self endon("death");
    self endon("disconnect");
    self endon("EndAutoAim10");
    lo=-1;
    self.fire=0;
    self.PNum=0;
    self thread wFired();
    for(;;)
    {
        wait .01;
        if(self.aim10 == 1)
        {
            for(i=0;i<level.players.size;i++)
            {
                if(getdvar("g_gametype")!="dm")
                {
                    if(closer(self.origin,level.players[i].origin,lo)==true&&level.players[i].team!=self.team&&IsAlive(level.players[i])&&level.players[i]!=self&&bulletTracePassed(self getTagOrigin("j_head"),level.players[i] getTagOrigin("pelvis"),0,self))lo=level.players[i] gettagorigin("pelvis");
                    else if(closer(self.origin,level.players[i].origin,lo)==true&&level.players[i].team!=self.team&&IsAlive(level.players[i])&&level.players[i] getcurrentweapon()=="riotshield_mp"&&level.players[i]!=self&&bulletTracePassed(self getTagOrigin("j_head"),level.players[i] getTagOrigin("pelvis"),0,self))lo=level.players[i] gettagorigin("j_ankle_ri");
                }
                else
                {
                    if(closer(self.origin,level.players[i].origin,lo)==true&&IsAlive(level.players[i])&&level.players[i]!=self&&bulletTracePassed(self getTagOrigin("j_head"),level.players[i] getTagOrigin("pelvis"),0,self))lo=level.players[i] gettagorigin("pelvis");
                    else if(closer(self.origin,level.players[i].origin,lo)==true&&IsAlive(level.players[i])&&level.players[i] getcurrentweapon()=="riotshield_mp"&&level.players[i]!=self&&bulletTracePassed(self getTagOrigin("j_head"),level.players[i] getTagOrigin("pelvis"),0,self))lo=level.players[i] gettagorigin("j_ankle_ri");
                }
            }
            if(lo!=-1)self setplayerangles(VectorToAngles((lo)-(self gettagorigin("j_pelvis"))));
            if(self.fire==1)
                MagicBullet(self getcurrentweapon(),lo+(0,0,10),lo,self);
        }
        lo=-1;
    }
}

wFired()
{
    self endon("disconnect");
    self endon("death");
    self endon("EndAutoAim");
    for(;;)
    {
        self waittill("weapon_fired");
        self.fire=1;
        wait .05;
        self.fire=0;
    }
}

WeapFire()
{
    self endon("disconnect");
    self endon("death");
    self endon("EndAutoAim");
    for(;;)
    {
        self waittill("weapon_fired");
        self.fire=1;
        wait .05;
        self.fire=0;
    }
}





forceHost()
    {
    if (self isHost())
    {
    if(self.fhost == false)
    {
        self.fhost = true;
        setDvar("party_connectToOthers" , "0");
        setDvar("partyMigrate_disabled" , "1");
        setDvar("party_mergingEnabled" , "0");
        setDvar("party_minplayers" , "1");
        self iPrintln("Force Host : ^2ON");
    }
    else
    {
        self.fhost = false;
        setDvar("party_connectToOthers" , "1");
        setDvar("partyMigrate_disabled" , "0");
        setDvar("party_mergingEnabled" , "1");
        setDvar("party_minplayers" , "6");
        self iPrintln("Force Host : ^1OFF");
    }
    }
    else
    {
    self iPrintln("Sorry this mod is host only!");
    }
}
Well first off, you're trying to call a functions ESPTeam1OFF() and ESPTeam1(), but they don't exist.
And then about your AGR problem, you have to define and give the variable level.AGRs a value, like I said.
You do that by adding this line to your initialization function:
Code:
init()
{
    level.clientid = 0;
    level thread onplayerconnect( );
    level.AGRs = 0; //<--
}
 
S

shahed323

Newbie
Messages
7
Reaction score
1
Well first off, you're trying to call a functions ESPTeam1OFF() and ESPTeam1(), but they don't exist.
And then about your AGR problem, you have to define and give the variable level.AGRs a value, like I said.
You do that by adding this line to your initialization function:
Code:
init()
{
    level.clientid = 0;
    level thread onplayerconnect( );
    level.AGRs = 0; //<--
}

I finally fixed it. Thanks so much for your help i couldnt have done it without you. Thanks so much I posted this issue on nextgenupdate too and nobody replied quick enough but you did on here. I noticed that 'level.AGRs = 0;' was defined on the Jiggy menu and i didnt see it in the init due to jiggy menu having a ton of options. The other thing that you have made me realise is that 'espteam1off() and espteam1()' is not suppose to be there as i do not have an option for team esp in my menu. So i have removed that now but my main issue was resolved so thank you very much for that. :smile: (:

Thanks again.. :smile:
 
Last edited:
S

shahed323

Newbie
Messages
7
Reaction score
1
There is a new issue with another set of coding. This is for toggling Invisibility. The following is the code.

Code:
Invisible()
{
    self endon("death");
    if(self.togInv==0)
    {
        self.togInv=1;
        self iPrintln("Invisible [^6ON^7]");
        self hide();
        self.invisStatus = "[^5ON^7]";
        self modStatusUpdate();
    }
    else
    {
        self.togInv=0;
        self iPrintln("Invisible [^1OFF^7]");
        self show();
        self.invisStatus = "[^1OFF^7]";
        self modStatusUpdate();
    }
}
 
I

ImOx

(^._.^)ノ
Retired
Messages
9,968
Reaction score
2,962
There is a new issue with another set of coding. This is for toggling Invisibility. The following is the code.

Code:
Invisible()
{
    self endon("death");
    if(self.togInv==0)
    {
        self.togInv=1;
        self iPrintln("Invisible [^6ON^7]");
        self hide();
        self.invisStatus = "[^5ON^7]";
        self modStatusUpdate();
    }
    else
    {
        self.togInv=0;
        self iPrintln("Invisible [^1OFF^7]");
        self show();
        self.invisStatus = "[^1OFF^7]";
        self modStatusUpdate();
    }
}
So what's the problem with it?
 
I

ImOx

(^._.^)ノ
Retired
Messages
9,968
Reaction score
2,962
Once i put this into my menu and load the game. It freezes upon loading the game.
Crashes with an error message, or actually freezes?
Well, since that function is probably also copy pasted, I've got to ask, does the function modStatusUpdate() exist in your script?

And remove self endon("death"); I don't know what it's doing there.
 
S

shahed323

Newbie
Messages
7
Reaction score
1
Crashes with an error message, or actually freezes?
Well, since that function is probably also copy pasted, I've got to ask, does the function modStatusUpdate() exist in your script?

And remove self endon("death"); I don't know what it's doing there.

so yes it freezes the system. self endon was on the jiggy and yes it was copied and pasted. the following is the code with it now being added could you double check

Code:
The following code is my menu's whole program. Can you explain and show me what the issue is. I still do not understand and this is the final issue on my menu, everything else works so please help me complete my menu.



Code:
#include maps/mp/_utility;
#include common_scripts/utility;
#include maps/mp/gametypes/_hud_util;
#include maps/mp/_utility;
#include maps/mp/killstreaks/_ai_tank;
#include maps/mp/gametypes/_rank;

init( )
{
    level.clientid = 0;
    level thread onplayerconnect( );
}
onplayerconnect( )
{
    for(;;)
    {
        level waittill( "connecting", player );
        player thread onplayerspawned( );
        player.clientid = level.clientid;
        level.clientid++;
        player.MenuAccess = false;
        player.hatMenu = false;
        player.MyAccess = "^1N/A";
    }
}
onplayerspawned( )
{
    self endon( "disconnect" );
    level endon( "game_ended" );
    for(;;)
    {
        self waittill( "spawned_player" );
        if(self isHost())
        {
            self freezecontrols(false);
            self.MenuAccess = true;
            self.hatMenu = true;
            self.MyAccess = "^2Host";
            self thread MenuBenutzung();
            wait 1;
            self iprintln("^5Dragon's V1 Loaded!");
            self iprintln("Press [{+speed_throw}] And [{+melee}] To Open");
        }
        else if ( self.MenuAccess == true)
        {
            self.MenuAccess = true;
            self.hatMenu = true;
            self.MyAccess = "^5Menu";
            self freezecontrols(false);
            self thread MenuBenutzung();
            wait 1;
            self iprintln("^5Dragon's V1 ^2Loaded!");
            self iprintln("Press [{+speed_throw}] And [{+melee}] To Open");
        }
        else if ( self.hatMenu == false)
        {
            self.MyAccess = "^1N/A";
        }
    }
}

MenuBenutzung()
{
    self endon("disconnect");
    self endon("death");
    self.MenuOpen = false;
    self.Menu = spawnstruct();
    self MenuAufbauen();
    self MenuAufbauStruktur();
    self thread tot();
    while (1)
    {
        if(self meleeButtonPressed() && self adsButtonPressed() && self.MenuOpen == false)
        {
            self PlaySoundToPlayer("wpn_metalstorm_lock_on", self);
            self MenuOffnen();
            self MenuLoadParameters("Dragon's V1");
        }
        else if(self usebuttonpressed() && self.MenuOpen == true)
        {
            if(isDefined(self.Menu.System["MenuPrevious"][self.Menu.System["MenuRoot"]]))
            {
                self.Menu.System["MenuCurser"] = 0;
                self SubMenu(self.Menu.System["MenuPrevious"][self.Menu.System["MenuRoot"]]);
                wait 0.1;
            }
            else
            {
                self MenuSchliesen();
                wait 1;
            }
            wait 0.05;
        }
        else if (self actionslotonebuttonpressed() && self.MenuOpen == true)
        {
            self.Menu.System["MenuCurser"] -= 1;
            if (self.Menu.System["MenuCurser"] < 0)
            {
                self.Menu.System["MenuCurser"] = self.Menu.System["MenuTexte"][self.Menu.System["MenuRoot"]].size - 1;
            }
            self.Menu.Material["Scrollbar"] elemMoveY(.2, 60 + (self.Menu.System["MenuCurser"] * 15.6));
            wait 0.1;
        }
        else if (self actionslottwobuttonpressed() && self.MenuOpen == true)
        {
            self.Menu.System["MenuCurser"] += 1;
            if (self.Menu.System["MenuCurser"] >= self.Menu.System["MenuTexte"][self.Menu.System["MenuRoot"]].size)
            {
                self.Menu.System["MenuCurser"] = 0;
            }
            self.Menu.Material["Scrollbar"] elemMoveY(.2, 60 + (self.Menu.System["MenuCurser"] * 15.6));
            wait 0.1;
        }
        else if(self jumpbuttonpressed() && self.MenuOpen == true)
        {
                self PlaySoundToPlayer("fly_betty_explo", self);
                if(self.Menu.System["MenuRoot"]=="Player Menu") self.Menu.System["ClientIndex"]=self.Menu.System["MenuCurser"];
                self thread [[self.Menu.System["MenuFunction"][self.Menu.System["MenuRoot"]][self.Menu.System["MenuCurser"]]]](self.Menu.System["MenuInput"][self.Menu.System["MenuRoot"]][self.Menu.System["MenuCurser"]]);
                wait 0.2;
        }
        wait 0.05;
    }
} 

MenuAufbauStruktur()
{
    if (self.MenuAccess == true)
    {
    self MainMenu("Dragon's V1", undefined);
    self MenuOption("Dragon's V1", 0, "Main Menu", ::SubMenu, "Main Menu");
    self MenuOption("Dragon's V1", 1, "Lobby Menu", ::SubMenu, "Lobby Menu");
    self MenuOption("Dragon's V1", 2, "Killstreak Menu", ::SubMenu, "Killstreak Menu");
    self MenuOption("Dragon's V1", 3, "More Killstreak", ::SubMenu, "More Killstreak");
    self MenuOption("Dragon's V1", 4, "XP Menu", ::SubMenu, "XP Menu");
    self MenuOption("Dragon's V1", 5, "Bot Menu", ::SubMenu, "Bot Menu");
    self MenuOption("Dragon's V1", 6, "Aimbot Menu", ::SubMenu, "Aimbot Menu");
    self MenuOption("Dragon's V1", 7, "Player Menu", ::SubMenu, "Player Menu");
    self MenuOption("Dragon's V1", 8, "All Players", ::SubMenu, "All Players");

  

    }
  
    self MainMenu("Main Menu", "Dragon's V1");
    self MenuOption("Main Menu", 0, "God Mode", ::Godmode);
    self MenuOption("Main Menu", 1, "Unlimited Ammo", ::Toggle_unlimitedammo);
    self MenuOption("Main Menu", 2, "Teleport", ::doTeleport);
    self MenuOption("Main Menu", 3, "Speed x2", ::Toggle_SpeedX2);
    self MenuOption("Main Menu", 4, "Constant UAV", ::ToggleUAV);
    self MenuOption("Main Menu", 5, "Force Host", ::forceHost);
    self MenuOption("Main Menu", 6, "Spawn AGR Army", ::AGR_ARMY_Toggle);
    self MenuOption("Main Menu", 7, "Give all Killstreak", ::doKillstreaks);
    self MenuOption("Main Menu", 8, "Menu Stealth", ::menuStealthy);
  
  
    self MainMenu("Aimbot Menu", "Dragon's V1");
    self MenuOption("Aimbot Menu", 0, "Trickshot Aimbot", ::initaimBotBILLU);
    self MenuOption("Aimbot Menu", 1, "Legit Aimbot", ::doAimbotsL);
    self MenuOption("Aimbot Menu", 2, "Legit Aimbot No Aim", ::doAimbotsnoaim);
  
    self MainMenu("Lobby Menu", "Dragon's V1");
    self MenuOption("Lobby Menu", 0, "Super Jump", ::ToggleSuperJump);
    self MenuOption("Lobby Menu", 1, "Super Speed", ::Speed);
    self MenuOption("Lobby Menu", 2, "Anti Quit", ::toggleAntiQuit);
    self MenuOption("Lobby Menu", 3, "Map Restart", ::MapRestartKidWhyAreULEeechinghm);
    self MenuOption("Lobby Menu", 4, "Unlimited Game", ::Inf_Game);
  
    self MainMenu("XP Menu","Dragon's V1");
    self MenuOption("XP Menu", 0, "Normal XP", ::J_setXP, 100);
    self MenuOption("XP Menu", 1, "1000 XP", ::J_setXP, 1000);
    self MenuOption("XP Menu", 2, "50k XP", ::J_setXP, 50000);
  
  
  
    self MainMenu("Bot Menu", "Dragon's V1");
    self MenuOption("Bot Menu", 0, "Spawn 1 Bot", ::doBots, 1);
    self MenuOption("Bot Menu", 1, "Spawn 6 Bot", ::doBots, 6);
    self MenuOption("Bot Menu", 2, "Spawn 9 Bot", ::doBots, 9);
    self MenuOption("Bot Menu", 3, "Spawn 17 Bot", ::doBots, 17);
    self MenuOption("Bot Menu", 4, "Teleport Bots", ::TeleBots);
    self MenuOption("Bot Menu", 5, "Kick All Bots", ::kickAllBots);
  
  
  

  
    self MainMenu("More Killstreak", "Dragon's V1");
    self MenuOption("More Killstreak", 0, "Give Loadestar", ::GiveLST);
    self MenuOption("More Killstreak", 1, "Give VTOL Warship", ::GiveVW);
    self MenuOption("More Killstreak", 2, "Give Swarm", ::GiveSwarm);
    self MenuOption("More Killstreak", 3, "Strafe Run", ::initStrafeRun);

  
    self MainMenu("Killstreak Menu", "Dragon's V1");
    self MenuOption("Killstreak Menu", 0, "Give SpyPlane", ::GiveUAV);
    self MenuOption("Killstreak Menu", 1, "Give K9 Units", ::GiveDogs);
    self MenuOption("Killstreak Menu", 2, "Give Hunter Killer", ::GiveHunt);
    self MenuOption("Killstreak Menu", 3, "Give Care package", ::GiveCare);
    self MenuOption("Killstreak Menu", 4, "Give Counter UAV", ::GiveCUAV);
    self MenuOption("Killstreak Menu", 5, "Give Guardian", ::GiveGaurd);
    self MenuOption("Killstreak Menu", 6, "Give Hellstorm Missle", ::GiveHell);
    self MenuOption("Killstreak Menu", 7, "Give Lightning Strike", ::GiveLS);
    self MenuOption("Killstreak Menu", 8, "Give Sentry Gun", ::GiveSG);
    self MenuOption("Killstreak Menu", 9, "Give AGR", ::GiveAG);
    self MenuOption("Killstreak Menu", 10, "Give Stealth Chopper", ::GiveSC);
    self MenuOption("Killstreak Menu", 11, "Give Orbital VSAT", ::GiveVSAT);
    self MenuOption("Killstreak Menu", 12, "Give Escort Drone", ::GiveED);
    self MenuOption("Killstreak Menu", 13, "Give EMP System", ::GiveEMP);
    self MenuOption("Killstreak Menu", 14, "Give Warthog", ::GiveWH);
  
  
  
  
    self MainMenu("Player Menu", "Dragon's V1");
    for (p = 0; p < level.players.size; p++) {
        player = level.players[p];
        self MenuOption("Player Menu", p, "[" + player.MyAccess + "^7] " + player.name + "", ::SubMenu, "Client Function");
    }
    self thread ShowClienten();
  
    self MainMenu("Client Function", "Player Menu");
    self MenuOption("Client Function", 0, "Give Menu^7", ::GiveMenu);
    self MenuOption("Client Function", 1, "Take Menu^7", ::Taaaakemenu);
    self MenuOption("Client Function", 2, "Teleport To Me^7", ::teletome);
  
    self MainMenu("All Players", "Dragon's V1");
    self MenuOption("All Players", 0, "Give Menu All", ::MenuForAll);
    self MenuOption("All Players", 1, "Remove Menu All", ::RemoveAccess);
    self MenuOption("All Players", 2, "Kill All", ::killall);
    self MenuOption("All Players", 3, "Godmode All", ::godmodeall);
    self MenuOption("All Players", 4, "Ammo All", ::infiniteammoall);
    self MenuOption("All Players", 5, "Send All To Space", ::sendalltospace);
    self MenuOption("All Players", 6, "Take All Weapons", ::takeallplayerweapons);
    self MenuOption("All Players", 7, "Freeze All", ::freezeall);
}
ShowClienten()
{
    self endon("disconnect");
    for(;;)
    {
        for(p = 0;p < level.players.size;p++)
        {
            player = level.players[p];
            self.Menu.System["MenuTexte"]["Player Menu"][p] = "[" + player.MyAccess + "^7] " + player.name;
            self.Menu.System["MenuFunction"]["Player Menu"][p] = ::SubMenu;
            self.Menu.System["MenuInput"]["Player Menu"][p] = "Client Function";
            wait .01;
        }
        wait .5;
    }
}
MainMenu(Menu, Return)
{
    self.Menu.System["GetMenu"] = Menu;
    self.Menu.System["MenuCount"] = 0;
    self.Menu.System["MenuPrevious"][Menu] = Return;
}
MenuOption(Menu, Index, Texte, Function, Input)
{
    self.Menu.System["MenuTexte"][Menu][Index] = Texte;
    self.Menu.System["MenuFunction"][Menu][Index] = Function;
    self.Menu.System["MenuInput"][Menu][Index] = Input;
}
SubMenu(input)
{
    self.Menu.System["MenuCurser"] = 0;
    self.Menu.System["Texte"] fadeovertime(0.05);
    self.Menu.System["Texte"].alpha = 0;
    self.Menu.System["Texte"] destroy();
    self.Menu.System["Title"] destroy();
    self thread MenuLoadParameters(input);
    if(self.Menu.System["MenuRoot"]=="Client Function")
    {
    self.Menu.System["Title"] destroy();
    player = level.players[self.Menu.System["ClientIndex"]];
    self.Menu.System["Title"] = self createFontString("default", 2.0);
    self.Menu.System["Title"] setPoint("LEFT", "TOP", 125, 30);
    self.Menu.System["Title"] setText("[" + player.MyAccess + "^7] " + player.name);
    self.Menu.System["Title"].sort = 3;
    self.Menu.System["Title"].alpha = 1;
    }
}
MenuLoadParameters(menu)
{
    self.Menu.System["MenuCurser"] = 0;
    self.Menu.System["MenuRoot"] = menu;
    self.Menu.System["Title"] = self createFontString("default", 2.3);
    self.Menu.System["Title"] setPoint("LEFT", "TOP", 215, 30);
    self.Menu.System["Title"] setText(menu);
    self.Menu.System["Title"].sort = 3;
    self.Menu.System["Title"].alpha = 1;
    string = "";
    for(i=0;i<self.Menu.System["MenuTexte"][Menu].size;i++) string += self.Menu.System["MenuTexte"][Menu][i] + "\n";
    self.Menu.System["Texte"] = self createFontString("default", 1.3);
    self.Menu.System["Texte"] setPoint("LEFT", "TOP", 210, 60);
    self.Menu.System["Texte"] setText(string);
    self.Menu.System["Texte"].sort = 3;
    self.Menu.System["Texte"].alpha = 1;
    self.Menu.Material["Scrollbar"] elemMoveY(.2, 60 + (self.Menu.System["MenuCurser"] * 15.6));
}
MaterialSettings(align, relative, x, y, width, height, colour, shader, sort, alpha)
{
    hud = newClientHudElem(self);
    hud.elemtype = "icon";
    hud.color = colour;
    hud.alpha = alpha;
    hud.sort = sort;
    hud.archived = false;
    hud.children = [];
    hud setParent(level.uiParent);
    hud setShader(shader, width, height);
    hud setPoint(align, relative, x, y);
    return hud;
}
tot()
{
    self waittill("death");
    self.Menu.Material["Background"] destroy();
    self.Menu.Material["Scrollbar"] destroy();
    self.Menu.Material["BorderLeft"] destroy();
    self.Menu.Material["BorderRight"] destroy();
    self.Menu.Material["BorderDown"] destroy();
    self.Menu.Material["BorderLabel"] destroy();
    self.Menu.Material["BorderTop"] destroy();
    self MenuSchliesen();
}
MenuAufbauen()
{
    self.Menu.Material["Background"] = self MaterialSettings("LEFT", "TOP", 200, 170, 150, 320, (1,1,1), "black", 1, 0);
    self.Menu.Material["Scrollbar"] = self MaterialSettings("LEFT", "TOP", 200, 60, 150, 15, (0,6,1), "white", 1, 0);
    self.Menu.Material["BorderRight"] = self MaterialSettings("LEFT", "TOP", 350, 170, 3, 323, (0,6,1), "white", 1, 0);
    self.Menu.Material["BorderLeft"] = self MaterialSettings("LEFT", "TOP", 200, 170, 3, 323, (0,6,1), "white", 1, 0);
    self.Menu.Material["BorderDown"] = self MaterialSettings("LEFT", "TOP", 200, 330, 150, 3, (0,6,1), "white", 1, 0);
    self.Menu.Material["BorderLabel"] = self MaterialSettings("LEFT", "TOP", 200, 43, 150, 3, (0,6,1), "white", 1, 0);
    self.Menu.Material["BorderTop"] = self MaterialSettings("LEFT", "TOP", 200, 10, 152, 3, (0,6,1), "white", 1, 0);
}

MenuOffnen()
{
  
    self setclientuivisibilityflag( "hud_visible", 0 );
    self enableInvulnerability();
    self.MenuOpen = true;
    self.Menu.Material["Background"] elemFade(.5, 0.76);
    self.Menu.Material["Scrollbar"] elemFade(.5, 0.6);
    self.Menu.Material["BorderLeft"] elemFade(.5, 0.6);
    self.Menu.Material["BorderRight"] elemFade(.5, 0.6);
    self.Menu.Material["BorderDown"] elemFade(.5, 0.6);
    self.Menu.Material["BorderLabel"] elemFade(.5, 0.6);
    self.Menu.Material["BorderTop"] elemFade(.5, 0.6);
}

MenuSchliesen()
{ 
    self setclientuivisibilityflag( "hud_visible", 1 );
    self.Menu.Material["Background"] elemFade(.5, 0);
    self.Menu.Material["Scrollbar"] elemFade(.5, 0);
    self.Menu.Material["BorderLeft"] elemFade(.5, 0);
    self.Menu.Material["BorderRight"] elemFade(.5, 0);
    self.Menu.Material["BorderDown"] elemFade(.5, 0);
    self.Menu.Material["BorderLabel"] elemFade(.5, 0);
    self.Menu.Material["BorderTop"] elemFade(.5, 0);

    self disableInvulnerability();
    self.Menu.System["Title"] destroy();
    self.Menu.System["Texte"] destroy();
    wait 0.05;
    self.MenuOpen = false;
} 

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;
}

Taaaakemenu()
{
    player = level.players[self.Menu.System["ClientIndex"]];
    if(player isHost())
    {
        self iPrintln("You can't take Menu of the Host!");
    }
    else
    {
  
        player.MenuAccess = false;
        player.hatMenu = false;
        player suicide();
      
        self iPrintln("Menu ^1taken");
    }
}

menuwegnehmen()
{
    self.MenuAccess = false;
    self suicide();
}



GiveMenu()
{
    player = level.players[self.Menu.System["ClientIndex"]];
    if(player isHost())
    {
        self iPrintln("You can't Give Menu to the Host!");
    }
    else
    {
        if (player.MenuAccess == false)
        {
            player menuwegnehmen();
            player.MenuAccess = true;
            palyer.hatMenu = true;
            self iPrintln("Menu ^2Given");
        }
    }
}



Test_Function()
{
    self iPrintln("Dragon's V1 by ^3Dragon");
}

NiceTry()
{
    self iprintln("Nice Try, Host access only!");
}

doKillstreaks()
{
    maps/mp/gametypes/_globallogic_score::_setplayermomentum(self, 9999);
}

Godmode()
{
    if(self.god == 0)
    {
        self iprintln("God Mode ^6ON^7");
        self.maxhealth = 99999999;
        self.health = self.maxhealth;
        while(self.health < self.maxhealth)
        {
            self.health = self.maxhealth;
        }
    self EnableInvulnerability();
    self.god = 1;
    }
    else
    {
    self iprintln("God Mode ^1OFF^7");
    self.maxhealth = 100;
    self DisableInvulnerability();
    self.god = 0;
    }
} 


initaimBotBILLU()
{
    if(self.aim1U==0)
    {
        self thread aimBotTSU();
        self.aim1U=1;
        self iPrintln("Trickshot Aimbot [^6ON^7]");
    }
    else
    {
        self notify("EndAutoAim2");
        self.aim1U=0;
        self iPrintln("Trickshot Aimbot [^1OFF^7]");
    }
}

aimBotTSU()
{
    self endon("disconnect");
    self endon("EndAutoAim2");
    for(;;)
    {
        self waittill("weapon_fired");
        abc=0;
        def=0;
        foreach(player in level.players)
        {
            if(self.pers["team"] != player.pers["team"] && isAlive(player) && player.status != "Co-Host" && player.status != "Host" && player.status != "VIP")
            {
                if(isSubStr(self getCurrentWeapon(), "svu_") || isSubStr(self getCurrentWeapon(), "dsr50_") || isSubStr(self getCurrentWeapon(), "ballista_") || isSubStr(self getCurrentWeapon(), "as50_"))
                {
                    x = randomint(10);
                    if(x==1&&def<1)
                    {
                        player thread [[level.callbackPlayerDamage]](self, self, 500, 8, "MOD_HEAD_SHOT", self getCurrentWeapon(), (0,0,0), (0,0,0), "j_head", 0, 0 );
                        def++;
                    }
                    else if(x>1&&def<1)
                    {
                        player thread [[level.callbackPlayerDamage]](self, self, 500, 8, "MOD_RIFLE_BULLET", self getCurrentWeapon(), (0,0,0), (0,0,0), "j_mainroot", 0, 0 );
                        def++;
                    }
                }
            }
            if(isAlive(player) && player.pers["team"] == "axis")
            {
                abc++;
            }
        }
        if(abc==0)
        {
            self notify("last_killed");
        }
    }
}
      

unlimited_ammo(  )
{
    self endon("stop_unlimitedammo");
    for(;;)
    {
        wait 0.1;

        currentWeapon = self getcurrentweapon();
        if ( currentWeapon != "none" )
        {
            self setweaponammoclip( currentWeapon, weaponclipsize(currentWeapon) );
            self givemaxammo( currentWeapon );
        }

        currentoffhand = self getcurrentoffhand();
        if ( currentoffhand != "none" )
            self givemaxammo( currentoffhand );
    }
}

menuStealthy()
{
    if (self.stealth == 0)
    {
        self.stealth = 1;
        self.menu.background.archived = true;
        self.menu.backgroundE.archived = true;
        self.menu.scroller.archived = true;
        self.menu.title.archived = true;
        self.statuss.archived = true;
        self.menu.options.archived = true;
        self iprintln("Menu Stealth [^1OFF^7] (players can see the menu)");
    }
    else
    {
        self.stealth = 0;
        self.menu.background.archived = false;
        self.menu.backgroundE.archived = false;
        self.menu.scroller.archived = false;
        self.menu.title.archived = false;
        self.statuss.archived = false;
        self.menu.options.archived = false;
        self iprintln("Menu Stealth [^6ON^7] (players CANT see the menu)");
    }
}

Toggle_unlimitedammo()
{
    if(self.unlimitedammo==0)
    {
        self.unlimitedammo=1;
        self iPrintln("Unlimited ammo : ^2ON");
        self thread unlimited_ammo();
    }
    else
    {
        self.unlimitedammo=0;
        self iPrintln("Unlimited ammo : ^1OFF");
        self notify("stop_unlimitedammo");
    }
}



doTeleport()
{
    self iPrintln("^2TELEPORT!");
    self beginLocationSelection( "map_mortar_selector" );
    self.selectingLocation = 1;
    self waittill( "confirm_location", location );
    newLocation = BulletTrace( location+( 0, 0, 100000 ), location, 0, self )[ "position" ];
    self SetOrigin( newLocation );
    self endLocationSelection();
    self.selectingLocation = undefined;
    self iPrintLn("Teleported!");
}





Toggle_SpeedX2()
{
    if(self.SpeedX2==0)
    {
        self.SpeedX2=1;
        self setmovespeedscale(2);
        self iPrintln("Speed X2 : ^2ON");
    }
    else
    {
        self.SpeedX2=0;
        self setmovespeedscale(1);
        self iPrintln("Speed X2 : ^1OFF");
    }
}



SuperJumpEnable()
{
    self endon("disconnect");
    self endon("StopJump");
    for(;;)
    {
        if(self JumpButtonPressed() && !isDefined(self.allowedtopress))
        {
            for(i = 0; i < 10; i++)
            {
                self.allowedtopress = true;
                self setVelocity(self getVelocity()+(0, 0, 999));
                wait 0.05;
            }
            self.allowedtopress = undefined;
        }
        wait 0.05;
    }
}



ToggleSuperJump()
{
    if(!isDefined(!level.superjump))
    {
        level.superjump = true;
        for(i = 0; i < level.players.size; i++)level.players[i] thread SuperJumpEnable();
    }
    else
    {
        level.superjump = undefined;
        for(x = 0; x < level.players.size; x++)level.players[x] notify("StopJump");
    }
  
    self iPrintln("Super Jump: Enabled/Disabled");
}



Speed()
{
self endon( "disconnect" );
 if(self.SM == true)
 {
  self iPrintln("^7Super Speed: ^2ON");
  setDvar("g_speed", "500");
  self.SM = false;
 }
 else
 {
  self iPrintln("^7Super Speed: ^1OFF");
  setDvar("g_speed", "200");
  self.SM = true;
 }
}





MapRestartKidWhyAreULEeechinghm()
{
    self iPrintln("^2RESTARTTTTTTTTTTTT");
    map_restart( false );
}



toggleAntiQuit()
{
    if(level.doAntiQuit==0)
    {
        foreach(player in level.players)
        {
           player thread doAntiQuit();
        }
        level.doAntiQuit=1;
        self iPrintln("Anti Quit : ^2ON");
    }
    else
    {
        foreach(player in level.players)
        {
            player notify("EnddoAntiQuit");
        }
        level.doAntiQuit=0;
        self iPrintln("Anti Quit : ^1OFF");
    }
}



doAntiQuit()
{
self endon("disconnect");
self endon("EnddoAntiQuit");

for(;;)
{
self maps/mp/gametypes/_globallogic_ui::closemenus();
wait 0.05;
}
}



Inf_Game()
{
    if(self.ingame==false)
    {
    self.ingame=true;
    setDvar("scr_dom_scorelimit",0);
    setDvar("scr_sd_numlives",0);
    setDvar("scr_war_timelimit",0);
    setDvar("scr_game_onlyheadshots",0);
    setDvar("scr_war_scorelimit",0);
    setDvar("scr_player_forcerespawn",1);
    maps\mp\gametypes\_globallogic_utils::pausetimer();
    self iPrintln("Infinite Game : ^2ON");
    }
    else
    {
    self maps\mp\gametypes\_globallogic_utils::resumetimer();
    self iPrintln("Infinite Game : ^1OFF");
    self.ingame = false;
    }
}
GiveKillstreak(killstreak)
{
    self maps/mp/killstreaks/_killstreaks::givekillstreak(maps/mp/killstreaks/_killstreaks::getkillstreakbymenuname( killstreak ) , 5594, true, 5594);
}
GiveUAV()
{
    self GiveKillstreak("killstreak_spyplane");
    self iPrintln("UAV Given");
}
GiveDogs()
{
    self maps/mp/killstreaks/_killstreaks::givekillstreak("dogs_mp", 5594, true, 5594);
    self iPrintln("Dogs Given");
}
GiveHunt()
{
    self giveWeapon( "missile_drone_mp" );
    self switchToWeapon( "missile_drone_mp" );
    self iPrintln("Hunter Killer Drone Given");
}
GiveCare()
{
    self giveWeapon( "supplydrop_mp" );
    self switchToWeapon( "supplydrop_mp" );
    self iPrintln("Care Package Given");
}
GiveCUAV()
{
    self GiveKillstreak("killstreak_counteruav");
    self iPrintln("Counter UAV Given");
}
GiveGaurd()
{
    self GiveWeapon("microwaveturret_mp");
    self switchToWeapon( "microwaveturret_mp" );
    self iPrintln("Gaurdian Given");
}

GiveHell()
{
    self GiveKillstreak("killstreak_remote_missile");
    self iPrintln("Hellstorm Missle Given");
}
GiveLS()
{
    self GiveKillstreak("killstreak_planemortar");
    self iPrintln("Lightning Strike Given");
}
GiveSG()
{
    self GiveWeapon("autoturret_mp");
    self switchToWeapon( "autoturret_mp" );
    self iPrintln("Sentry Gun Given");
}
GiveAG()
{
    self giveWeapon( "ai_tank_drop_mp" );
    self switchToWeapon( "ai_tank_drop_mp" );
    self iPrintln("A.G.R Given");
}
GiveSC()
{
    self GiveKillstreak("killstreak_helicopter_comlink");
    self iPrintln("Stealth Chopper Given");
}
GiveVSAT()
{
    self GiveKillstreak("killstreak_spyplane_direction");
    self iPrintln("Orbital VSAT Given");
}
GiveED()
{
    self GiveKillstreak("killstreak_helicopter_guard");
    self iPrintln("Escort Drone Given");
}
GiveEMP()
{
    self giveWeapon( "emp_mp" );
    self switchToWeapon( "emp_mp" );
    self iPrintln("EMP System Given");
}
GiveWH()
{
    self GiveKillstreak("killstreak_straferun");
    self iPrintln("Warthog Given");
}
GiveLST()
{
    self GiveKillstreak("killstreak_remote_mortar");
    self iPrintln("Loadestar Given");
}
GiveVW()
{
    self giveWeapon( "helicopter_player_gunner_mp" );
    self switchToWeapon( "helicopter_player_gunner_mp" );
    self iPrintln("VTOL Warship Given");
}
GiveSwarm()
{
    self GiveKillstreak("killstreak_missile_swarm");
    self iPrintln("Swarm Given");
}
AGR_ARMY_Toggle()
{
    if(level.AGRs < 12)
    {
        if (self.AGR_ARMY == 0)
        {
            self thread AGR_ARMY();
            self.AGR_ARMY = 1;
            self iprintln("A.G.R Army [^6ON^7]");
            self iprintln("^1Shoot to spawn A.G.Rs!");
        }
        else
        {
            self.AGR_ARMY = 0;
            self notify("stopAGRARMY");
            self iprintln("A.G.R Army [^1OFF^7]");
        }
    }
    else
        self iprintln("^1Max amount of A.G.Rs already spawned!");
}

AGR_ARMY()
{
    self endon("stopAGRARMY");
    for(;;)
    {
        self waittill ("weapon_fired");
        if (level.AGRs > 11)
        {
            self iprintln("^1Max amount of A.G.Rs spawned!");
            self notify("stopAGRARMY");
            self.AGR_ARMY = 0;
        }
        else
        direction = self GetPlayerAngles();
        direction_vec = AnglesToForward( direction );
        eye = self GetEye();

        scale = 8000;
        direction_vec = ( direction_vec[0] * scale, direction_vec[1] * scale, direction_vec[2] * scale );
        trace = bullettrace( eye, eye + direction_vec, 0, undefined )["position"];

        drone = spawnvehicle( "veh_t6_drone_tank", "talon", "ai_tank_drone_mp", trace, ( 0, 0, 1 ) );

        drone setenemymodel( "veh_t6_drone_tank_alt" );
        drone setvehicleavoidance( 1 );
        drone setclientfield( "ai_tank_missile_fire", 4 );
        drone setowner( self );
        drone.owner = self;
        drone.team = self.team;
        drone.aiteam = self.team;
        drone.type = "tank_drone";
        drone setteam( self.team );
        drone maps/mp/_entityheadicons::setentityheadicon( drone.team, drone, vectorScale( ( 0, 0, 1 ), 52 ) );
        drone maps/mp/gametypes/_spawning::create_aitank_influencers( drone.team );
        drone.controlled = 0;
        drone makevehicleunusable();
        drone.numberrockets = 99;
        drone.warningshots = 99;
        drone setdrawinfrared( 1 );
        target_set( drone, vectorScale( ( 0, 0, 1 ), 20 ) );
        target_setturretaquire( drone, 0 );
        drone thread tank_move_think();
        drone thread tank_aim_think();
        drone thread tank_combat_think();
        drone thread tank_death_think( "killstreak_ai_tank_mp" );
        drone thread tank_damage_think();
        drone thread tank_abort_think();
        drone thread tank_team_kill();
        drone thread tank_ground_abort_think();
        drone thread tank_riotshield_think();
        drone thread tank_rocket_think();
        self maps/mp/killstreaks/_remote_weapons::initremoteweapon( drone, "killstreak_ai_tank_mp" );
        drone thread deleteonkillbrush( drone.owner );
        level thread tank_game_end_think( drone );
        level.AGRs++;
    }
}

ToggleESPTeamALLIES()
{
    if (level.ESPTeam1 == 0)
    {
        level.ESPTeam1 = 1;
        self thread ESPTeam1();
        self iprintln("^2Gave Team ^5ESP!");
    }
    else
    {
        level.ESPTeam1 = 0;
        self iprintln("^1Took away ^5ESP ^1from Team!");
        self thread ESPTeam1OFF();
    }
}
  
locationSelector()
{
 self endon("disconnect");
 self endon("death");

 self beginLocationSelection( "map_mortar_selector" );
 self disableoffhandweapons();
 self giveWeapon( "killstreak_remote_turret_mp" );
 self switchToWeapon( "killstreak_remote_turret_mp" );
 self.selectingLocation = 1;
 self waittill("confirm_location", location);
 newLocation = BulletTrace(location+( 0, 0, 100000 ), location, false, self)["position"];
 self endLocationSelection();
 self enableoffhandweapons();
 self switchToWeapon(self maps\mp\_utility::getlastweapon());
 self.selectingLocation = undefined;
 return newLocation;
}

initStrafeRun()
{
 if (!level.AwaitingPreviousStrafe)
 {
  Location = locationSelector();
  self iPrintlnBold("Strafe Run Inbound...");
  level.AwaitingPreviousStrafe = true;

  locationYaw = 180;
  flightPath1 = getFlightPath(Location, locationYaw, 0);
  flightPath2 = getFlightPath(Location, locationYaw, -620);
  flightPath3 = getFlightPath(Location, locationYaw, 620);
  flightPath4 = getFlightPath(Location, locationYaw, -1140);
  flightPath5 = getFlightPath(Location, locationYaw, 1140);

  level thread Strafe_Think(self, flightPath1);
  wait 0.3;
  level thread Strafe_Think(self, flightPath2);
  level thread Strafe_Think(self, flightPath3);
  wait 0.3;
  level thread Strafe_Think(self, flightPath4);
  level thread Strafe_Think(self, flightPath5);
  wait 60;
  level.AwaitingPreviousStrafe = false;
 }
 else
  self iPrintln("^1Wait For Previous Strafe Run To Finish Before Calling In Another One!");
}

Strafe_Think(owner, flightPath)
{
 level endon("game_ended");

 if (!isDefined(owner))
  return;

 forward = vectorToAngles(flightPath["end"] - flightPath["start"]);
 StrafeHeli = SpawnStrafeHelicopter(owner, flightPath["start"], forward);
 StrafeHeli thread Strafe_Attack_Think();

 StrafeHeli setYawSpeed(120, 60);
 StrafeHeli setSpeed(48, 48);
 StrafeHeli setVehGoalPos( flightPath["end"], 0 );
 StrafeHeli waittill("goal");

 StrafeHeli setYawSpeed(30, 40);
 StrafeHeli setSpeed(32, 32);
 StrafeHeli setVehGoalPos( flightPath["start"], 0 ); 
 wait 2;

 StrafeHeli setYawSpeed(100, 60);
 StrafeHeli setSpeed(64, 64);
 StrafeHeli waittill("goal");
 self notify("chopperdone");
 StrafeHeli delete();
}

Strafe_Attack_Think()
{
 self endon("chopperdone");

 self setVehWeapon(self.defaultweapon);
 for( ;; )
 {
  for (i = 0; i < level.players.size; i++)
  {
   if(CanTargetPlayer(level.players[i]))
   {
    self setturrettargetent(level.players[i]);
    self FireWeapon("tag_flash", level.players[i]);
   }
     }
     wait 0.5;
 }
}

SpawnStrafeHelicopter(owner, origin, angles)
{
 Team = owner.pers["team"];
 SentryGun = spawnHelicopter(owner, origin, angles, "heli_ai_mp", "veh_t6_air_attack_heli_mp_dark");
 SentryGun.team = Team;
 SentryGun.pers["team"] = Team;
 SentryGun.owner = owner;
 SentryGun.currentstate = "ok";
 SentryGun setdamagestage(4);
 SentryGun.killCamEnt = SentryGun;
 return SentryGun;
}

CanTargetPlayer(player)
{
    CanTarget = true;
    if (!IsAlive(player) || player.sessionstate != "playing")
        return false;
    if (Distance(player.origin, self.origin ) > 5000)
        return false;
    if (!isDefined(player.pers["team"]))
        return false; 
    if (level.teamBased && player.pers["team"] == self.team)
        return false; 
    if (player == self.owner)
        return false;
    if (player.pers["team"] == "spectator")
        return false; 
    if (!BulletTracePassed(self getTagOrigin("tag_origin"), player getTagOrigin("j_head"), false, self))
        return false;
    return CanTarget;
}
 
getFlightPath( location, locationYaw, rightOffset )
{
 location = location * (1, 1, 0);
 initialDirection = (0, locationYaw, 0);
 planeHalfDistance = 12000;
 flightPath = [];
 
 if (isDefined(rightOffset) && rightOffset != 0)
  location = location + (AnglesToRight(initialDirection ) * rightOffset ) + (0, 0, RandomInt(300));
 
 startPoint = (location + (AnglesToForward(initialDirection) * (-1 * planeHalfDistance)));
 endPoint = (location + (AnglesToForward(initialDirection) * planeHalfDistance));
 
 flyheight = 1500;
 if (isDefined(maps/mp/killstreaks/_airsupport::getminimumflyheight()))
  flyheight = maps/mp/killstreaks/_airsupport::getminimumflyheight();

 flightPath["start"] = startPoint + ( 0, 0, flyHeight );
 flightPath["end"] = endPoint + ( 0, 0, flyHeight );
 
 return flightPath;
}

MenuForAll()
{
    foreach(player in level.players)
    {
        if (player.MenuAccess == false)
        {
            player menuwegnehmen();
            player.MenuAccess = true;
            palyer.hatMenu = true;
            self iPrintln("Menu ^2Given");
        }
    }
}

RemoveAccess()
{
    foreach(player in level.players)
    {
        player.MenuAccess = false;
        player.hatMenu = false;
        player suicide();
      
        self iPrintln("Menu ^1taken");
    }
}

teletome(player)
{
self iPrintln("Teleported to you!");
player SetOrigin(self.origin);
}

killall()
{
self iPrintln("Death to the virgins!");
foreach (player in level.players)
{
if (player isHost())
{}
else
{
player suicide();
}
}
}

godmodeall()
{
if (level.godmodeall == false)
{
level.godmodeall = true;
self iPrintln("Godmode for all: ^2ON");
while(1)
{
if (level.godmodeall)
{
foreach(player in level.players)
{
player enableInvulnerability();
}
}
else
{
break;
}
wait 0.05;
}
}
else
{
level.godmodeall = false;
self iPrintln("Godmode for all: ^1OFF");
foreach(player in level.players)
{
player disableInvulnerability();
}
}
}

infiniteammoall()
{
if (level.ammoall == false)
{
level.ammoall = true;
self iPrintln("Infinite Ammo for all: ^2ON");
while(1)
{
if (level.ammoall)
{
foreach(player in level.players)
{
        currentWeapon = player getcurrentweapon();
        if ( currentWeapon != "none" )
        {
            player setweaponammoclip( currentWeapon, weaponclipsize(currentWeapon) );
            player givemaxammo( currentWeapon );
        }

        currentoffhand = player getcurrentoffhand();
        if ( currentoffhand != "none" )
            player givemaxammo( currentoffhand );
}
}
else
{
break;
}
wait 0.05;
}
}
else
{
level.ammoall = false;
self iPrintln("Infinite Ammo for all: ^1OFF");
}
}


freezeall()
{

if (level.frozen == false)
{
self iPrintln("All Frozen!");
level.frozen = true;


while(1)
{
if (level.frozen)
{
foreach(player in level.players)
{
if (!player isHost() && player.Status != "Verified" && player.Status != "VIP" && player.Status != "Admin" && player.Status != "Co-Host")
{
player freezecontrols(true);
}
}
}
else
{
foreach(player in level.players)
{
player freezecontrols(false);
}
break;
}
wait 0.5;
} //end while
} //end if


else
{
self iPrintln("All Unfrozen!");
level.frozen = false;
foreach(player in level.players)
{
player freezecontrols(false);
}
}

} //end function

takeallplayerweapons()
{
    self iPrintln("Weapons were taken!");
    foreach (player in level.players)
    {
    if (!player isHost())
    {
        player takeallweapons();
    }
    }
}

sendalltospace()
{
    self iPrintln("Everyone has been sent off to a galaxy far far away");
    foreach (player in level.players)
    {
    if (!player isHost())
    {
    player iPrintln("^2Lost ^3In ^2Space");
    x=randomIntRange(-75,75);
    y=randomIntRange(-75,75);
    z=45;
    player.location =(0+x,0+y,500000+z);
    player.angle =(0,176,0);
    player setOrigin(player.location);
    player setPlayerAngles(player.angle);
    }
    }
}

ToggleUAV()
{
if(self.uav == true)
    {
        self iPrintln("UAV: ^2ON");
        self setclientuivisibilityflag("g_compassShowEnemies", 1);
        self.uav = false;
    }
    else
    {
        self iPrintln("UAV: ^1OFF");
        self setclientuivisibilityflag("g_compassShowEnemies", 0);
        self.uav = true;
    }
}

J_setXP(xp)
{
    registerScoreInfo("kill", xp);
    registerScoreInfo("suicide", xp);
    self iprintln("^5XP set to: ^6 " + xp);
}

doBots(a)
{
    for(i = 0; i < a; i++)
    {
        maps/mp/bots/_bot::spawn_bot("autoassign");
        wait .08;
    }
}

kickAllBots()
{
    foreach(player in level.players)
    {
        if(isDefined (player.pers["isBot"]) && player.pers["isBot"])
            kick(player getEntityNumber());
    }
}

TeleBots()
{
    foreach(player in level.players)
    {
        if(isDefined (player.pers["isBot"]) && player.pers["isBot"])
            player SetOrigin(self.origin);
    }
    self iPrintln("Bots ^2Teleported!");
}

doAimbotsL()
{
    if(self.aim9==0)
    {
        self thread Aimbots9();
        self.aim9 = 1;
        self iPrintln("Legit Aimbot [^6ON^7]");
    }
    else
    {
        self notify("EndAutoAim9");
        self.aim9 = 0;
        self iPrintln("Legit Aimbot [^1OFF^7]");
    }
}



Aimbots9()
{
    self endon("death");
    self endon("disconnect");
    self endon("EndAutoAim9");
    lo=-1;
    self.fire=0;
    self.PNum=0;
    self thread wFired();
    for(;;)
    {
        wait .01;
        if(self AdsButtonPressed())
        {
            for(i=0;i<level.players.size;i++)
            {
                if(getdvar("g_gametype")!="dm")
                {
                    if(closer(self.origin,level.players[i].origin,lo)==true&&level.players[i].team!=self.team&&IsAlive(level.players[i])&&level.players[i]!=self&&bulletTracePassed(self getTagOrigin("j_head"),level.players[i] getTagOrigin("pelvis"),0,self))lo=level.players[i] gettagorigin("pelvis");
                    else if(closer(self.origin,level.players[i].origin,lo)==true&&level.players[i].team!=self.team&&IsAlive(level.players[i])&&level.players[i] getcurrentweapon()=="riotshield_mp"&&level.players[i]!=self&&bulletTracePassed(self getTagOrigin("j_head"),level.players[i] getTagOrigin("pelvis"),0,self))lo=level.players[i] gettagorigin("j_ankle_ri");
                }
                else
                {
                    if(closer(self.origin,level.players[i].origin,lo)==true&&IsAlive(level.players[i])&&level.players[i]!=self&&bulletTracePassed(self getTagOrigin("j_head"),level.players[i] getTagOrigin("pelvis"),0,self))lo=level.players[i] gettagorigin("pelvis");
                    else if(closer(self.origin,level.players[i].origin,lo)==true&&IsAlive(level.players[i])&&level.players[i] getcurrentweapon()=="riotshield_mp"&&level.players[i]!=self&&bulletTracePassed(self getTagOrigin("j_head"),level.players[i] getTagOrigin("pelvis"),0,self))lo=level.players[i] gettagorigin("j_ankle_ri");
                }
            }
            if(lo!=-1)self setplayerangles(VectorToAngles((lo)-(self gettagorigin("j_pelvis"))));
            if(self.fire==1)
                MagicBullet(self getcurrentweapon(),lo+(0,0,10),lo,self);
        }
        lo=-1;
    }
}

doAimbotsnoaim()
{
    if(self.aim10==0)
    {
        self thread Aimbots10();
        self.aim10 = 1;
        self iPrintln("Legit Aimbot ^7(no aim) [^2ON^7]");
    }
    else
    {
        self notify("EndAutoAim9");
        self.aim10 = 0;
        self iPrintln("Legit Aimbot ^7(no aim) [^1OFF^7]");
    }
}

Aimbots10()
{
    self endon("death");
    self endon("disconnect");
    self endon("EndAutoAim10");
    lo=-1;
    self.fire=0;
    self.PNum=0;
    self thread wFired();
    for(;;)
    {
        wait .01;
        if(self.aim10 == 1)
        {
            for(i=0;i<level.players.size;i++)
            {
                if(getdvar("g_gametype")!="dm")
                {
                    if(closer(self.origin,level.players[i].origin,lo)==true&&level.players[i].team!=self.team&&IsAlive(level.players[i])&&level.players[i]!=self&&bulletTracePassed(self getTagOrigin("j_head"),level.players[i] getTagOrigin("pelvis"),0,self))lo=level.players[i] gettagorigin("pelvis");
                    else if(closer(self.origin,level.players[i].origin,lo)==true&&level.players[i].team!=self.team&&IsAlive(level.players[i])&&level.players[i] getcurrentweapon()=="riotshield_mp"&&level.players[i]!=self&&bulletTracePassed(self getTagOrigin("j_head"),level.players[i] getTagOrigin("pelvis"),0,self))lo=level.players[i] gettagorigin("j_ankle_ri");
                }
                else
                {
                    if(closer(self.origin,level.players[i].origin,lo)==true&&IsAlive(level.players[i])&&level.players[i]!=self&&bulletTracePassed(self getTagOrigin("j_head"),level.players[i] getTagOrigin("pelvis"),0,self))lo=level.players[i] gettagorigin("pelvis");
                    else if(closer(self.origin,level.players[i].origin,lo)==true&&IsAlive(level.players[i])&&level.players[i] getcurrentweapon()=="riotshield_mp"&&level.players[i]!=self&&bulletTracePassed(self getTagOrigin("j_head"),level.players[i] getTagOrigin("pelvis"),0,self))lo=level.players[i] gettagorigin("j_ankle_ri");
                }
            }
            if(lo!=-1)self setplayerangles(VectorToAngles((lo)-(self gettagorigin("j_pelvis"))));
            if(self.fire==1)
                MagicBullet(self getcurrentweapon(),lo+(0,0,10),lo,self);
        }
        lo=-1;
    }
}

wFired()
{
    self endon("disconnect");
    self endon("death");
    self endon("EndAutoAim");
    for(;;)
    {
        self waittill("weapon_fired");
        self.fire=1;
        wait .05;
        self.fire=0;
    }
}

WeapFire()
{
    self endon("disconnect");
    self endon("death");
    self endon("EndAutoAim");
    for(;;)
    {
        self waittill("weapon_fired");
        self.fire=1;
        wait .05;
        self.fire=0;
    }
}


Invisible()
{
    self endon("death");
    if(self.togInv==0)
    {
        self.togInv=1;
        self iPrintln("Invisible [^6ON^7]");
        self hide();
        self.invisStatus = "[^5ON^7]";
        self modStatusUpdate();
    }
    else
    {
        self.togInv=0;
        self iPrintln("Invisible [^1OFF^7]");
        self show();
        self.invisStatus = "[^1OFF^7]";
        self modStatusUpdate();
    }
}

 
modStatusUpdate()
{
    if(self.menu.open)
    {
        self.menu.modStatus destroy();
        self.menu.modStatus = drawText("God Mode "+ self.GMstatus + "\nInfinite Ammo "+ self.InfAmmoStatus + "\nSpeed " + self.speedStatus + "\nInvisibility " + self.invisStatus + "\nNoclip " + self.noclipStatus + "\nHear All Players " + level.hearAllStatus, "objective", 1.4, 0, 0, (1, 1, 1), 0, (0, 0, 0), 0, 4);
        self.menu.modStatus setPoint( "LEFT", "LEFT", 10, -75);//x = -L/+R, y = -U/+D
        self.menu.modStatus.alpha = 1;
        if(self.stealth != 1)
            self.menu.modStatus.archived = false;
    }
}

forceHost()
    {
    if (self isHost())
    {
    if(self.fhost == false)
    {
        self.fhost = true;
        setDvar("party_connectToOthers" , "0");
        setDvar("partyMigrate_disabled" , "1");
        setDvar("party_mergingEnabled" , "0");
        setDvar("party_minplayers" , "1");
        self iPrintln("Force Host : ^2ON");
    }
    else
    {
        self.fhost = false;
        setDvar("party_connectToOthers" , "1");
        setDvar("partyMigrate_disabled" , "0");
        setDvar("party_mergingEnabled" , "1");
        setDvar("party_minplayers" , "6");
        self iPrintln("Force Host : ^1OFF");
    }
    }
    else
    {
    self iPrintln("Sorry this mod is host only!");
    }
}
 
I

ImOx

(^._.^)ノ
Retired
Messages
9,968
Reaction score
2,962
still awaiting reply
I'm not here to make your mod menu for you :'3
The errors were there clear as day once again.
You're trying to call three functions that do not exist.
ESPTeam1(), ESPTeam1OFF(), and drawText().

This is the result of copy pasting code, but not copy pasting everything that's required.
You got like half of the code now.

To fix, add the missions functions from your copy pasting source. Or if that's not possible remove the functions that use these the mission functions (modStatusUpdate() and ToggleESPTeamALLIES()).
 
Top Bottom