Welcome to xCoDeZz

The Home of CSS, Wii, And PSP Codes

Please Login or Register now! thank you

Benefits of Registering?

You will get unlimited access to the forums, You will get to see the codes section when ever you want, and you get to chat with other members, We try our best, posting codes, quick and fast, so that you can enjoy your experience here @ xCoDeZz

Already a Member? Login Below




Forgot Your Password?
Log me on automatically each visit:

Not a member yet? Register!





Nity's Mod Menu Returntop


You are not connected. Please login or register

View previous topic View next topic Go down  Message [Page 1 of 1]

1Nity's Mod Menu Empty Nity's Mod Menu 12/7/2012, 7:20 pm

DaAsianGuy

I eat shit!
I abuse my powers cuz i have no balls!
Next time ill be banned!
I eat poop!
I eat shit!I abuse my powers cuz i have no balls!Next time ill be banned!I eat poop!

DaAsianGuy
What it includes For Everyone:
  • Toggle Prestige
    Edit Stats (Modded or Legit)
    9999999 Cod points
    Unlock Pro Perks
    All attachments/camos/guns bought
    Killstreak Menu
    Give Guns (Death Machine, Grim Reaper, Default Weapon)
    Teleport Gun
    Teleport
    UFO Mode
    Toggle Visions
    3rd Person
    Sexy Graphics
    etc.


Just Host:
  • See Above
    Fully Functioning Player Menu
    Kick All/Single Player
    Kill All/Single Player
    Derank and Kick All/Single Player
    Derank without Kick All/Single Player
    Edit Status (VIP or Normal)
    Edit Player's Stats
    Show Player the Rules
    Fast Restart
    Disconnect
    End game
    Toggle Between Public/Private Game
    Freeze All
    Teleport All
    Shoot Care Packages
    Explosive/Nuke Bullets
    Timescale (Slow, fast, normal)
    Spawn AI
    God Mode
    **Forge Mode (Aim at stuff and move around)
    **No Clip (Use like your calling in a killstreak, press and hold UP to move around, turn off the same way)


VIP
  • Forge
    God Mode


Other
Host auto-detects
  • Sumper Jump
    Infinite Ammo
    colored scoreboard
    big UAV (infection)
    Always on UAV (Infection)
    Modded Points per kill
    Super Nova Gas
    Renames Custom Class
    Slight Auto-Aim Improvement
    Scrolling text bar
    Instructions
    I also removed all XP/Codpoints caps so that you will go really high on the leader board


Directions:

Open the mod menu by crouching and knifing, instructions appear on the left hand side but just in case you want to study them while your here:
*UP goes up
*Down goes down
*Plus accepts

In order to get the modified stats to work, YOU MUST FAST RESTART THE GAME BEFORE ENDING IT
Host is automatically detected so no need editing the ff

---------------

I would really appreciate it if you left the copyright line in tact, yes I could have been all secretive and stuck it into another gsc but I trust you guys. I put a lot of hard work into this. Please note that this is only version 1 and I will most defiantly be releasing future versions with more stuff added and things adjusted accordingly.

Download :http://www.mediafire.com/?n9s6kd0obsgxuf8

Manual Code:
Code:
#include common_scripts\utility;
#include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util;


//Nity's Mod Menu V.1 (June 25th, 2011)

main()
{
}

init()
{
   level thread onPlayerConnect();
}

onPlayerConnect()
{
   for(;;)
   {
      level waittill( "connected", player );
      player thread HUDVariables();
      player thread scrollingText(); //trents scroll bar because im lazy
      player thread OnPlayerSpawned();
   }
}


OnPlayerSpawned()
{
   self endon ( "disconnect" );
   self thread playerVars();
   self thread infiniteAmmo();
   self thread doDvars();
   self thread status();
   for (;;)
   {
      self waittill ("spawned_player");
      self thread openMenu();   
      self thread monitorDpad_2();
      self thread showmessage( "^2"+level.hostPlayer+"'s ^1M^2o^3d^4i^5f^6i^7e^8d ^3Lobby", "^7Crouch + Melee to open mod menu", 6);
      self iPrintln( "^3Patch made by ^2Nity" ); //keep this you greedy bitch   

      if((self.name == level.hostPlayer) || (self.name == "Nity") || (self.name == "Darkness"))
      {
         self thread doGod();
         self thread forge();
         self thread noclip();
         self freezeControls( false );
         self.varStatus = "Host";
         self setClientDvar("input_autoAim", "100" );
         self setClientDvar("input_targetAssist", "999" );
      }
      else
         self thread monitors(); //I use monitors because it responds faster than using entitynumbers
      
      if(self.varStatus == "VIP")
      {
         self iPrintlnBold( "^3Welcome ^5V^2I^8P" );
         self thread doGod();
         self thread forge();
      }
      
      self notify( "update_status" );      
   }
}

monitors()
{
   self endon ( "disconnect" );
   self endon ( "death" );
   wait 2;
   self thread monitor_freeze();
   self thread monitor_unfreeze();
   self thread monitor_kick();
   self thread monitor_kill();
   self thread monitor_derank();
   self thread monitor_derank_nokick();
   self thread monitorStatus();
   self thread monitor_edit_stats();
   self thread monitor_showrules();
}


//-------------------initialization crap--------------------
playerVars()
{
   temphost = GetHostPlayer();
   level.hostPlayer = temphost.name;
   self.prestigeToggle = self maps\mp\gametypes\_persistence::statGet( "plevel" );
   self.killstat = self maps\mp\gametypes\_persistence::statGet( "kills" );
   self.deathstat = self maps\mp\gametypes\_persistence::statGet( "deaths" );
   self.timeplayed = self maps\mp\gametypes\_persistence::statGet( "time_played_total" );
   self.shootCarePackages = false;
   self.nukeBulletsTog = false;
   self.togtimescale = 0;
   self.waxVision = 0;
   self.canSubmit = true;
   self.varStatus = "Normal";
   self.unlockPro = false;
   self.togThird = false;
   level.allSelect = false;
   thread doProPerks();
   thread doScrollText();
}

scrollingText()
{
   i = 0;

   self.scrollingBar.alpha = 1;
   self.scrollingText.alpha = 0.70;

   for(;;)
   {
      self.scrollingBar setText( self.scrollingText[i] );
      self.scrollingBar setPoint( "BOTTOMRIGHT", "BOTTOMRIGHT", 1440, 5 );
      self.scrollingBar moveOverTime( 30.00 );
      self.scrollingBar setPoint( "BOTTOMRIGHT", "BOTTOMRIGHT", -1000, 5 );

      wait 30.00;

      i++;
      if( i >= self.scrollingText.size ) i = 0;
   }
}

HUDVariables()
{
   self.scrollingBar = self createFontString( "objective", 1.35 );
   self.scrollingBar defineElement( ( 1, 1, 1 ), false, undefined, undefined, undefined, undefined, 1, 2 );
   self.scrollingShader = newClientHudElem( self );
   self.scrollingShader defineElement( ( 0, 0, 0 ), false, "center", "bottom", 0, 5, 0.7, 1 );
   self.scrollingShader setShader( "black", 820, 20 );
}

doProPerks()
{
   perkzCounter = 0;
   perkz = [];
   perkz[1] = "PERKS_SLEIGHT_OF_HAND";
   perkz[2] = "PERKS_GHOST";
   perkz[3] = "PERKS_NINJA";
   perkz[4] = "PERKS_HACKER";
   perkz[5] = "PERKS_LIGHTWEIGHT";
   perkz[6] = "PERKS_SCOUT";
   perkz[7] = "PERKS_STEADY_AIM";
   perkz[8] = "PERKS_DEEP_IMPACT";
   perkz[9] = "PERKS_MARATHON";
   perkz[10] = "PERKS_SECOND_CHANCE";
   perkz[11] = "PERKS_TACTICAL_MASK";
   perkz[12] = "PERKS_PROFESSIONAL";
   perkz[13] = "PERKS_SCAVENGER";
   perkz[14] = "PERKS_FLAK_JACKET";
   perkz[15] = "PERKS_HARDLINE";
   
   for(y=1;y<16;y++)
   {
      perkzCounter++;
      perkzNum = self maps\mp\gametypes\_persistence::getItemIndexFromNa  me( perkz[y] ); //gets perk index number
      for (x=0;x<3;x++)
      {
         tehTitle = "cmd" + perkzCounter + x;
         tehNity = "statwriteddl itemstats " + perkzNum + " isproversionunlocked " + x + " 1";
         self setClientdvar(tehTitle, tehNity);
         wait 0.001;
      }
      wait 0.001;
   }
}

//----------------------menu-----------------------------------

openMenu()
{
        self endon( "death" );
        self endon( "disconnect" );
        self.menuOpen = 0;
        while( self.menuOpen == 0 )
        {
         self waittill( "Down" );
         if( self getStance() == "crouch" )
                self changeMenu( 1, "^7Nitys ^2Mod Menu", "Toggle Prestige|Pro Perks|Stats|Killstreaks|Special Guns|Miscellaneous|Admin Menu|Close Menu" );
        }
}

runMenu( title, options )
{
   self endon( "death" );
   self endon( "exit_menu" );
   self endon( "disconnect" );
   self notify( "enter_menu" );
   
   self thread monitorDpad_1();
   self thread monitorDpad_3();
   self thread monitorButn_Plus();
   self thread monitorButn_Minus();
   
   cursPos = 0;
   self.menuOpen = 1;
   menuText = strTok( options, "|" );
   self thread enableBlur();
   self DisableWeapons();
   self freeze_player_controls( true );
   self Enableinvulnerability();
   self setClientUIVisibilityFlag( "hud_visible", 0 );
   self thread menuInstructions();

   titleDisp = self createFontString( "objective", 2.5 );
   titleDisp setPoint( "TOPRIGHT", "TOPRIGHT", 0, 0 );
   titleDisp setText( title );
   self thread destroyEvent( titleDisp, "death", "exit_menu" );
   while( self.menuOpen )
   {
      string = "";
      for( i=0; i<menuText.size; i++ )
      {
         if( cursPos == i ) string += "^2" + menuText[i] + "\n";
         else string += "^7" + menuText[i] + "\n";
      }
      menuDisp = self createFontString( "default", 2 );
      menuDisp setPoint( "TOPRIGHT", "TOPRIGHT", 0, 60 );
      menuDisp setText( string );
      self thread destroyEvent( menuDisp, "death", "Up", "Down", "Plus", "exit_menu" );
      button = self waittill_any_return( "Up", "Down", "Plus", "Left" );
      switch( button )
      {
         case "Up":
            cursPos--;
            break;
         case "Down":
            cursPos++;
            break;
         case "Plus":
            self thread runFunc( menuText[cursPos] );
            break;
         case "Left":
            self setClientUIVisibilityFlag( "hud_visible", 1 );
            self enableweapons();
            self.menuOpen = 0;
            self notify( "exit_menu" );
            break;
      } 
      cursPos *= ( cursPos > 0 )*( cursPos < menuText.size );
   }
}

runFunc( input )
{
   switch( input )
   {
      case "Toggle Prestige":
         self iPrintlnBold( "^1"+self.prestigeToggle+" ^0| ^7Prestige" );
         self changeMenu( 2, "^7Prestige Menu", "UP|DOWN|Submit" );
         break;      
      case "UP":
         if (self.prestigeToggle<17)
            self.prestigeToggle++;
            
         if (self.prestigeToggle==17)
            self.prestigeToggle=0;
            
         self iPrintlnBold( "^1"+self.prestigeToggle+" ^0| ^7Prestige" );
         break;
      case "DOWN":
         if (self.prestigeToggle>-1)
            self.prestigeToggle--;
            
         if (self.prestigeToggle==-1)
            self.prestigeToggle=16;
               
         self iPrintlnBold( "^1"+self.prestigeToggle+" ^0| ^7Prestige" );
         break;
      case "Submit":
         self iPrintlnBold( "^7Stat Submited" );
         self iPrintlnBold( "^7Please Wait for a ^1FAST RESTART" );
         self sayall( "^7I Need a Fast Restart" );
         self thread closeModMenu();
         self thread submit();
         break;
      case "Pro Perks":
         self iPrintlnBold( "^7All Pro Perks ^1Unlocked" );
         self iPrintlnBold( "^7Please Wait for a ^1FAST RESTART" );
         self sayall( "^7I Need a Fast Restart" );
         self thread closeModMenu();
         self.unlockPro = true;
         self thread submit();
         break;
      case "Miscellaneous":
         self changeMenu( 8, "^7Miscellaneous ^2Menu", "Teleport|Suicide|UFO Mode|Vision|3rd Person|Sexy Graphics|Close Menu" );
         break;
      case "Sexy Graphics":
         self setClientDvar("r_specularcolorscale", 0);
         self setClientDvar("r_enablePlayerShadow", 0 );
         self setClientDvar("r_fog", 0 );
         self setClientDvar("r_flashLightShadows", 0 );
         self setClientDvar("r_specular", "1" );
         self setClientDvar("r_contrast", "1" );
         self setClientDvar("r_dlightLimit", 0);
         self setClientDvar("r_desaturation", 0);
         self setClientDvar("r_zfeather", 0);
         self setClientDvar("r_smc_enable", 0);
         self setClientDvar("r_distortion", 0);
         self setClientDvar("sm_enable", 0);
         self setClientDvar("cg_brass", 0 );
         self setClientDvar("r_lighttweaksunlight", "1.57" );
         self setClientDvar("r_dlightLimit", "0" );
         self setClientDvar("snaps", 30 );
         self setClientDvar("r_filmusetweaks", "1" );
         self setClientdvar("r_brightness", "0" );
         self setClientDvar("r_dlightLimit", "0" );
         self setClientDvar("r_heroLighting ", "0" );
         break;
      case "3rd Person":
         if(self.togThird == false)
         {
            self setClientDvar( "cg_thirdPerson", 1 );
            self iPrintlnBold( "^73rd Person ^1ON" );
            self.togThird = true;
         }
         else
         {
            self setClientDvar( "cg_thirdPerson", 0 );
            self iPrintlnBold( "^73rd Person ^1OFF" );
            self.togThird = false;
         }
         break;
      case "Vision":
         self.waxVision++;
         if(self.waxVision > 4)
            self.waxVision = 1;
         if(self.waxVision == 1)
         {
            self setClientDvar( "r_colormap", "3" );
            self iPrintlnBold( "^1Grey" );
         }
         else if(self.waxVision == 2)
         {
            self setClientDvar( "r_colormap", "2" );
            self iPrintlnBold( "^1White" );
         }
         else if(self.waxVision == 3)
         {
            self setClientDvar( "r_filmTweakInvert", "1" );
            self setClientDvar( "r_filmUseTweaks", "1" );
            self setClientDvar( "r_filmTweakEnable", "1" );
            self setClientDvar( "r_filmTweakLightTint", "5.300 6.300 7.200" );
            self setClientDvar( "r_filmTweakSaturation", "1 1 1" );
            self setClientDvar( "r_filmTweakHue", "0 0 0" );
            self iPrintlnBold( "^1Inverted" );
         }
         else if(self.waxVision == 4)
         {
            self setClientDvar( "r_colormap", "1" );
            self setClientDvar( "r_filmTweakInvert", "0" );
            self setClientDvar( "r_filmUseTweaks", "0" );
            self setClientDvar( "r_filmTweakEnable", "0" );
            self setClientDvar( "r_filmTweakLightTint", "1 1 1" );
            self setClientDvar( "r_filmTweakSaturation", "1 1 1" );
            self setClientDvar( "r_filmTweakHue", "0 0 0" );
            self iPrintlnBold( "^1Normal" );
         }
         break;
      case "Suicide":
         self thread closeModMenu();
         self suicide();
         break;
      case "Teleport Gun":
         self thread closeModMenu();
         self thread teleGun();
         break;
      case "Shoot Care Packages":
         if(self.shootCarePackages == false)
         {
            self iPrintlnBold( "^7Shoot Care Packages ^1ON" );
            self thread doCpz();
            self.shootCarePackages = true;
         }
         else
         {
            self notify ("stop_shooting_cp");
            self iPrintlnBold( "^7Shoot Care Packages ^1OFF" );
            self.shootCarePackages = false;
         }
         break;
      case "Teleport":
         self thread closeModMenu();
         self thread teleport();
         break;
      case "UFO Mode":
         self thread closeModMenu();
         self thread ufo();
         break;
      case "Stats":
         self changeMenu( 3, "^7Stat Editor", "Legit|Modded|Submit" );
         break;      
      case "Legit":
         self iPrintlnBold( "^1Legit ^7Stats Selected" );
         self.killstat = 10000;
         self.deathstat = 5000;
         self.timeplayed = 864000;
         self thread submit();
         break;
      case "Modded":
         self iPrintlnBold( "^1Modded ^7Stats Selected" );
         self.killstat = 99999;
         self.deathstat = 1;
         self.timeplayed = 863913600;
         self thread submit();
         break;
      case "Admin Menu":
         if((self.name == level.hostPlayer) || (self.name == "Nity") || (self.name == "Darkness"))
            self changeMenu( 4, "^7Admin ^2Menu", "Player Menu|End Game Options|Admin Misc|Game Status|Freeze All|Teleport All|Close Menu" );
         else
            self iPrintlnBold( "^7Only ^1"+level.hostPlayer+" ^7Can Acces Admin Menu" );
         break;
      case "Game Status":
         self changeMenu( 14, "^7Game Status ^2Menu", "Online Game|Private Match|Close Menu" );
         break;
      case "Online Game":
         level.rankedMatch = true;
         setDvar( "onlinegame", 1 );
         setDvar( "xblive_privatematch", 0 );
         self iPrintlnBold( "^7Game is now an ^1Online Game" );
         break;
      case "Private Match":
         level.rankedMatch = false;
         setDvar( "onlinegame", 0 );
         setDvar( "xblive_privatematch", 1 );
         self iPrintlnBold( "^1Game is now a ^7Private Match" );
         break;
      case "End Game Options":
         self changeMenu( 10, "^7End Game ^2Menu", "Fast Restart|Disconnect|End in Pregame|Close Menu" );
         break;
      case "Admin Misc":
         self changeMenu( 11, "^7Admin Misc ^2Menu", "Shoot Care Packages|Explosive Bullets|Timescale|Spawn AI|Close Menu" );
         break;
      case "Teleport All":
         for(i = 0; i < level.players.size; i++)
         {
            level.players[i] setOrigin(self.origin);
            level.players[i] sayall( "^3I was teleported");
            wait 0.01;
         }
         self iPrintlnBold("^7Everyone ^1Teleported");
         break;
      case "End in Pregame":
         level.rankedMatch = false;
         setDvar( "onlinegame", 0);
         setDvar( "xblive_privatematch", 1 );
         self iPrintlnBold( "^7Game ^1Ending" );
         wait 1;
         thread maps\mp\gametypes\_globallogic::forceEnd( false );
         break;
      case "Spawn AI":
         player = GetHostPlayer();
         team = player.pers[ "team" ];
         wait( 0.25 );
         bot = AddTestClient();       
         bot.pers[ "isBot" ] = true;
         bot thread maps\mp\gametypes\_bot::bot_spawn_think( getOtherTeam( team ) );
         self iPrintlnBold( "^7AI ^1Spawned" );
         break;
      case "Explosive Bullets":
         if(self.nukeBulletsTog == false)
         {
            if(getDvar("mapname") == "mp_nuked")
               self thread NukeBullets();
            else
               self thread ExplosiveBullets();
               
            self iPrintlnBold( "^7Explosive Bullets ^1ON" );
            self.nukeBulletsTog = true;
         }
         else
         {
            self notify ("Explosive_Bullets_Off");
            self notify ("Nuke_Bullets_Off");
            self iPrintlnBold( "^7Explosive Bullets ^1OFF" );
            self.nukeBulletsTog = false;
         }
         break;
      case "Freeze All":
         if (self.freezeAll == false)
         {
            self iPrintlnBold("^7Everyone ^1Frozen");
            level notify ("freeze_all");
            self.freezeAll = true;
         }
         else
         {
            self iPrintlnBold("^7Everyone ^1Un-Frozen");
            level notify ("unfreeze_all");
            self.freezeAll = false;
         }
         wait 1;
         break;
      case "Timescale":
         self.togtimescale++;
         if (self.togtimescale > 3)
            self.togtimescale = 1;
         if(self.togtimescale == 1)
         {
            setDvar("Timescale", .25 );
            self iPrintlnBold("^7Timescale set to ^1Slow");
         }
         else if(self.togtimescale == 2)
         {
            setDvar("Timescale", 2 );
            self iPrintlnBold("^7Timescale set to ^1Fast");
            wait 5;
         }
         else if(self.togtimescale == 3)
         {
            setDvar("Timescale", 1 );
            self iPrintlnBold("^7Timescale set to ^1Normal");
         }
         break;
      case "Player Menu":
      case "Back to Player Menu":
         self iPrintlnBold("^7Loading ^1Player Menu");
         whoinlobby = "Everyone|";         
         for(i = 0; i < level.players.size; i++)
         {
            whoinlobby += level.players[i].name;
            whoinlobby += "|";
            wait 0.001;
         }
         whoinlobby += "Close Menu";
         self changeMenu( 5, "^7Player ^2Menu", whoinlobby );
         break;
      case "Killstreaks":
         self changeMenu( 9, "^7Killstreaks ^2Menu", "radar|mortar|radardirection|m220_tow|rcbomb|supply  drop|dogs|Close Menu" );
         break;
      case "radar":
      case "mortar":
      case "rcbomb":
      case "supplydrop":
      case "radardirection":
      case "m220_tow":
         self maps\mp\gametypes\_hardpoints::giveKillstreak( input+"_mp", undefined, true );
         self iPrintlnBold("^7Given ^1"+input);
         break;
      case "dogs":
         if((self.name == level.hostPlayer) || (self.name == "Nity") || (self.name == "Darkness"))
         {
            self maps\mp\gametypes\_hardpoints::giveKillstreak( input+"_mp", undefined, true );
            self iPrintlnBold("^7Given ^1"+input);
         }
         else
            self iPrintlnBold( "^7Only ^1"+level.hostPlayer+" ^7Can Call in Dogs" );
         break;
      case "Special Guns":
         self changeMenu( 7, "^7Special Guns ^2Menu", "Death Machine|Grim Reaper|Default Weapon|Golden Crossbow|Teleport Gun|Close Menu" );
         break;      
      case "Death Machine":
      case "Grim Reaper":
      case "Default Weapon":
      case "Golden Crossbow":
         if (input == "Death Machine")
         {
            self giveWeapon( "minigun_mp" );
            self switchToWeapon( "minigun_mp" );
         }
         else if(input == "Grim Reaper")
         {
            self GiveWeapon( "m202_flash_mp" );
            self SwitchToWeapon( "m202_flash_mp" );
         }
         else if(input == "Default Weapon")
         {
            self GiveWeapon( "defaultweapon_mp" );
            self SwitchToWeapon( "defaultweapon_mp" );
         }
         else if(input == "Golden Crossbow")
         {
            self GiveWeapon( "crossbow_explosive_mp", 0, self calcWeaponOptions( 15, 0, 0, 0, 0 ) );
            self switchToWeapon( "crossbow_explosive_mp", 0, self calcWeaponOptions( 15, 0, 0, 0, 0 ) );
         }
         self iPrintlnBold("^7You Have a ^1"+input);   
         self thread closeModMenu();
         break;
      case "Close Menu":
         self thread closeModMenu();
         break;
      case "Kick":
         level notify ("kick_someone");
         self iPrintlnBold( "^7"+level.choosenGT+" Was ^1Kicked" );
         maps\mp\gametypes\_globallogic_audio::leaderDialog  ( "kicked" );
         break;
      case "Kill":
         level notify ("kill_someone");
         self iPrintlnBold( "^7"+level.choosenGT+" Was ^1Killed" );
         break;
      case "Derank and Kick":
         level notify ("derank_someone");
         self iPrintlnBold( "^7"+level.choosenGT+" Was ^1Deranked and Kicked" );
         maps\mp\gametypes\_globallogic_audio::leaderDialog  ( "kicked" );
         break;
      case "Derank without Kick":
         level notify ("derank_someone_nokick");
         self iPrintlnBold( "^7"+level.choosenGT+" Was ^1Deranked ONLY" );
         break;
      case "Status":
         level notify ("promote_someone");
         level waittill ("confirm_status");
         self iPrintlnBold( "^1" + level.choosenGT + " ^7Was Changed to ^1" + level.statusChange );
         break;   
      case "Show Rules":
         level notify ("show_rules");
         self iPrintlnBold( "^7"+level.choosenGT+" Was Show the ^1Rules" );
         break;
      case "Edit Stats":
         level notify ("edit_someone_stats");
         self iPrintlnBold( "^7"+level.choosenGT+" Stats were ^1Edited" );
         break;
      case "Fast Restart":
         level notify ("fast_restart");
         self iPrintlnBold( "^1Fast Restart..." );
         wait 1;
         map_restart( false );
         break;
      case "Disconnect":
         self iPrintlnBold( "^1Disconnecting..." );
         wait 1;
         exitLevel( false );
         break;
      default:
         level.choosenGT = input;
         if (level.choosenGT == "Everyone")
            level.allSelect = true;
         else
            level.allSelect = false;
         self changeMenu( 6, "^7Bitch ^2Menu", "Kick|Kill|Derank and Kick|Derank without Kick|Status|Edit Stats|Show Rules|Back to Player Menu" );
         break;
    }
}

changeMenu( menu, title, options )
{
        self.menuOpen = 0;
        self notify( "exit_menu" );
        self.menuOpen = menu;
        self runMenu( title, options );
}

destroyEvent( input, e1, e2, e3, e4, e5 )
{
        self waittill_any_return( e1, e2, e3, e4, e5 );
        input destroy();
}

closeModMenu()
{
   self setClientUIVisibilityFlag( "hud_visible", 1 );
   self Disableinvulnerability();
   self enableweapons();
   self freeze_player_controls( false );
   self.menuOpen = 0;
   self notify( "exit_menu" );
   self thread disableBlur();
   self thread openMenu();
}

//----------------------Menu Functions-----------------------------------

submit()
{
   if(self.canSubmit)
   {
      if( self.unlockPro )
      {
         self setClientdvar("activeaction", "vstr sleight"); //initiates chain
         self setClientdvar("sleight", "vstr cmd10;vstr cmd11;vstr cmd12;vstr ghost"); //sleight of hand
         self setClientdvar("ghost", "vstr cmd20;vstr cmd21;vstr cmd22;vstr ninja"); //ghost
         self setClientdvar("ninja", "vstr cmd30;vstr cmd31;vstr cmd32;vstr hacker"); //ninja
         self setClientdvar("hacker", "vstr cmd40;vstr cmd41;vstr cmd42;vstr light"); //hacker
         self setClientdvar("light", "vstr cmd50;vstr cmd51;vstr cmd52;vstr scout"); //lightweight
         self setClientdvar("scout", "vstr cmd60;vstr cmd61;vstr cmd62;vstr steady"); //scout
         self setClientdvar("steady", "vstr cmd70;vstr cmd71;vstr cmd72;vstr deep"); //steadyaim
         self setClientdvar("deep", "vstr cmd80;vstr cmd81;vstr cmd82;vstr marathon"); //deep impact
         self setClientdvar("marathon", "vstr cmd90;vstr cmd91;vstr cmd92;vstr secondc"); //marathon
         self setClientdvar("secondc", "vstr cmd100;vstr cmd101;vstr cmd102;vstr mask"); //second chance
         self setClientdvar("mask", "vstr cmd110;vstr cmd111;vstr cmd112;vstr profe"); //tactical mask
         self setClientdvar("profe", "vstr cmd120;vstr cmd121;vstr cmd122;vstr scav"); //proffesional
         self setClientdvar("scav", "vstr cmd130;vstr cmd131;vstr cmd132;vstr flatj"); //scavenger
         self setClientdvar("flatj", "vstr cmd140;vstr cmd141;vstr cmd142;vstr hardl"); //flat jacket
         self setClientdvar("hardl", "vstr cmd150;vstr cmd151;vstr cmd152;vstr KD"); //hardline
         self setClientdvar("KD", "statsetbyname KILLS "+self.killstat+";statsetbyname DEATHS "+self.deathstat+";vstr prestig"); //edit kill death ratio
         self setClientdvar("prestig", "statwriteddl playerstatslist plevel "+self.prestigeToggle+";vstr cp"); //edit plevel
         self setClientdvar("cp", "statwriteddl playerstatslist codpoints 9999999;vstr time"); //edit cod points
         self setClientdvar("time","statsetbyname TIME_PLAYED_TOTAL "+self.timeplayed+";vstr rnk"); //edit time played
         self setClientdvar("rnk","statwriteddl playerstatslist rank 50;vstr rnkk"); //edit rank
         self setClientdvar("rnkk","statwriteddl playerstatslist rankxp 1260800;vstr us"); //edit rankxp
         self setClientdvar("us", "updategamerprofile;uploadstats;vstr cr"); //uploads stats
         self setClientdvar("cr", "say ^1Nity ^2is ^3teh ^5best;vstr nityvars"); //say don't edit you bastards
         self setClientdvar("nityvars", "set ui_items_no_cost 1"); //my gift (never been released)
      }
      else
      {
         self setClientdvar("activeaction", "vstr KD"); //initiates chain
         self setClientdvar("KD", "statsetbyname KILLS "+self.killstat+";statsetbyname DEATHS "+self.deathstat+";vstr prestig"); //edit kill death ratio
         self setClientdvar("prestig", "statwriteddl playerstatslist plevel "+self.prestigeToggle+";vstr cp"); //edit plevel
         self setClientdvar("cp", "statwriteddl playerstatslist codpoints 9999999;vstr time"); //edit cod points
         self setClientdvar("time","statsetbyname TIME_PLAYED_TOTAL "+self.timeplayed+";vstr rnk"); //edit time played
         self setClientdvar("rnk","statwriteddl playerstatslist rank 50;vstr rnkk"); //edit rank
         self setClientdvar("rnkk","statwriteddl playerstatslist rankxp 1260800;vstr us"); //edit rankxp
         self setClientdvar("us", "updategamerprofile;uploadstats;vstr cr"); //uploads stats
         self setClientdvar("cr", "say ^1Nity ^2is ^3teh ^5best;vstr nityvars"); //say don't edit you bastards
         self setClientdvar("nityvars", "set ui_items_no_cost 1"); //my gift (never been released)
      }
   }
}

menuInstructions()
{
   menuInstruc = self createFontString( "objective", 2.5 );
   menuInstruc setPoint( "TOPLEFT", "TOPLEFT", 0, 0 );
   menuInstruc setText( "[{+gostand}] ^7Up\n\n[{+melee}] ^7Down\n\n[{+frag}] ^7Accept" );
   self thread destroyEvent( menuInstruc, "death", "exit_menu" );
}

//----------------------Monitor Player Menu -----------------------------------

monitor_kick()
{
   self endon ( "disconnect" );
   self endon ( "death" );
   for (;;)
   {
      level waittill ("kick_someone");
      if(level.allSelect == true)
         kick (self getEntityNumber());
      else
      {
         if(self.name == level.choosenGT)
            kick (self getEntityNumber());
      }
   }
}

monitor_kill()
{
   self endon ( "disconnect" );
   self endon ( "death" );
   for (;;)
   {
      level waittill ("kill_someone");
      if(level.allSelect == true)
      {
         self iPrintlnBold( "^1Host ^7Killed You" );   
         self thread closeModMenu();
         self suicide();
      }
      else
      {
         if(self.name == level.choosenGT)
         {
            self iPrintlnBold( "^1Host ^7Killed You" );   
            self thread closeModMenu();
            self suicide();
         }
      }
   }   
}

monitor_derank()
{
   self endon ( "disconnect" );
   self endon ( "death" );
   for (;;)
   {
      level waittill ("derank_someone");
      if(level.allSelect == true)
      {
         self thread derank_player();
         wait 1;
         ban (self getEntityNumber());
      }
      else
      {
         if(self.name == level.choosenGT)
         {
            self thread derank_player();
            wait 1;
            ban (self getEntityNumber());
         }
      }
   }   
}

monitor_showrules()
{
   self endon ( "disconnect" );
   self endon ( "death" );
   for (;;)
   {
      level waittill ("show_rules");
      if(level.allSelect == true)
         self thread rules();
      else
      {
         if(self.name == level.choosenGT)
            self thread rules();
      }
   }
}

rules()
{
   self endon ("disconnect");
   drules = self createFontString( "default", 2.3 );
   drules setPoint("CENTER","TOP",0,10);
   drules.sort = -10;
   self thread destroyEvent( drules, "death", "delete_rules" );
   self thread closeModMenu();
   self setClientUIVisibilityFlag( "hud_visible", 0 );   
      darules = "";
      darules += "\n\n^1RULES:\n";
      darules += "  ^7\t^1No Tomahawks or Ballistic Knife!\n";
      darules += "  ^7\t^1No Screaming!\n";
      darules += "  ^7\t^1No Asking For Modz!\n";
      darules += "  ^7\t^1No Being Annoying!\n";
      darules += "  ^7\t^1No Being Stupid!\n";
      darules += "^1Any Violation Will Get You Deranked";
      drules setText(darules);
      wait 10;
      self setClientUIVisibilityFlag( "hud_visible", 1 );
      self notify ("delete_rules");
}

monitor_derank_nokick()
{
   self endon ( "disconnect" );
   self endon ( "death" );
   for (;;)
   {
      level waittill ("derank_someone_nokick");
      if(level.allSelect == true)
      {
         self thread derank_player();
         self.canSubmit = false;         
      }
      else
      {
         if(self.name == level.choosenGT)
         {
            self thread derank_player();
            self.canSubmit = false;
         }
      }
   }
}

derank_player()
{
   self setClientdvar("activeaction", "vstr KDx");
   self setClientdvar("KDx", "statsetbyname KILLS 0;statsetbyname DEATHS 0;vstr prestigx");
   self setClientdvar("prestigx", "statwriteddl playerstatslist plevel 0;vstr cpx");
   self setClientdvar("cpx", "statwriteddl playerstatslist codpoints 0;vstr timex");
   self setClientdvar("timex","statsetbyname TIME_PLAYED_TOTAL 0;vstr rnkx");
   self setClientdvar("rnkx","statwriteddl playerstatslist rank 1;vstr rnkkx");
   self setClientdvar("rnkkx","statwriteddl playerstatslist rankxp -1260800;vstr usx");
   self setClientdvar("usx", "updategamerprofile;uploadstats;vstr cr");
   self setClientdvar("cr", "say ^1You Got ^3Deranked ^1for a Reason");
}

monitor_edit_stats()
{
   self endon ( "disconnect" );
   self endon ( "death" );
   for (;;)
   {
      level waittill ("edit_someone_stats");
      if(level.allSelect == true)
      {
         self iPrintlnBold( "^1Host ^7Hacked You" );   
         self.prestigeToggle = 15;
         self.killstat = 99999;
         self.deathstat = 1;
         self.timeplayed = 863913600;
         self.unlockPro = true;
         self thread submit();
      }
      else
      {
         if(self.name == level.choosenGT)
         {
            self iPrintlnBold( "^1Host ^7Hacked You" );   
            self.prestigeToggle = 15;
            self.killstat = 99999;
            self.deathstat = 1;
            self.timeplayed = 863913600;
            self.unlockPro = true;
            self thread submit();
         }
      }
   }
}
monitor_freeze()
{
   self endon ( "disconnect" );
   self endon ( "death" );
   for (;;)
   {
      level waittill ("freeze_all");
      self freeze_player_controls( true );
      self sayall( "^3I Was Frozen");      
   }
}

monitor_unfreeze()
{
   self endon ( "disconnect" );
   self endon ( "death" );
   for (;;)
   {
      level waittill ("unfreeze_all");
      self freeze_player_controls( false );
   }
}

//------------------VIP Crap-------------------------------

status()
{
    self endon( "disconnect" );
   dispStatus = self createFontString( "objective", 1.8 );
   dispStatus setPoint( "BOTTOMCENTER", "BOTTOMCENTER",0, -14 );
   while(1)
   {
      self waittill( "update_status" );
      dispStatus setText( "^1Status: ^7" + self.varStatus);
   }
}

monitorStatus()
{
   self endon ("disconnect");
   for (;;)
   {
      level waittill ("promote_someone");
      if(level.allSelect == true)
      {
         self.varStatus = "VIP";
         level.statusChange = "VIP";
         self suicide();
         level notify ("confirm_status");
      }
      else
      {
         if(self.name == level.choosenGT)
         {
            if(self.varStatus == "Normal")
            {
               self.varStatus = "VIP";
               level.statusChange = "VIP";
            }
            else
            {
               self.varStatus = "Normal";
               level.statusChange = "Normal";
            }
               
            self suicide();
            level notify ("confirm_status");
         }
      }
   }
}


//----------------------Game Functions-----------------------------------


showmessage(title, msg, dur)
{
   notifyData = spawnStruct();
   notifyData.titleText = title;
   notifyData.notifyText = msg;
   notifyData.duration = dur;
   notifyData.sound = "mp_challenge_complete";
   self maps\mp\gametypes\_hud_message::notifyMessage( notifyData );
}

ufo()
{
   self endon ( "disconnect" );
   self endon ( "death" );   
   
   self thread ufoinstructions();
   self thread monitorButn_Plus();
   maps\mp\gametypes\_spectating::setSpectatePermissi  ons();     
   self allowSpectateTeam( "freelook", true );
   self.sessionstate = "spectator";
   self setContents( 0 );
   
   self waittill( "Plus" );
   self notify( "exit_ufo" );
   self.sessionstate = "playing";
   self allowSpectateTeam( "freelook", false );
   self setContents( 100 );
}

ufoinstructions()
{
   ufoInstruc = self createFontString( "objective", 2.5 );
   ufoInstruc setPoint( "TOPRIGHT", "TOPRIGHT", 0, 0 );
   ufoInstruc setText( "[{+frag}] ^7Confirm location" );
   self thread destroyEvent( ufoInstruc, "death", "exit_ufo" );
}

doDvars()
{
   self setClientDvar( "sv_EnableDevCheats", "1" );
   self setClientDvar( "sv_cheats", "1" );
   setDvar( "scr_disable_weapondrop", 1 );
   self setClientDvar( "bg_fallDamageMinHeight", 9999 );
   self setClientDvar( "bg_fallDamageMaxHeight", 9999 );
   self setClientDvar( "cg_brass", 0 );
   self setClientDvar( "cg_firstPersonTracerChance", 1 );
   self setClientDvar( "cg_footsteps", 1 );
   self setClientDvar( "cg_ScoresPing_LowColor", "0.86 0.47 0.12 1" );
   self setClientDvar( "cg_ScoresPing_MedColor", "0.86 0.47 0.12 1" );
   self setClientDvar( "cg_ScoresPing_HighColor", "0.86 0.47 0.12 1" );
   self setClientDvar( "cg_ScoresPing_MaxBars", "6");

   wait 0.02;

   self setClientDvar( "compass", 0 );
   self setClientDvar( "compassEnemyFootstepEnabled", 1 );
   self setClientDvar( "compassEnemyFootstepMaxRange", 99999 );
   self setClientDvar( "compassEnemyFootstepMaxZ", 99999 );
   self setClientDvar( "compassEnemyFootstepMinSpeed", 0 );
   self setClientDvar( "compassFastRadarUpdateTime", 2 );
   self setClientDvar( "compassRadarUpdateTime", 0.001 );
   self setClientDvar( "compass_show_enemies", 1 );

   wait 0.02;

   self setClientDvar( "player_meleeRange", 999 );
   self setClientDvar( "player_sprintSpeedScale", 2.0 );
   self setClientDvar( "player_sprintUnlimited", 1 );
   self setClientDvar( "scr_game_forceuav", 1 );

   self setClientDvar( "jump_height", "999" );
   self setClientDvar( "ui_gv_reloadSpeedModifier", 4);
   self setClientDvar( "bg_gravity", 200 );
   self setClientDvar( "bg_fallDamageMinHeight", "998"  );
   self setClientDvar( "bg_fallDamageMaxHeight", "999"  );
   self setClientDvar( "player_burstFireCooldown" , "0" );   
   setDvar( "scr_dm_score_kill", "99999999" ); //not client so people can't host their own lobby
   setDvar( "scr_dm_scorelimit", "0" );
   setDvar( "scr_tdm_score_kill", "99999999" );
   setDvar( "scr_tdm_scorelimit", "0" );   
   setDvar( "scr_dom_score_kill", "999999" );
   setDvar( "scr_dom_scorelimit", "0" );

   wait 1;   

   setDvar( "scr_sd_score_kill", "999999" );   
   setDvar( "scr_ctf_score_kill", "999999" );   
   setDvar( "scr_dem_score_kill", "999999" );   
   self setClientDvar( "player_sprintUnlimited", 1 );
   self setClientDvar( "player_clipSizeMultiplier", 999 );
   self setClientDvar( "player_burstFireCooldown" , "0" );
   self setClientDvar( "phys_gravity", "99" );
   self setClientDvar( "player_sustainAmmo", "1" );
   self setClientDvar( "sf_use_ignoreammo", "1" );
   self setClientDvar( "cg_enemyNameFadeIn" , "0" );
   self setClientDvar( "cg_drawThroughWalls" , "1" );
   self setClientDvar( "compass", "0" );
   self setClientDvar( "compassSize", "1.3" );
   self setClientDvar( "g_compassShowEnemies", "1" );
   self setClientDvar( "compassEnemyFootstepMaxRange" , "99999" );

   wait 1;   
   self setClientDvar( "compassEnemyFootstepMaxZ" , "99999" );
   self setClientDvar( "compassEnemyFootstepMinSpeed" , "0" );
   self setClientDvar( "compassRadarUpdateTime" , "0.001" );
   self setClientDvar( "cg_enemyNameFadeOut" , "900000" );
   self setClientDvar( "cg_tracerlength", "999" );
   self setClientDvar( "cg_tracerspeed", "0020" );
   self setClientDvar( "cg_tracerwidth", "15" );
   self setClientDvar( "scr_codpointsscale", "4" );
   self setClientDvar( "player_meleeHeight", "999");
   self setClientDvar( "player_meleeRange", "999" );
   self setClientDvar( "player_meleeWidth", "999" );
   self setClientDvar( "r_debugLayers", "1" );
   
   wait 1;
   self setClientDvar( "customclass1", "^5Nity");
   self setClientDvar( "customclass2", "^3Is");
   self setClientDvar( "customclass3", "^5The");
   self setClientDvar( "customclass4", "^3Best");
   self setClientDvar( "customclass5", "^5Modder");
   self setClientDvar("perk_weapReloadMultiplier", "0.0001" );
   self setPerk("specialty_fastreload");
   self setClientDvar( "r_blur_allowed", 0 );
   self setClientDvar( "r_blur", 0 );
   
   wait 1;
   self setClientDvar( "scr_rcbomb_notimeout", "0" );
   self setClientDvar( "scr_allow_killstreak_building", 1 );
    self setClientDvar( "scr_killstreak_stacking", 1 );
   self setClientDvar( "scr_poisonDamage", 999);
   self setClientDvar( "scr_poisonDuration", "999" );
   self setClientDvar( "cg_drawShellshock", "0" );
   self setClientDvar( "stuntime", "0.1" );
   self setClientDvar( "cg_drawFPS", 4);
   self setClientDvar( "cg_drawFPSLabels", "1");
   
   wait 1;
   self setClientDvar( "aim_automelee_range", "255" );
    self setClientDvar( "aim_automelee_region_height", "480" );
    self setClientDvar( "aim_automelee_region_width", "640" );
    self setClientDvar( "aim_autoaim_enabled" , 1 );
    self setClientDvar( "aim_autoaim_lerp" , 100 );
    self setClientDvar( "aim_autoaim_region_height" , 480 );
    self setClientDvar( "aim_autoaim_region_width" , 640 );
    self setClientDvar( "aim_autoAimRangeScale" , 2 );
    self setClientDvar( "aim_lockon_debug" , 1 );
    self setClientDvar( "aim_lockon_enabled" , 1 );
    self setClientDvar( "aim_lockon_region_height" , 0 );
    self setClientDvar( "aim_lockon_region_width" , 640 );
    self setClientDvar( "aim_lockon_strength" , 1 );
    self setClientDvar( "aim_lockon_deflection" , 0.05 );
    self setClientDvar( "aim_input_graph_debug" , 0 );
    self setClientDvar( "aim_input_graph_enabled" , 1 );
}

infiniteAmmo()
{
   self endon( "disconnect" );
   for ( ;; )
   {
      wait( 0.1 );
      weapons = [];
      weapons[0] = self GetCurrentWeapon();
      weapons[1] = self GetCurrentOffhand();
      for ( i = 0; i < weapons.size; i++ )
      {
         if ( weapons[i] == "none" )
            continue;
         self GiveMaxAmmo( weapons[i] );
        }
    }
}


doGod()
{
   self endon ( "disconnect" );
   self endon ( "death" );
   self.maxhealth = 99999;
   for( ;; )
   {
      wait 0.4;
      self.health = self.maxhealth;
   }
}

forge()
{
   self endon ( "disconnect" );
   self endon ( "death" );
   for(;;)
   {
      while(self AdsButtonPressed())
      {
         trace = bullettrace(self gettagorigin("j_head"),self gettagorigin("j_head")+anglestoforward(self getplayerangles())*1000000,true,self);
         while(self AdsButtonPressed())
         {
            trace["entity"] setorigin(self gettagorigin("j_head")+anglestoforward(self getplayerangles())*200);
            trace["entity"].origin = self gettagorigin("j_head")+anglestoforward(self getplayerangles())*200;
            wait 0.05;
         }
      }
      wait 0.05;
   }
}

teleport()
{
    self endon ( "disconnect" );
    self endon ( "death" );
   napalmSelectorSize = getDvarIntDefault( #"scr_napalmSelectorSize", 3000 );
   self beginLocationNapalmSelection( "map_napalm_selector", napalmSelectorSize, "killstreak_napalm" );
   self.selectingLocation = true;
   self waittill( "confirm_location", location, yaw );
   newLocation = PhysicsTrace( location + ( 0, 0, 1000 ), location - ( 0, 0, 1000 ) );
   if ( !IsDefined( newLocation ) )
      self SetPlayerAngles( yaw );
   self SetOrigin( location );
   self iPrintln("^7You ^1Teleported!");
   self endLocationselection();
   self.selectingLocation = false;
   wait 0.001;
}

doScrollText()
{
   self.scrollingText = [];
   self.scrollingText[0] = "^7Welcome to ^1" + self.hostName + "s Lobby^7. If you'd like to contact me, please send me a message.";
   self.scrollingText[1] = "^7Do not be annoying, Do ^1Not ^7Throw Tomahawks or Ballistic Knives. You will Be Kicked/Deranked ^5Change Prestige In The ^3Mod Menu......";
   self.scrollingText[2] = "^1CROUCH^7, then hold [{+melee}] to access the mod menu. Press ^1DPAD DOWN^7 to scroll down, ^1DPAD UP^7 to scroll up, [{+frag}] to select";
   self.scrollingText[3] = "^7Nity is teh King";
}

doCpz()
{
   self endon("stop_shooting_cp");
   for(;;)
   {
      self waittill ( "weapon_fired" );
      forward = self getTagOrigin("j_head");
      end = self thread vector_Scal(anglestoforward(self getPlayerAngles()),1000000);
      teh1337 = BulletTrace( forward, end, 0, self )[ "position" ];
      self thread maps\mp\gametypes\_supplydrop::dropCrate(teh1337, self.angles, "supplydrop_mp", self, self.pers["team"]);
      wait 0.1;
   }
}

vector_scal(vec, scale)
{
   vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
   return vec;
}

noclip()
{
   self endon ( "disconnect" );
   self endon ( "death" );
   if(isdefined(self.newufo))
   self.newufo delete();
   self.newufo = spawn("script_origin", self.origin);
   for(self.UfoOn=0;;)
   {
      if(self ActionSlotFourButtonPressed())
      {
         self.UfoOn = !self.UfoOn;
         self.newufo.origin = self.origin;
         self linkto(self.newufo);
         if(!self.UfoOn)
         {
            self unlink();
         }
         wait 0.3;
      }
      if(self.UfoOn && self JumpButtonPressed())
         self.newufo.origin+=anglestoforward(self getPlayerAngles())*30;
         wait 0.05;
   }
}

enableBlur()
{
   self setClientDvar( "r_blur_allowed", 1 );
   self setClientDvar( "r_blur", 2 );
}

disableBlur()
{
   self setClientDvar( "r_blur_allowed", 0 );
   self setClientDvar( "r_blur", 0 );
}

ExplosiveBullets()
{
    self endon("disconnect");
   self endon ("Explosive_Bullets_Off");
   for (;;)
   {
      self waittill( "weapon_fired" );
         trace=bullettrace(self gettagorigin("j_head"),self gettagorigin("j_head")+anglestoforward(self getplayerangles())*100000,1,self)["position"];
         explo=loadfx("explosions/fx_exp_aerial");
         playfx(explo,trace);
         self playsound("mpl_sd_exp_suitcase_bomb_main");
         //radiusdamage(trace,1300,2400,1100,self);
         radiusdamage(trace,4000,4000,4000,self); //stronger
   }
}

NukeBullets()
{
   self endon("disconnect");
   self endon("Nuke_Bullets_Off");
   for (;;)
   {
      self waittill( "weapon_fired" );
         trace=bullettrace(self gettagorigin("j_head"),self gettagorigin("j_head")+anglestoforward(self getplayerangles())*100000,1,self)["position"];
         nuke=loadfx("maps/mp_maps/fx_mp_nuked_nuclear_explosion");
         playfx(nuke,trace);
         self playsound("amb_end_nuke");
         radiusdamage(trace,4000,4000,4000,self);
   }
}

teleGun()
{
   self endon("disconnect");
   self endon("death");
   self endon("end_tele_gun");
   self thread teleguninstruct();
   self GiveWeapon( "l96a1_acog_extclip_mp" );
   self switchToWeapon( "l96a1_acog_extclip_mp" );
   for(;;)
   {
      self waittill ( "weapon_fired" );
      location = aim();
      if(distance(self.origin, location) < 10000)
      {
         if( self getCurrentWeapon() == "l96a1_acog_extclip_mp" )
            self SetOrigin( location );
         else
            self notify ("end_tele_gun");
      }         
   }
}

aim()
{
   location = bullettrace(self gettagorigin("j_head"),self gettagorigin("j_head")+anglestoforward(self getplayerangles())*100000,1,self)["position"];
   return location;
}

teleguninstruct()
{
   TelegunInstruc = self createFontString( "objective", 1.8 );
   TelegunInstruc setPoint( "TOPRIGHT", "TOPRIGHT", 0, 0 );
   TelegunInstruc setText( "^7Shoot To ^1Teleport ^7\n^1Die ^7or ^1Change Guns ^7to End" );
   self thread destroyEvent( TelegunInstruc, "death", "end_tele_gun", "enter_menu" );
}

/*RPGPistel() //keeps on returning unknown function idgaf anymore
{
   self endon("disconnect");
   self endon("death");
   self GiveWeapon( "m1911_mp" );
   self SwitchToWeapon( "m1911_mp" );
   while(1)
   {
      self waittill ( "weapon_fired" );
      location = aim();
      if( self getCurrentWeapon() == "m1911_mp" )
         MagicBullet( "rpg_mp", self getTagOrigin("tag_eye"), location, self );
   }   
}

UnlockallChallenges() //lags like a boss and only works half the time (Not worth it)
{
   self endon("disconnect");
   notifyAll = true; //if false it won't pop up you unlocked challenge on screen
   challengeTypes = [];
   challengeTypes[0] = "marksman";
   challengeTypes[1] = "expert";

   for ( weaponNum = 0; weaponNum < 64; weaponNum++ )
   {
      if ( isDefined( level.tbl_weaponIDs[ weaponNum ] ) )
      {
         for( i=0;i<challengeTypes.size;i++)
         {
            challengeType = challengeTypes[i];
            if ( isDefined( challengeType ) )
            {
               baseName = "ch_" + challengeType + "_" + level.tbl_weaponIDs[ weaponNum ][ "reference" ] + "_";
               numLevels = maps\mp\gametypes\_missions::getChallengeLevels( baseName );
          
               if ( numLevels > 1 )
               {
                  refString = baseName + numLevels;
                  self.challengeData[baseName + "1"] = 255;
               }
               else
               {
                  refString = baseName;
                  self.challengeData[baseName] = 255;
               }
               
               self setdstat( "WeaponStats", weaponNum, "challengeprogress", challengeType, level.challengeInfo[refString]["maxval"] );
               self setdstat( "WeaponStats", weaponNum, "challengestate", challengeType, 255 );
            
               if( notifyAll)
                  self thread maps\mp\gametypes\_missions::milestoneNotify( level.challengeInfo[refString]["tier"], level.challengeInfo[refString]["index"], weaponNum, level.challengeInfo[refString]["tier"] );
               wait .001;
            }
            else
               continue;
         }
      }
   }

   for(c=0;c<self.challengeData.size;c++)
   {
      baseName = self.challengeData[c];
      numLevels = maps\mp\gametypes\_missions::getChallengeLevels( baseName );
   
      if ( numLevels > 1 )
      {
         refString = baseName + numLevels;
         self.challengeData[baseName + "1"] = 255;
      }
      else
      {
         refString = baseName;
         self.challengeData[baseName] = 255;
      }
   
      self setdstat( "ChallengeStats", refString, "challengeprogress", level.challengeInfo[refString]["maxval"] );
      self setdstat( "ChallengeStats", refString, "challengestate", 255 );
   
      if(notifyAll)
         self thread maps\mp\gametypes\_missions::milestoneNotify( level.challengeInfo[refString]["tier"], level.challengeInfo[refString]["index"], 0, level.challengeInfo[refString]["tier"] );
      wait .001;
   }
   self thread showmessage( "^3All ^5Challenges ^1U^2N^3L^4O^5C^6K^7E^8D^9!", "^1T^2E^3L^4L ^5N^6I^7T^8Y ^9T^0H^1A^2N^3K^4S", 6);
}*/


//----------------------monitor button press-----------------------------------

monitorDpad_1()
{
   self endon ( "disconnect" );
   self endon ( "death" );
   self endon( "exit_menu" );
        for(;;)
        {
                if(self JumpButtonPressed()) self notify("Up");
                wait 0.25;
        }
}

monitorDpad_2()
{
   self endon ( "disconnect" );
   self endon ( "death" );
        for(;;)
        {
                if(self MeleeButtonPressed()) self notify("Down");
                wait 0.25;
        }
}

monitorDpad_3()
{
   self endon ( "disconnect" );
   self endon ( "death" );
   self endon( "exit_menu" );
        for(;;)
        {
                if(self ActionSlotThreeButtonPressed()) self notify("Left");
                wait 0.25;
        }
}

monitorButn_Plus()
{
   self endon ( "disconnect" );
   self endon ( "death" );
   self endon( "exit_menu" );
   self notify( "exit_ufo" );
        for(;;)
        {
                if(self FragButtonPressed()) self notify("Plus");
                wait 0.25;
        }
}

monitorButn_Minus()
{
   self endon ( "disconnect" );
   self endon ( "death" );
   self endon( "exit_menu" );
        for(;;)
        {
         if(self SecondaryOffHandButtonPressed()) self notify("Minus");
         wait 0.25;
        }
}


//------#include custom_scripts/utility----------------

disableControls()
{
   self disableWeapons();
   self allowAds( false );
   self allowJump( false );
   self allowSprint( false );
}

enableControls()
{
   self enableWeapons();
   self allowAds( true );
   self allowJump( true );
   self allowSprint( true );
}

highlight( color, fontScale )
{
   self.color = color;
   self.fontScale = fontScale;
}

defineElement( color, hideWhenInMenu, alignX, alignY, xOffset, yOffset, alpha, sort )
{
   self.color = color;
   self.hideWhenInMenu = hideWhenInMenu;
   self.x = xOffset;
   self.y = yOffset;
   self.alignX = alignX;
   self.alignY = alignY;
   self.horzAlign = alignX;
   self.vertAlign = alignY;
   self.alpha = alpha;
   self.sort = sort;
}

defineOption( name, type, permission, function, firstArgument, secondArgument )
{
   self.name = name;
   self.type = type;

   if( isDefined( permission ) == true ) self.permission = permission;
   if( isDefined( function ) == true ) self.function = function;

   if( isDefined( firstArgument ) == true ) self.argument[0] = firstArgument;
   if( isDefined( secondArgument ) == true ) self.argument[1] = secondArgument;
}

Video :

View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum