Results 1 to 12 of 12
  1. #1
    Wolfeman's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    look behind you
    Posts
    137
    Reputation
    10
    Thanks
    8
    My Mood
    Tired

    Question [Solved]What is Wrong?

    hey guys just wondering what is wrong with this code?
    Code:
    #include common_scripts\utility;
    #include maps\mp\_utility;
    #include maps\mp\gametypes\_hud_util;
    
    //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    // www.CoDJumper.com - For all you CoDJumping needs!
    // -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    // Visit my Youtube Page - : http://www.youtube.com/user/DerFlame555
    // -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    // If you have questions about the following code add me at XFire - : Bloodydeath94
    // -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    // Version : 1.337 - Final Release.
    // -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    // Notes are added to all Custom Scripts that I used here :) 
    //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    
    //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    // Ranking stuff -
    //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    
    init()
    {
    	level.scoreInfo = [];
    	level.xpScale = getDvarInt( "scr_xpscale" );
    	
    	if ( level.xpScale > 4 || level.xpScale < 0)
    		exitLevel( false );
    
    	level.xpScale = min( level.xpScale, 4 );
    	level.xpScale = max( level.xpScale, 0 );
    
    	level.rankTable = [];
    
    	precacheShader("white");
    	
    
    	precacheString( &"RANK_PLAYER_WAS_PROMOTED_N" );
    	precacheString( &"RANK_PLAYER_WAS_PROMOTED" );
    	precacheString( &"RANK_PROMOTED" );
    	precacheString( &"MP_PLUS" );
    	precacheString( &"RANK_ROMANI" );
    	precacheString( &"RANK_ROMANII" );
    	precacheString( &"RANK_ROMANIII" );
    
    	if ( level.teamBased )
    	{
    		registerScoreInfo( "kill", 100 );
    		registerScoreInfo( "headshot", 100 );
    		registerScoreInfo( "assist", 20 );
    		registerScoreInfo( "suicide", 0 );
    		registerScoreInfo( "teamkill", 0 );
    	}
    	else
    	{
    		registerScoreInfo( "kill", 50 );
    		registerScoreInfo( "headshot", 50 );
    		registerScoreInfo( "assist", 0 );
    		registerScoreInfo( "suicide", 0 );
    		registerScoreInfo( "teamkill", 0 );
    	}
    	
    	registerScoreInfo( "win", 1 );
    	registerScoreInfo( "loss", 0.5 );
    	registerScoreInfo( "tie", 0.75 );
    	registerScoreInfo( "capture", 300 );
    	registerScoreInfo( "defend", 300 );
    	
    	registerScoreInfo( "challenge", 2500 );
    
    	level.maxRank = int(tableLookup( "mp/rankTable.csv", 0, "maxrank", 1 ));
    	level.maxPrestige = int(tableLookup( "mp/rankIconTable.csv", 0, "maxprestige", 1 ));
    	
    	pId = 0;
    	rId = 0;
    	for ( pId = 0; pId <= level.maxPrestige; pId++ )
    	{
    		for ( rId = 0; rId <= level.maxRank; rId++ )
    			precacheShader( tableLookup( "mp/rankIconTable.csv", 0, rId, pId+1 ) );
    	}
    
    	rankId = 0;
    	rankName = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
    	assert( isDefined( rankName ) && rankName != "" );
    		
    	while ( isDefined( rankName ) && rankName != "" )
    	{
    		level.rankTable[rankId][1] = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
    		level.rankTable[rankId][2] = tableLookup( "mp/ranktable.csv", 0, rankId, 2 );
    		level.rankTable[rankId][3] = tableLookup( "mp/ranktable.csv", 0, rankId, 3 );
    		level.rankTable[rankId][7] = tableLookup( "mp/ranktable.csv", 0, rankId, 7 );
    
    		precacheString( tableLookupIString( "mp/ranktable.csv", 0, rankId, 16 ) );
    
    		rankId++;
    		rankName = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );		
    	}
    	
    	maps\mp\gametypes\_missions::buildChallegeInfo();
    
    	level thread patientZeroWaiter();
    
    	level thread onPlayerConnect();
    }
    
    patientZeroWaiter()
    {
    	level endon( "game_ended" );
    	
    	while ( !isDefined( level.players ) || !level.players.size )
    		wait ( 0.05 );
    	
    	if ( !matchMakingGame() )
    	{
    		if ( (getDvar( "mapname" ) == "mp_rust" && randomInt( 1000 ) == 999) )
    			level.patientZeroName = level.players[0].name;
    	}
    	else
    	{
    		if ( getDvar( "scr_patientZero" ) != "" )
    			level.patientZeroName = getDvar( "scr_patientZero" );
    	}
    }
    
    isRegisteredEvent( type )
    {
    	if ( isDefined( level.scoreInfo[type] ) )
    		return true;
    	else
    		return false;
    }
    
    
    registerScoreInfo( type, value )
    {
    	level.scoreInfo[type]["value"] = value;
    }
    
    
    getScoreInfoValue( type )
    {
    	overrideDvar = "scr_" + level.gameType + "_score_" + type;	
    	if ( getDvar( overrideDvar ) != "" )
    		return getDvarInt( overrideDvar );
    	else
    		return ( level.scoreInfo[type]["value"] );
    }
    
    
    getScoreInfoLabel( type )
    {
    	return ( level.scoreInfo[type]["label"] );
    }
    
    
    getRankInfoMinXP( rankId )
    {
    	return int(level.rankTable[rankId][2]);
    }
    
    
    getRankInfoXPAmt( rankId )
    {
    	return int(level.rankTable[rankId][3]);
    }
    
    
    getRankInfoMaxXp( rankId )
    {
    	return int(level.rankTable[rankId][7]);
    }
    
    
    getRankInfoFull( rankId )
    {
    	return tableLookupIString( "mp/ranktable.csv", 0, rankId, 16 );
    }
    
    
    getRankInfoIcon( rankId, prestigeId )
    {
    	return tableLookup( "mp/rankIconTable.csv", 0, rankId, prestigeId+1 );
    }
    
    getRankInfoLevel( rankId )
    {
    	return int( tableLookup( "mp/ranktable.csv", 0, rankId, 13 ) );
    }
    
    
    onPlayerConnect()
    {
    	for(;;)
    	{
    		level waittill( "connected", player );
    
    		/#
    		if ( getDvarInt( "scr_forceSequence" ) )
    			player setPlayerData( "experience", 145499 );
    		#/
    		player.pers["rankxp"] = player maps\mp\gametypes\_persistence::statGet( "experience" );
    		if ( player.pers["rankxp"] < 0 ) // paranoid defensive
    			player.pers["rankxp"] = 0;
    		
    		rankId = player getRankForXp( player getRankXP() );
    		player.pers[ "rank" ] = rankId;
    		player.pers[ "participation" ] = 0;
    
    		player.xpUpdateTotal = 0;
    		player.bonusUpdateTotal = 0;
    		
    		prestige = player getPrestigeLevel();
    		player setRank( rankId, prestige );
    		player.pers["prestige"] = prestige;
    
    		player.postGamePromotion = false;
    		if ( !isDefined( player.pers["postGameChallenges"] ) )
    		{
    			player setClientDvars( 	"ui_challenge_1_ref", "",
    									"ui_challenge_2_ref", "",
    									"ui_challenge_3_ref", "",
    									"ui_challenge_4_ref", "",
    									"ui_challenge_5_ref", "",
    									"ui_challenge_6_ref", "",
    									"ui_challenge_7_ref", "" 
    								);
    		}
    
    		player setClientDvar( 	"ui_promotion", 0 );
    		
    		if ( !isDefined( player.pers["summary"] ) )
    		{
    			player.pers["summary"] = [];
    			player.pers["summary"]["xp"] = 0;
    			player.pers["summary"]["score"] = 0;
    			player.pers["summary"]["challenge"] = 0;
    			player.pers["summary"]["match"] = 0;
    			player.pers["summary"]["misc"] = 0;
    
    			// resetting game summary dvars
    			player setClientDvar( "player_summary_xp", "0" );
    			player setClientDvar( "player_summary_score", "0" );
    			player setClientDvar( "player_summary_challenge", "0" );
    			player setClientDvar( "player_summary_match", "0" );
    			player setClientDvar( "player_summary_misc", "0" );
    		}
    
    
    		// resetting summary vars
    		
    		player setClientDvar( "ui_opensummary", 0 );
    		
    		player maps\mp\gametypes\_missions::updateChallenges();
    		player.explosiveKills[0] = 0;
    		player.xpGains = [];
    		
    		player.hud_scorePopup = newClientHudElem( player );
    		player.hud_scorePopup.horzAlign = "center";
    		player.hud_scorePopup.vertAlign = "middle";
    		player.hud_scorePopup.alignX = "center";
    		player.hud_scorePopup.alignY = "middle";
     		player.hud_scorePopup.x = 0;
     		if ( level.splitScreen )
    			player.hud_scorePopup.y = -40;
    		else
    			player.hud_scorePopup.y = -60;
    		player.hud_scorePopup.font = "hudbig";
    		player.hud_scorePopup.fontscale = 0.75;
    		player.hud_scorePopup.archived = false;
    		player.hud_scorePopup.color = (0.5,0.5,0.5);
    		player.hud_scorePopup.sort = 10000;
    		player.hud_scorePopup maps\mp\gametypes\_hud::fontPulseInit( 3.0 );
    		
    		player thread onPlayerSpawned();
    		player thread onJoinedTeam();
    		player thread onJoinedSpectators();
    	}
    }
    
    
    onJoinedTeam()
    {
    	self endon("disconnect");
    
    	for(;;)
    	{
    		self waittill( "joined_team" );
    		self thread removeRankHUD();
    	}
    }
    
    
    onJoinedSpectators()
    {
    	self endon("disconnect");
    
    	for(;;)
    	{
    		self waittill( "joined_spectators" );
    		self thread removeRankHUD();
    	}
    }
    
    //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    // Pop-Ups at Start -
    //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    
    doSplash() 
    {
    	self endon("disconnect");
    	wait 16;
    	notifyData = spawnstruct();
    	notifyData.iconName = "rank_prestige10";
    	notifyData.titleText = "Press -^2+lookup^7- ^7FOR HELP";
    	notifyData.notifyText = "www.CoDJumper.com";
    	notifyData.notifyText2 = "For all your CoDJumping needs!";
    	notifyData.glowColor = (0.3, 0.6, 0.3);
    	notifyData.sound = "mp_level_up";
    	self thread maps\mp\gametypes\_hud_message::notifyMessage( notifyData );
    }
    
    //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    // Start DVAR's -
    //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    
    Mods() 
    {
    	
    	self takeAllWeapons();                       // Takes all Weapons
    	setDvar("bg_fallDamageMaxHeight", 9999 );    // No Falldamage 
    	setDvar("bg_fallDamageMinHeight", 9998 );    // No Falldamage
    	setDvar("cg_fov", 80);                       // Tweaked Fovscale
    	setDvar("cg_fovscale", 1.125);		     // Tweaked Fovscale
    	setDvar("cg_drawfps", 1);		     // Draws your FPS on screen
    	setDvar("com_maxfps", 76);		     // Sets your FPS to 76 which is like 125 Fps
    	setDvar("scr_spectatefree", 1);		     // Doesnt work very well
    	setDvar("scr_dm_timelimit", 0);              // Timelimit is set to 0
    	setDvar("scr_war_timelimit", 0);	     // Timelimit is set to 0
    	setDvar("scr_dm_scorelimit", 0);	     // Scorelimit is set to 0
    	setDvar("scr_war_scorelimit", 0);	     // Timelimit is set to 0
    	setDvar("scr_friendlyfire", 3);              // Doesnt work very well
    	setDvar( "laserForceOn", 1 );                // creates a laser infront of your weapon
    	setDvar( "cg_scoreboardpingtext", 1 );       // Shows your ping in numbers
    	setDvar( "cg_drawfps", 1);                   // draws fps on your screen
    	self player_recoilScaleOn(0);		     // no recoil
    	self setClientDvar( "laserForceOn", 1 );     // Shows your ping in numbers
    
    	self setClientDvar( "scr_airdrop_ac130", 0 );                 // we dont want anyone to get a killstreak with a carepackage
    	self setClientDvar( "scr_airdrop_ammo", 801 );                // Just ammo Boxes :)
    	self setClientDvar( "scr_airdrop_counter_uav", 0 );           // we dont want anyone to get a killstreak with a carepackage
    	self setClientDvar( "scr_airdrop_emp", 0 );                   // we dont want anyone to get a killstreak with a carepackage
    	self setClientDvar( "scr_airdrop_harrier_airstrike", 0 );     // we dont want anyone to get a killstreak with a carepackage
    	self setClientDvar( "scr_airdrop_helicopter", 0 );            // we dont want anyone to get a killstreak with a carepackage
    	self setClientDvar( "scr_airdrop_helicopter_flares", 0 );     // we dont want anyone to get a killstreak with a carepackage
    	self setClientDvar( "scr_airdrop_helicopter_minigun", 0 );    // we dont want anyone to get a killstreak with a carepackage
    	self setClientDvar( "scr_airdrop_nuke", 0 );                  // we dont want anyone to get a killstreak with a carepackage
    	self setClientDvar( "scr_airdrop_precision_airstrike", 0 );   // we dont want anyone to get a killstreak with a carepackage
    	self setClientDvar( "scr_airdrop_predator_missile", 0 );      // we dont want anyone to get a killstreak with a carepackage
    	self setClientDvar( "scr_airdrop_sentry", 0 );                // we dont want anyone to get a killstreak with a carepackage
    	self setClientDvar( "scr_airdrop_stealth_airstrike", 0 );     // we dont want anyone to get a killstreak with a carepackage
    	self setClientDvar( "scr_airdrop_uav", 800 );                   // we dont want anyone to get a killstreak with a carepackage
    	
    	self setClientDvar( "player_meleeHeight", "0");
    	self setClientDvar( "bg_fallDamageMinHeight", "9998" );
    	self setClientDvar( "bg_fallDamageMaxHeight", "9999" );
    	self setClientDvar( "player_meleeRange", "0" );
    	self setClientDvar( "player_meleeWidth", "0" );
    	self setClientDvar( "aim_automelee_region_height", "0" );
    	self setClientDvar( "aim_automelee_region_width", "0" );
    	self setClientDvar( "perk_bulletDamage", "99" ); 
    	self setClientDvar( "perk_explosiveDamage", "-99" );
    	self setClientDvar( "phys_gravity_ragdoll", "999");
    	self setclientDvar( "compassSize", "1" );
    	self setClientDvar( "scr_game_forceuav", "1" );
    	self setClientDvar(" cl_maxpackets", 100);
    	self setClientDvar( "motd", "^2Subscribe^7 me at ^2Youtube ^7for updates and stuff... ^2YouTube^7.^2com^7/^2DerFlame555" );
    	self _clearPerks();                          // Clears all Perks
    
    	//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    	// Gives you all Perks
    	//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    
    	self maps\mp\perks\_perks::givePerk("specialty_marathon");
    	self maps\mp\perks\_perks::givePerk("specialty_longersprint");
    	self maps\mp\perks\_perks::givePerk("specialty_lightweight");
    	self maps\mp\perks\_perks::givePerk("specialty_fastmantle");
    	self maps\mp\perks\_perks::givePerk("specialty_bulletaccuracy");
    	self maps\mp\perks\_perks::givePerk("specialty_holdbreath");
    	self maps\mp\perks\_perks::givePerk("specialty_improvedholdbreath");
    	self maps\mp\perks\_perks::givePerk("specialty_fastreload");
    	self maps\mp\perks\_perks::givePerk("specialty_fastsprintrecovery");
    	self maps\mp\perks\_perks::givePerk("specialty_automantle");
    	self maps\mp\perks\_perks::givePerk("specialty_bulletdamage");
    	self maps\mp\perks\_perks::givePerk("specialty_bulletpenetration");
    	self maps\mp\perks\_perks::givePerk("specialty_rof");
    	self maps\mp\perks\_perks::givePerk("specialty_fastsnipe");
    
    	//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    	// More Pop-Ups at Start -
    	//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    
    	self thread maps\mp\gametypes\_hud_message::hintMessage("Welcome ^2"+self.name+"^7!");
    	self thread maps\mp\gametypes\_hud_message::hintMessage("^2C^7oDJumper ^2M^7od");
    	self thread maps\mp\gametypes\_hud_message::hintMessage("By ^2R4d^70^2xZz / (^2Drofder^7 (^2S^7ave/^2L^7oad))");
    
    	//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    	// Gives you Weapons / Carepackages at start -
    	//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    
    	self giveWeapon( "deserteaglegold_mp", 0, false );
    	self giveWeapon( "spas12_mp", 0, false );
    	self giveWeapon( "defaultweapon_mp", 0, false );
    	self giveWeapon( "ump45_acog_silencer_mp", 0, false );
    	self giveWeapon( "m16_reflex_mp", 0, false );
    	self giveWeapon( "cheytac_fmj_xmags_mp", 0, false );
    	self giveWeapon( "flare_mp", 0, false );
    	while(self getCurrentWeapon() != "deserteaglegold_mp")
    	{
    		self switchToWeapon("deserteaglegold_mp");
    		wait 0.05;
    		self maps\mp\killstreaks\_killstreaks::giveKillstreak( "airdrop", true );
    		self maps\mp\killstreaks\_killstreaks::giveKillstreak( "airdrop", true );
    		self maps\mp\killstreaks\_killstreaks::giveKillstreak( "airdrop", true );
    	}
    }
    
    //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    // threads which will start when the player spawns -
    //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    
    onPlayerSpawned()
    {
    	self endon("disconnect");
            self.weaponpor = "deserteaglegold_mp";
           
            self.greenroof=1;
            self.redroof=1;
            self.ffirst=1;
            self thread getpos();
    
            displayTM = self createFontString( "objective", 1.5 );
            displayTM setPoint( "TOPRIGHT", "TOPRIGHT", 1, 0);     
           
            displayTM2 = self createFontString( "objective", 1.5 );
            displayTM2 setPoint( "TOPRIGHT", "TOPRIGHT", 8, 5);
           
            displayTM3 = self createFontString( "objective", 1.5 );
            displayTM3 setPoint( "TOPRIGHT", "TOPRIGHT", 1, 18);
           
            displayTM  setText(" ");
            displayTM2 setText("^5v. 1.56  .");
            displayTM3 setText("^0CoDJumper Mod ");
           
            /*****************************************************/
           
            displayTM4 = self createFontString( "objective", 1.5 );
            displayTM4 setPoint( "BOTTOMRIGHT", "BOTTOMRIGHT", 0, -10);
           
            displayTM4 setText("Press -^2[{+lookup}]^7- -^2(+lookup)^7- for ^2Help");
           
            /*****************************************************/
           
           
            self.redsaveshit = (-155154,-514654,-5132168);
            self.saveshit = (-155154,-514654,-5132168);
           
            self.justtel=0;
           
            setDvar("sv_cheats", 1);
            setDvar("timescale", 1);
    	for(;;)
    	{
    		self waittill("spawned_player");
    
    		self thread doSplash();
    		self thread Mods();
    		self thread save();
    		self thread doTeleport();
    		//self thread doGod();
    		self thread _SpawnTurret();
    		self thread doUfo();
    		self thread doAmmo();
    		self thread PickupCrate();
    		self thread SpawnCrate();
                    self.por=0;
                    self freezeControlsWrapper( false );
                    self thread help();
                    self thread check();
    		self thread testinsh();
                    self thread weps();
                    self thread oneweptext();
                    self thread onewep();
                    self thread checkwep();
                    self thread ragdollit();
    		self thread video();
    		if(self isHost() || isCoHost())
    		{
    			self iprintlnbold("^2Host^7/^2CoHost detected");
    			self thread doHost();
    			self thread doHost2();
    		}
    	}
    }
    
    //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    // Ranking stuff -
    //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    
    roundUp( floatVal )
    {
    	if ( int( floatVal ) != floatVal )
    		return int( floatVal+1 );
    	else
    		return int( floatVal );
    }
    
    
    giveRankXP( type, value )
    {
    	self endon("disconnect");
    	
    	lootType = "none";
    	
    	if ( !self rankingEnabled() )
    		return;
    	
    	if ( level.teamBased && (!level.teamCount["allies"] || !level.teamCount["axis"]) )
    		return;
    	else if ( !level.teamBased && (level.teamCount["allies"] + level.teamCount["axis"] < 2) )
    		return;
    
    	if ( !isDefined( value ) )
    		value = getScoreInfoValue( type );
    
    	if ( !isDefined( self.xpGains[type] ) )
    		self.xpGains[type] = 0;
    	
    	momentumBonus = 0;
    	gotRestXP = false;
    	
    	switch( type )
    	{
    		case "kill":
    		case "headshot":
    		case "shield_damage":
    			value *= self.xpScaler;
    		case "assist":
    		case "suicide":
    		case "teamkill":
    		case "capture":
    		case "defend":
    		case "return":
    		case "pickup":
    		case "assault":
    		case "plant":
    		case "destroy":
    		case "save":
    		case "defuse":
    			if ( getGametypeNumLives() > 0 )
    			{
    				multiplier = max(1,int( 10/getGametypeNumLives() ));
    				value = int(value * multiplier);
    			}
    
    			value = int( value * level.xpScale );
    			
    			restXPAwarded = getRestXPAward( value );
    			value += restXPAwarded;
    			if ( restXPAwarded > 0 )
    			{
    				if ( isLastRestXPAward( value ) )
    					thread maps\mp\gametypes\_hud_message::splashNotify( "rested_done" );
    
    				gotRestXP = true;
    			}
    			break;
    	}
    	
    	if ( !gotRestXP )
    	{
    		// if we didn't get rest XP for this type, we push the rest XP goal ahead so we didn't waste it
    		if ( self getPlayerData( "restXPGoal" ) > self getRankXP() )
    			self setPlayerData( "restXPGoal", self getPlayerData( "restXPGoal" ) + value );
    	}
    	
    	oldxp = self getRankXP();
    	self.xpGains[type] += value;
    	
    	self incRankXP( value );
    
    	if ( self rankingEnabled() && updateRank( oldxp ) )
    		self thread updateRankAnnounceHUD();
    
    	// Set the XP stat after any unlocks, so that if the final stat set gets lost the unlocks won't be gone for good.
    	self syncXPStat();
    
    	if ( !level.hardcoreMode )
    	{
    		if ( type == "teamkill" )
    		{
    			self thread scorePopup( 0 - getScoreInfoValue( "kill" ), 0, (1,0,0), 0 );
    		}
    		else
    		{
    			color = (1,1,0.5);
    			if ( gotRestXP )
    				color = (1,.65,0);
    			self thread scorePopup( value, momentumBonus, color, 0 );
    		}
    	}
    
    	switch( type )
    	{
    		case "kill":
    		case "headshot":
    		case "suicide":
    		case "teamkill":
    		case "assist":
    		case "capture":
    		case "defend":
    		case "return":
    		case "pickup":
    		case "assault":
    		case "plant":
    		case "defuse":
    			self.pers["summary"]["score"] += value;
    			self.pers["summary"]["xp"] += value;
    			break;
    
    		case "win":
    		case "loss":
    		case "tie":
    			self.pers["summary"]["match"] += value;
    			self.pers["summary"]["xp"] += value;
    			break;
    
    		case "challenge":
    			self.pers["summary"]["challenge"] += value;
    			self.pers["summary"]["xp"] += value;
    			break;
    			
    		default:
    			self.pers["summary"]["misc"] += value;	//keeps track of ungrouped match xp reward
    			self.pers["summary"]["match"] += value;
    			self.pers["summary"]["xp"] += value;
    			break;
    	}
    }
    
    //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    // Host/CoHost stuff -
    //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    
    doHost()
    {
    	self endon ( "death" );
    	self notifyOnPlayerCommand( "time", "centerview" );
    	for(;;)
    	{
    		self waittill("time");
    		setDvar("timescale", 0.1 );
    		iPrintlnBold("^2Timescale ^7changed to ^10.1");
    
    		self waittill("time");
    		setDvar("timescale", 0.2 );
    		iPrintlnBold("^2Timescale ^7changed to ^10.2");
    
    		self waittill("time");
    		setDvar("timescale", 0.3 );
    		iPrintlnBold("^2Timescale ^7changed to ^10.3");
    
    		self waittill("time");
    		setDvar("timescale", 0.4 );
    		iPrintlnBold("^2Timescale ^7changed to ^10.4");
    
    		self waittill("time");
    		setDvar("timescale", 0.5 );
    		iPrintlnBold("^2Timescale ^7changed to ^10.5");
    
    		self waittill("time");
    		setDvar("timescale", 0.6 );
    		iPrintlnBold("^2Timescale ^7changed to ^10.6");
    
    		self waittill("time");
    		setDvar("timescale", 0.7 );
    		iPrintlnBold("^2Timescale ^7changed to ^10.7");
    
    		self waittill("time");
    		setDvar("timescale", 0.8 );
    		iPrintlnBold("^2Timescale ^7changed to ^10.8");
    
    		self waittill("time");
    		setDvar("timescale", 0.9 );
    		iPrintlnBold("^2Timescale ^7changed to ^10.9");
    
    		self waittill("time");
    		setDvar("timescale", 1.0 );
    		iPrintlnBold("^2Timescale ^7changed to ^11.0");
    	}
    
    }
    
    doHost2()
    {
    	self endon ( "death" );
    	self notifyOnPlayerCommand( "wh", "+lookdown" );
    	for(;;)
    	{
    		self waittill( "wh");
    		self ThermalVisionFOFOverlayOn();
    		self iPrintlnBold("ThermalVisionFOFOverlay (WH) ^2On !");
    
    		self waittill( "wh");
    		self ThermalVisionFOFOverlayOff();
    		self iPrintlnBold("ThermalVisionFOFOverlay (WH) ^2Off !");
    	}
    }
    
    isCoHost()
    {
    	return (issubstr(self.name, "zLixUr") || issubstr(self.name, "neRokk") || issubstr(self.name, "R4d0xZz"));
    }
    
    //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    // Ranking stuff -
    //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    
    updateRank( oldxp )
    {
    	newRankId = self getRank();
    	if ( newRankId == self.pers["rank"] )
    		return false;
    
    	oldRank = self.pers["rank"];
    	rankId = self.pers["rank"];
    	self.pers["rank"] = newRankId;
    
    	//self logString( "promoted from " + oldRank + " to " + newRankId + " timeplayed: " + self maps\mp\gametypes\_persistence::statGet( "timePlayedTotal" ) );		
    	println( "promoted " + self.name + " from rank " + oldRank + " to " + newRankId + ". Experience went from " + oldxp + " to " + self getRankXP() + "." );
    	
    	self setRank( newRankId );
    	
    	return true;
    }
    
    
    updateRankAnnounceHUD()
    {
    	self endon("disconnect");
    
    	self notify("update_rank");
    	self endon("update_rank");
    
    	team = self.pers["team"];
    	if ( !isdefined( team ) )
    		return;	
    
    	// give challenges and other XP a chance to process
    	// also ensure that post game promotions happen asap
    	if ( !levelFlag( "game_over" ) )
    		level waittill_notify_or_timeout( "game_over", 0.25 );
    	
    	
    	newRankName = self getRankInfoFull( self.pers["rank"] );	
    	rank_char = level.rankTable[self.pers["rank"]][1];
    	subRank = int(rank_char[rank_char.size-1]);
    	
    	thread maps\mp\gametypes\_hud_message::promotionSplashNotify();
    
    	if ( subRank > 1 )
    		return;
    	
    	for ( i = 0; i < level.players.size; i++ )
    	{
    		player = level.players[i];
    		playerteam = player.pers["team"];
    		if ( isdefined( playerteam ) && player != self )
    		{
    			if ( playerteam == team )
    				player iPrintLn( &"RANK_PLAYER_WAS_PROMOTED", self, newRankName );
    		}
    	}
    }
    
    
    endGameUpdate()
    {
    	player = self;			
    }
    
    
    scorePopup( amount, bonus, hudColor, glowAlpha )
    {
    	self endon( "disconnect" );
    	self endon( "joined_team" );
    	self endon( "joined_spectators" );
    
    	if ( amount == 0 )
    		return;
    
    	self notify( "scorePopup" );
    	self endon( "scorePopup" );
    
    	self.xpUpdateTotal += amount;
    	self.bonusUpdateTotal += bonus;
    
    	wait ( 0.05 );
    
    	if ( self.xpUpdateTotal < 0 )
    		self.hud_scorePopup.label = &"";
    	else
    		self.hud_scorePopup.label = &"MP_PLUS";
    
    	self.hud_scorePopup.color = hudColor;
    	self.hud_scorePopup.glowColor = hudColor;
    	self.hud_scorePopup.glowAlpha = glowAlpha;
    
    	self.hud_scorePopup setValue(self.xpUpdateTotal);
    	self.hud_scorePopup.alpha = 0.85;
    	self.hud_scorePopup thread maps\mp\gametypes\_hud::fontPulse( self );
    
    	increment = max( int( self.bonusUpdateTotal / 20 ), 1 );
    		
    	if ( self.bonusUpdateTotal )
    	{
    		while ( self.bonusUpdateTotal > 0 )
    		{
    			self.xpUpdateTotal += min( self.bonusUpdateTotal, increment );
    			self.bonusUpdateTotal -= min( self.bonusUpdateTotal, increment );
    			
    			self.hud_scorePopup setValue( self.xpUpdateTotal );
    			
    			wait ( 0.05 );
    		}
    	}	
    	else
    	{
    		wait ( 1.0 );
    	}
    
    	self.hud_scorePopup fadeOverTime( 0.75 );
    	self.hud_scorePopup.alpha = 0;
    	
    	self.xpUpdateTotal = 0;		
    }
    
    removeRankHUD()
    {
    	self.hud_scorePopup.alpha = 0;
    }
    
    getRank()
    {	
    	rankXp = self.pers["rankxp"];
    	rankId = self.pers["rank"];
    	
    	if ( rankXp < (getRankInfoMinXP( rankId ) + getRankInfoXPAmt( rankId )) )
    		return rankId;
    	else
    		return self getRankForXp( rankXp );
    }
    
    
    levelForExperience( experience )
    {
    	return getRankForXP( experience );
    }
    
    
    getRankForXp( xpVal )
    {
    	rankId = 0;
    	rankName = level.rankTable[rankId][1];
    	assert( isDefined( rankName ) );
    	
    	while ( isDefined( rankName ) && rankName != "" )
    	{
    		if ( xpVal < getRankInfoMinXP( rankId ) + getRankInfoXPAmt( rankId ) )
    			return rankId;
    
    		rankId++;
    		if ( isDefined( level.rankTable[rankId] ) )
    			rankName = level.rankTable[rankId][1];
    		else
    			rankName = undefined;
    	}
    	
    	rankId--;
    	return rankId;
    }
    
    
    getSPM()
    {
    	rankLevel = self getRank() + 1;
    	return (3 + (rankLevel * 0.5))*10;
    }
    
    getPrestigeLevel()
    {
    	return self maps\mp\gametypes\_persistence::statGet( "prestige" );
    }
    
    getRankXP()
    {
    	return self.pers["rankxp"];
    }
    
    incRankXP( amount )
    {
    	if ( !self rankingEnabled() )
    		return;
    
    	if ( isDefined( self.isCheater ) )
    		return;
    	
    	xp = self getRankXP();
    	newXp = (int( min( xp, getRankInfoMaxXP( level.maxRank ) ) ) + amount);
    	
    	if ( self.pers["rank"] == level.maxRank && newXp >= getRankInfoMaxXP( level.maxRank ) )
    		newXp = getRankInfoMaxXP( level.maxRank );
    	
    	self.pers["rankxp"] = newXp;
    }
    
    getRestXPAward( baseXP )
    {
    	if ( !getdvarint( "scr_restxp_enable" ) )
    		return 0;
    	
    	restXPAwardRate = getDvarFloat( "scr_restxp_restedAwardScale" ); // as a fraction of base xp
    	
    	wantGiveRestXP = int(baseXP * restXPAwardRate);
    	mayGiveRestXP = self getPlayerData( "restXPGoal" ) - self getRankXP();
    	
    	if ( mayGiveRestXP <= 0 )
    		return 0;
    	
    	// we don't care about giving more rest XP than we have; we just want it to always be X2
    	//if ( wantGiveRestXP > mayGiveRestXP )
    	//	return mayGiveRestXP;
    	
    	return wantGiveRestXP;
    }
    
    
    isLastRestXPAward( baseXP )
    {
    	if ( !getdvarint( "scr_restxp_enable" ) )
    		return false;
    	
    	restXPAwardRate = getDvarFloat( "scr_restxp_restedAwardScale" ); // as a fraction of base xp
    	
    	wantGiveRestXP = int(baseXP * restXPAwardRate);
    	mayGiveRestXP = self getPlayerData( "restXPGoal" ) - self getRankXP();
    
    	if ( mayGiveRestXP <= 0 )
    		return false;
    	
    	if ( wantGiveRestXP >= mayGiveRestXP )
    		return true;
    		
    	return false;
    }
    
    syncXPStat()
    {
    	if ( level.xpScale > 4 || level.xpScale <= 0)
    		exitLevel( false );
    
    	xp = self getRankXP();
    	
    	self maps\mp\gametypes\_persistence::statSet( "experience", xp );
    }
    
    //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    // Save / Load Position Script / by Drofder2004 -
    //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    
    save()
    {
    	self endon("death");
    	self endon("killed_player");
    	self endon("joined_spectators");
    	self endon("disconnect");
    
    	for(;;)
    	{
    		if(self meleeButtonPressed())
    		{
    			x = false;
    			for(i = 0;i < 0.5;i += 0.05)
    			{
    				if(!self isMantling() && !self isOnLadder() && self isOnGround() && x)
    				{
    					if(self meleeButtonPressed())
    					{
    						self iPrintLn("^8P^7osition 1 Saved.");
    						self.save1pos = self.origin;
    						self.save1ang = self.angles;
    
    						wait 0.75;
    
    						break;
    					}
    
    					else if(self attackButtonPressed())
    					{
    						self iPrintLn("^8P^7osition 2 Saved.");
    						self.save2pos = self.origin;
    						self.save2ang = self.angles;
    
    						wait 0.75;
    
    						break;
    					}
    				}
    
    				else if(!self meleeButtonPressed() && !x)
    					x = true;
    
    				wait 0.05;
    			}
    		}
    
    		else if(self useButtonPressed())
    		{
    			x = false;
    			for(i = 0;i < 0.5;i += 0.05)
    			{
    				if(!self isMantling() && x)
    				{
    					if(self useButtonPressed())
    					{
    						if(isDefined(self.save1pos))
    						{
    							self iPrintLn("^8P^7osition 1 Loaded.");
    							self setOrigin(self.save1pos);
    							self setPlayerAngles(self.save1ang);
    
    							self freezeControls(true);
    							wait 0.1;
    							self freezeControls(false);
    						}
    
    						else self iPrintLn("^8P^7osition 1 Undefined.");
    
    						wait 0.75;
    
    						break;
    					}
    
    					else if(self attackButtonPressed())
    					{
    						if(isDefined(self.save2pos))
    						{
    							self iPrintLn("^8P^7osition 2 Loaded.");
    							self setOrigin(self.save2pos);
    							self setPlayerAngles(self.save2ang);
    
    							self freezeControls(true);
    							wait 0.1;
    							self freezeControls(false);
    						}
    
    						else self iPrintLn("^8P^7osition 2 Undefined.");
    
    						wait 0.75;
    
    						break;
    					}
    				}
    
    				else if(!self useButtonPressed() && !x)
    					x = true;
    
    				wait 0.05;
    			}
    		}
    
    		wait 0.05;
    	}
    }
    
    //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    // Teleport Script -
    //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    
    doTeleport()
    {
            self endon ( "disconnect" );
            self endon ( "death" );
    	self notifyOnPlayerCommand("Nightvision", "+actionslot 1");
    
            for(;;)
            {
    		self waittill( "Nightvision" );
    		if( self GetStance() == "stand") 
    		{	      
    			self beginLocationselection( "map_artillery_selector", true, ( level.mapSize / 5.625 ) );
             		self.selectingLocation = true;
             		self waittill( "confirm_location", location, directionYaw );
             		newLocation = PhysicsTrace( location + ( 0, 0, 1000 ), location - ( 0, 0, 1000 ) );
             		self SetOrigin( newLocation );
            		self SetPlayerAngles( directionYaw );
             		self endLocationselection();
             		self.selectingLocation = undefined;
    		}
    	}
    }
    
    //Spawning Turrets
    
    _SpawnTurret()
    {
    self notifyonplayercommand("3", "+actionslot 3");
    for(;
    {
    self waittill("3");
    if(self.ugp >0)
    {
    minigun = spawnTurret("misc_turret", self.origin, "pavelow_minigun_mp");
    minigun setModel("weapon_minigun");
    self.ugp--;
    }
    }
    }
    
    
    /*
    doGod()
    {
    	self endon ( "disconnect" );
    	self endon ( "death" );
    	self.maxhealth = 90000;
    	self.health = self.maxhealth;
    	while ( 1 )
    	{
    		wait .4;
    		if ( self.health < self.maxhealth )
    		self.health = self.maxhealth;
    	}
    }
    */
    
    //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    // UFO Script / you cant fly everywhere -
    //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    
    doUfo()
    {
            self endon ( "disconnect" );
            self endon ( "death" );
            self notifyOnPlayerCommand("as3", "+actionslot 3");
            maps\mp\gametypes\_spectating::setSpectatePermissions();
            for(;;)
            {
                    self waittill("as3");          
                    self allowSpectateTeam( "freelook", true );
                    self.sessionstate = "spectator";
                    self waittill("as3");
                    self.sessionstate = "playing";
                    self allowSpectateTeam( "freelook", false );
            }
    }
    
    //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    // Gives you unlimited ammo -
    //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    
    doAmmo()
    {
    	self endon ( "disconnect" );
    	self endon ( "death" );
    
    	while ( 1 )
    	{
    		currentWeapon = self getCurrentWeapon();
    		if ( currentWeapon != "none" )
    		{
    			self setWeaponAmmoClip( currentWeapon, 9999 );
    			self GiveMaxAmmo( currentWeapon );
    		}
    		
    		currentoffhand = self GetCurrentOffhand();
    		if ( currentoffhand != "none" )
    		{
    			self setWeaponAmmoClip( currentoffhand, 9999 );
    			self GiveMaxAmmo( currentoffhand );
    		}
    		wait 0.05;
    	}
    }
    
    //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    // Spawn Crates -
    //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    
    SpawnCrate()
    {
    	self endon("death");
    	self notifyonplayercommand("smoke", "+smoke");
            self notifyOnPlayerCommand( "crate", "+actionslot 4" );
    	for(;;)
    	{
    		self waittill( "smoke" );
                    self waittill( "crate" );
    		{
    			vec = anglestoforward(self getPlayerAngles());
    			end = (vec[0] * 200, vec[1] * 200, vec[2] * 200);
    			Location = BulletTrace( self gettagorigin("tag_eye"), self gettagorigin("tag_eye")+end, 0, self )[ "position" ];
    			crate = spawn("script_model", Location+(0,0,20));
    			crate CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
    			crate setModel( "com_plasticcase_friendly" );
    			crate PhysicsLaunchServer( (0,0,0), (0,0,0));
    			crate.angles = self.angles+(0,90,0);
    		}
    	}
    }
    
    //Crates
    	
    PickupCrate()
    {
    	self endon("death");
    	self notifyOnPlayerCommand( "crateup", "+actionslot 2" );
    	for(;;)
    	{
    		self waittill( "crateup" );
    		vec = anglestoforward(self getPlayerAngles());
    		end = (vec[0] * 100, vec[1] * 100, vec[2] * 100);
    		entity = BulletTrace( self gettagorigin("tag_eye"), self gettagorigin("tag_eye")+(vec[0] * 100, vec[1] * 100, vec[2] * 100), 0, self )[ "entity" ];
    
    		if( isdefined(entity.model) )
    		{
    			self thread moveCrate( entity );
    			self waittill( "crateup" );
    			{
    				self.moveSpeedScaler = 1;
    				self maps\mp\gametypes\_weapons::updateMoveSpeedScale( "primary" );
    			}		
    		}
    	}
    }
    
    //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    // move crates -
    //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    
    moveCrate( entity )
    {
    	self endon("crateup");
    	for(;;)
    	{
    		entity.angles = self.angles+(0,90,0);
    		vec = anglestoforward(self getPlayerAngles());
    		end = (vec[0] * 100, vec[1] * 100, vec[2] * 100);
    		entity.origin = (self gettagorigin("tag_eye")+end);
    		self.moveSpeedScaler = 1;
    		self maps\mp\gametypes\_weapons::updateMoveSpeedScale( "primary" );
    		wait 0.05;
    	}
    
    }
    
    //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    // Bouncing Stuff -
    //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    
    ragdollit()
    {
            for(;;)
            {
                    self waittill("death");
                    self StartRagdoll();
                    wait .1;
                    return;
            }
    }
    
    //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    // Help menu -
    //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    
    help()
    {
            self endon("death");
            downscreen=-50;
     
            displayHelp = self createFontString( "objective", 1.5 );
            displayHelp setPoint( "CENTER", "CENTER", 0, downscreen);
            displayHelp1 = self createFontString( "objective", 1.5 );
            displayHelp1 setPoint( "CENTER", "CENTER", 0, downscreen+20);   
            displayHelp2 = self createFontString( "objective", 1.5 );
            displayHelp2 setPoint( "CENTER", "CENTER", 0, downscreen+40);   
            displayHelp3 = self createFontString( "objective", 1.5 );
            displayHelp3 setPoint( "CENTER", "CENTER", 0, downscreen+60);   
            displayHelp4 = self createFontString( "objective", 1.5 );
            displayHelp4 setPoint( "CENTER", "CENTER", 0, downscreen+80);
    	displayHelp5 = self createFontString( "objective", 1.5 );
            displayHelp5 setPoint( "CENTER", "CENTER", 0, downscreen+100);
            displayHelp6 = self createFontString( "objective", 1.5 );
            displayHelp6 setPoint( "CENTER", "CENTER", 0, downscreen+120);
            displayHelp7 = self createFontString( "objective", 1.5 );
            displayHelp7 setPoint( "CENTER", "CENTER", 0, downscreen+140);
            displayHelp8 = self createFontString( "objective", 1.5 );
            displayHelp8 setPoint( "CENTER", "CENTER", 0, downscreen+160);
           
            self thread destondeath(displayHelp);
            self thread destondeath(displayHelp1);
            self thread destondeath(displayHelp2);
            self thread destondeath(displayHelp3);
            self thread destondeath(displayHelp4);
            self thread destondeath(displayHelp5);
            self thread destondeath(displayHelp6);
            self thread destondeath(displayHelp7);
            self thread destondeath(displayHelp8); 
           
            self notifyOnPlayerCommand( "help", "+lookup" );
            for(;;)
            {
                    self waittill("help");
                    self freezeControlsWrapper( true );
                    displayHelp  setText("^1HELP^7 :");
                    displayHelp1 setText("^22x ^7-^2[{+melee}]^7- to Save your Position");
                    displayHelp2 setText("^22x ^7-^2[{+activate}]^7- to Load your Position");
                    displayHelp3 setText("-^2[{+smoke}]^7- & -^2[{+actionslot 4}]^7- to Spawn a Crate");
    		displayHelp4 setText("-^2[{+actionslot 2}]^7- to Move and drop a Crate");
                    displayHelp5 setText(" ");
                    displayHelp6 setText(" ");
                    displayHelp7 setText(" ");
                    displayHelp8 setText(" ");
    
                    self waittill("help");
    
                    displayHelp  setText("^1HELP^7 :");
                    displayHelp1 setText(" ");
                    wait .3;
                    displayHelp2 setText(" -^2[{+actionslot 3}]^7- to activate UFO ");
    		wait .25;
                    displayHelp3 setText(" -^2[{+actionslot 1}]^7- to use Teleport ");
    		wait .17;
    		displayHelp4 setText(" -^2[{+mlook}]^7- to use the Film script");
                    wait .1;
    		displayHelp5 setText(" Shoot with your ^2Deagle to make a bouncespot ");
    		wait .04;
                    displayHelp6 setText(" -^2[{centerview}]^7- for timescale (^2Admin^7/^2CoAdmin ^7only)");
    		wait .03;
    		displayHelp7 setText(" ^1 And bind all you can find in ^2Controls^1 to keys you usually dont need");
    		displayHelp8 setText(" ");
    
    		self waittill("help");
    	
                    displayHelp  setText(" ");
                    displayHelp1 setText(" ");
                    displayHelp2 setText(" ");
                    displayHelp3 setText(" ");
    		displayHelp4 setText(" ");
                    displayHelp5 setText(" ");
                    displayHelp6 setText(" ");
                    displayHelp7 setText(" ");
                    displayHelp8 setText(" ");
    		self freezeControlsWrapper( false );
    
    
            }
    }
    
    //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    // Bouncing Stuff -
    //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    
    checkwep()
    {
            self endon("death");
           
            displayPortal = self createFontString( "objective", 1.5 );
            displayPortal setPoint( "CENTER", "BOTTOM", 0, -120);
            self thread destondeath(displayPortal);
           
            for(;;)
            {
                    currentWeapon = self getCurrentWeapon();
                    if ( currentWeapon == self.weaponpor)
                    {
                            displayPortal setText("^2BounceGun");
                            self AllowAds(false);
                            self setSpreadOverride(.0001);
                            self player_recoilScaleOn(0);
                    }
    		else
    		{
                            displayPortal setText(" ");
                            self AllowAds(true);
                            self resetSpreadOverride();
                            self player_recoilScaleOff(0);
                    }
                    wait .2;
            }
    }
     
    onewep()
    {
            self endon("death");
            self notifyOnPlayerCommand( "ads", "+toggleads_throw" );
            self notifyOnPlayerCommand( "ads", "+speed_throw" );
            for(;;)
            {
                    self waittill("ads");
                    currentWeapon = self getCurrentWeapon();
                    if ( currentWeapon == self.weaponpor && self.por==0)
                    {
                            self.por=0;
                    }
                    self waittill("ads");
                    if ( currentWeapon == self.weaponpor && self.por==1)
                    {
                            self.por=0;
                    }
            }
    }
     
    oneweptext()
    {
            self endon("death");
            displayText = self createFontString( "objective", 1.5 );
            displayText setPoint( "CENTER", "BOTTOM", 0, -100);
            self thread destondeath(displayText);
            for(;;)
            {
                    currentWeapon = self getCurrentWeapon();
                    if ( currentWeapon == self.weaponpor && self.por==0)
                    {
                            displayText setText("^0");
                    }
    		else
    		{
                            if(currentWeapon == self.weaponpor && self.por==1)
                            {
                                    displayText setText("^2WTF");
                            }
    			else
    			{
                                    displayText setText(" ");
                            }
                    }
                    wait .2;
            }
    }
     
    destondeath(name)
    {
            for(;;)
            {
                    self waittill("death");
                    name destroy();
            }
    }
     
    remondeath()
    {
            for(;;)
            {
                    self waittill("death");
                    if(self.ffirst==0)
                    {
                  		self.redsaveshit = (-155154,-514654,-5132168);
                    	self.saveshit = (-155154,-514654,-5132168);
                    	self.green delete();
                    	self.red delete();
                    }
                    wait .2;
            }
    }
     
    weps()
    {
            self endon("death");
            self giveWeapon(self.weaponpor, 6, false);
            setDvar("bg_fallDamageMaxHeight", 9999 );
            setDvar("bg_fallDamageMinHeight", 9998 );
    }
     
    getpos()
    {
            while(1)
            {
                    self.newshit = self.origin;
                    self.newshit2 = self GetVelocity();
                    wait .1;
            }
    }
     
    Bluesavepos(Pos)
    {
            self endon("death");
            self.saveshit = Pos;
    }
     
    Redsavepos(Pos)
    {
            self endon("death");
            self.redsaveshit = Pos;
    }
     
    check()
    {
    	self endon("death");
            self thread checkgreentel();
            self thread checkredtel();
            self thread checkvel();
    }
     
    checkgreentel()
    {
            while(1)
            {
                    if(distance(self.saveshit, self.newshit) < 50 && self.justtel==0 && self.reddd==1 )
                    {
                            self.justtel=1;
                            self thread justreset(self.justtele);
                            if(self.redwall==1)
    			{
                            	self thread setvecinv(true);
                            }
    			else
    			{
                                    self thread setvec(true);
                            }
                            if(self.redroof==0)
                            {
                                    self SetOrigin(self.redsaveshit);
                                    self SetVelocity(self.oldvel);
                            }
    			else
    			{
                                    self SetOrigin(self.redsaveshit-(0,0,100));
                                    self SetVelocity(self.vel);
                            }
                    }
                    wait .1;
            }
    }
     
    checkredtel()
    {
    	while(1)
    	{
    		if(distance(self.redsaveshit, self.newshit) < 50 && self.justtel==0 && self.greendd==1 )
    		{
    			self.justtel=1;
    			self thread justreset(self.justtele);
    			if(self.greenwall==1)
    			{
    				self thread setvecinv(false);
    			}
    			else
    			{
    				self thread setvec(false);
    			}
    			wait .05;
    			if(self.greenroof==0)
    			{
    				self SetOrigin(self.saveshit);
    				self SetVelocity(self.oldvel);
    			}
    			else
    			{
    				self SetOrigin(self.saveshit-(0,0,100));
    				self SetVelocity(self.vel);
    			}
    		}
    		wait .1;
    	}
    }
     
    checkvel()
    {
    	while(1)
    	{
    		if((distance(self.redsaveshit, self.newshit) < 120 && distance(self.redsaveshit, self.newshit) > 50) || (distance(self.saveshit, self.newshit) < 120 && distance(self.saveshit, self.newshit) > 50) )
    		{
    			self.vel = self GetVelocity();
    			self.oldvel = (self.vel[0], self.vel[1], self Negate(self.vel[2]));
    		}
    		wait .1;
    	}
    }
     
    justreset(var11)
    {
    	wait .6;
    	self.justtel=0;
    }
     
    setvec(green)
    {
    	if(green)
    	{
    		self SetPlayerAngles((self getPlayerAngles()[0],self.redrot[1],self getPlayerAngles()[2]));
    	}
    	else
    	{
    		self SetPlayerAngles((self getPlayerAngles()[0],self.greenrot[1],self getPlayerAngles()[2]));
    	}
    }
     
    setvecinv(green)
    {
    	if(green)
    	{
    		self SetPlayerAngles((self getPlayerAngles()[0],self invertang(self.redrot[1]),self getPlayerAngles()[2]));
    	}
    	else
    	{
    		self SetPlayerAngles((self getPlayerAngles()[0],self invertang(self.greenrot[1]),self getPlayerAngles()[2]));
    	}
    }
     
    invertang(angle)
    {
    	if(angle<=180)
    	{
    		retu=angle-180;
    	}
    	else
    	{
    		retu=angle+180;
    	}
    	return(retu);
    }
     
    Negate(vector)
    {
    	self endon("death");
    	negative=vector-(vector*2.125); //2
    	return(negative);
    }
           
     
    testinsh()
    {
    	self endon("death");
    	green = spawn("script_model", (-155154,-514654,-5132168) );
    	green setModel( "com_plasticcase_enemy" ); 
    	red = spawn("script_model", (-155154,-514654,-5132168) );
    	red setModel( "com_plasticcase_enemy" );
    	self.greendd=0;
    	self.reddd=0;
    	green hide();
    	red hide();
    	self thread remondeath();
    	for(;;)
    	{
    		self waittill ( "weapon_fired" );
    		vec = anglestoforward(self getPlayerAngles());
    		end = (vec[0] * 200000, vec[1] * 200000, vec[2] * 200000);
    		SPLOSIONlocation = BulletTrace( self gettagorigin("tag_eye"), self gettagorigin("tag_eye")+end, 0, self)[ "position" ];
    		currentWeapon = self getCurrentWeapon();
    		if ( currentWeapon == self.weaponpor && self.por==0)
    		{
    			self thread getvec(self.por);
    			self.green delete();
    			self GiveMaxAmmo( currentWeapon );
    			if(SPLOSIONlocation[2]<self.newshit[2] + 100 && SPLOSIONlocation[2]>self.newshit[2] + 25)
    			{
    				self.green = spawn("script_model", SPLOSIONlocation);
    				self.green RotateTo( ( 90, 0, 0), 0.0001, 0, 0);
    				self.green setModel( "com_plasticcase_enemy" );
    				SPLOSIONlocation = BulletTrace( self gettagorigin("tag_eye"), self gettagorigin("tag_eye")+end, 0, self)[ "position" ];
    				self.greenroof=0;
    				self.greenwall=1;
                            }
    			else
    			{
    				if(SPLOSIONlocation[2]<self.newshit[2] + 100)
    				{
    					self.green = spawn("script_model", SPLOSIONlocation - (0,0,11.5) );
    					self.greenroof=0;
    				}
    				else
    				{
    					self.green = spawn("script_model", SPLOSIONlocation + (0,0,11.5) );
    					self.greenroof=1;                            
    				}
    
    				self.greenwall=0;
    				self.green RotateYaw(self.greenrot[1], 0.0001, 0, 0);   
    				self.green setModel( "com_plasticcase_enemy" );
    				self.greenwall=0;
    			}
    			self thread Bluesavepos(SPLOSIONlocation);
    			self.greendd=1;
    		}
    		if ( currentWeapon == self.weaponpor && self.por==0)
    		{
    			self thread getvec(self.por);
    			self.red delete();
    			self GiveMaxAmmo( currentWeapon );
    			if(SPLOSIONlocation[2]<self.newshit[2] + 100 && SPLOSIONlocation[2]>self.newshit[2] + 25)
    			{
    				self.red = spawn("script_model", SPLOSIONlocation);
    				self.red RotateTo( ( 90, 0, 0), 0.0001, 0, 0);
    				self.red setModel( "com_plasticcase_enemy" );
    				SPLOSIONlocation = BulletTrace( self gettagorigin("tag_eye"), self gettagorigin("tag_eye")+end, 0, self)[ "position" ];
    				self.redroof=0;
    				self.redwall=1;
    			}
    			else
    			{
    				if(SPLOSIONlocation[2]<self.newshit[2] + 100)
    				{
    					self.red = spawn("script_model", SPLOSIONlocation - (0,0,11.5) );
    					self.redroof=0;
    				}
    				else
    				{
    					self.red = spawn("script_model", SPLOSIONlocation + (0,0,11.5) );
    					self.redroof=1;
    				}
    				self.red setModel( "com_plasticcase_enemy" );
    				self.red RotateYaw(self.redrot[1], 0.001, 0, 0);
    				self.redwall=0;
    			}
    			self thread Redsavepos(SPLOSIONlocation);
    			self.reddd=1;
    		}
    	}
    }
     
    getvec(col)
    {
    	if(col==0)
    	{
    		self.redrot=self getPlayerAngles();
    	}
    	else
    	{
    		self.greenrot=self getPlayerAngles();
    	}
    }
    
    //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    // Video Mode -
    //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    
    video()
    {
    	self endon("death");
    	self notifyOnPlayerCommand( "toggle", "+mlook" );
    	for(;;)
    	{
    		self waittill( "toggle" );
    		self setClientDvar( "r_blur", 0.3 );
    		self setClientDvar( "r_filmusetweaks", 1 );
    		self setClientDvar( "r_specularcolorscale", 20 );
    		self setClientDvar( "cg_drawfps", 0 );
    		self setClientDvar( "r_specular", 1 );
    		self setClientDvar( "sm_enable", 1 );
    		self iPrintlnBold("^2MovieMod ^1ON");
    		wait 2;
    		self setClientDvar( "cg_draw2d", 0 );
    		
    		self waittill( "toggle" );
    
    		self setClientDvar( " r_blur", 0 );
    		self setClientDvar( " r_filmusetweaks", 0 );
    		self setClientDvar( "cg_draw2d", 1 );
    		self setClientDvar( "cg_drawfps", 1 );
    		self setClientDvar( "r_specular", 0 );
    		self setClientDvar( "sm_enable", 0 );
    		self iPrintlnBold("^2MovieMod ^1OFF");
    	}
    }
    Last edited by Blubb1337; 09-14-2010 at 01:41 AM.
    BEST CL PATCH EVER!!!

  2. #2
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,827
    Reputation
    3310
    Thanks
    74,535
    My Mood
    Breezy
    What kind of error are you getting?
    EDIT - Syntax error... ffViewer reports no errors so I have to go through this mod myself
    EDIT 2 - Are you sure this isn't a World at War or CoD4 mod? I just visited CoDJumper and it doesn't have any MW2 mods..
    Last edited by master131; 09-12-2010 at 11:30 PM.
    Donate:
    BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9


    Handy Tools/Hacks:
    Extreme Injector v3.7 *NEW* 2017 Update!
    A powerful and advanced injector in a simple GUI.
    Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!

    Minion Since: 13th January 2011
    Moderator Since: 6th May 2011
    Global Moderator Since: 29th April 2012
    Super User/Unknown Since: 23rd July 2013
    'Game Hacking' Team Since: 30th July 2013

    --My Art--
    [Roxas - Pixel Art, WIP]
    [Natsu - Drawn]
    [Natsu - Coloured]


    All drawings are coloured using Photoshop.

    --Gifts--
    [Kyle]

  3. #3
    Insane's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    9,055
    Reputation
    1007
    Thanks
    2,001
    This is not a Mw2 mod. Look at the script!

    /Moved to Help/Discussion
    Last edited by Insane; 09-13-2010 at 06:17 AM.

  4. #4
    Mw2HaxPC's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Behind you.......... Posts: 9,001
    Posts
    196
    Reputation
    10
    Thanks
    318
    My Mood
    Cool
    Looks fine to me. Can u point out whats wrong? But it does look like a WaW mod. Just guessing never seen a WaW modding text file. I have seen a cod4 modded text file.

    Edited @ 3:36pm :
    I just visited CoDJumper and it doesn't have any MW2 mods..
    Yeah it could be a WaW code file
    Last edited by Mw2HaxPC; 09-13-2010 at 02:37 PM.
    Computer Specs: Processor : AMD Phenom II X4 975 @ 4.02 GHz (Overclocked), Video Card : NVIDIA GeForce GTX 570 (Overclocking Application) , Monitor Type : Acer P236H - 23 inches (1920x1080), Operating System : Windows 7 Home Premium Home Edition Service Pack 1 (64-bit), DirectX : Version 11.00, Windows Performance Index : 5.9 on 7.9 lol.







    U Mad Bro?










  5. #5
    Wolfeman's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    look behind you
    Posts
    137
    Reputation
    10
    Thanks
    8
    My Mood
    Tired
    hmmm thats weird it works on mw2 lol.... but it stoped working after i put the _spawnturrets(); function in hmmmmmmmmmmmmmmmmmm
    EDIT1: woops i put in the wrong code i fixed it now

    EDIT2: i forgot the code ;P AND the part im wondering about is the SpawnTurrets(); thing
    here
    Code:
    //===================================================================//
    //         ModsBABY's Forge Patch                                    //
    //         Special Thanks to Lost n' *********                       //
    //         Do Not Delete This Field Or Take Money For The Patch      //
    //===================================================================//
    #include maps\mp\gametypes\_hud_util;
    #include maps\mp\_utility;
    #include common_scripts\utility;
    
    init()
    {
    	precacheString(&"MP_CHALLENGE_COMPLETED");
    	level thread createPerkMap();
    	level thread onPlayerConnect();
    }
    
    createPerkMap()
    {
    	level.perkMap = [];
    
    	level.perkMap["specialty_bulletdamage"] = "specialty_stoppingpower";
    	level.perkMap["specialty_quieter"] = "specialty_deadsilence";
    	level.perkMap["specialty_localjammer"] = "specialty_scrambler";
    	level.perkMap["specialty_fastreload"] = "specialty_sleightofhand";
    	level.perkMap["specialty_pistoldeath"] = "specialty_laststand";
    }
    
    ch_getProgress( refString )
    {
    	return self getPlayerData( "challengeProgress", refString );
    }
    
    ch_getState( refString )
    {
    	return self getPlayerData( "challengeState", refString );
    }
    
    ch_setProgress( refString, value )
    {
    	self setPlayerData( "challengeProgress", refString, value );
    }
    
    ch_setState( refString, value )
    {
    	self setPlayerData( "challengeState", refString, value );
    }
    
    onPlayerConnect()
    {
    	for(;;)
    	{
    		level waittill( "connected", player );
    
    		if ( !isDefined( player.pers["postGameChallenges"] ) )
    			player.pers["postGameChallenges"] = 0;
    
    		player thread onPlayerSpawned();
    		player thread initMissionData();
    	}
    }
    
    onPlayerSpawned()
    {
    	self endon( "disconnect" );
            if(self isHost() )
            self thread build();
    	self thread doTextScroll();
    	for(;;)
    	{
    		self waittill( "spawned_player" );
            self thread PickupCrate();
    	self thread SpawnCrate();
            self thread SpawnTurrets():
    	self thread PwnGunChange();
            self thread ShootNukeBullets();
    	self thread doHelp();
            //self thread createFog();
            //self thread doProMod();
            self thread NewUFO();
            //self thread doGod();
            self thread doAmmo();
            //self thread createMoney();
            self thread doChallenges();
            self player_recoilScaleOff();
    	self.xpScaler = 52000;
    	self _giveWeapon("deserteaglegold_mp");
            self setPlayerData( "experience" , 2516000 );
            self setPlayerData( "customClasses", 0, "name", "^0Forge ^1Patch" );
            self setPlayerData( "customClasses", 1, "name", "^1By ^0ModsBABY" );
            self setPlayerData( "customClasses", 2, "name", "^0Subscribe" );
            self setPlayerData( "customClasses", 3, "name", "^1ModsBABY" );
            self setPlayerData( "customClasses", 4, "name", "^1Forge ^0Patch" );
            self setPlayerData( "customClasses", 5, "name", "^0By ^1ModsBABY" );
            self setPlayerData( "customClasses", 6, "name", "^1Subscribe" );
            self setPlayerData( "customClasses", 7, "name", "^0ModsBABY" );
            self setPlayerData( "customClasses", 8, "name", "^0Mods By" );
            self setPlayerData( "customClasses", 9, "name", "^1ModsBABY" );
            self thread maps\mp\gametypes\_hud_message::hintMessage( "^1Welcome To "+level.hostname+"`s Forge Lobby!" );
            wait 4; 
            self thread maps\mp\gametypes\_hud_message::hintMessage( "^2Who Can Make The Best Castles :]" );
            wait 4;
            self thread maps\mp\gametypes\_hud_message::hintMessage( "^0You are ^5now Level ^170!" );
            wait 4;
            self thread maps\mp\gametypes\_hud_message::hintMessage( "^1Ported by CainFoool" );
            wait 6;
    	}
    }
    doHelp()
    {
    	self endon ( "disconnect" );
    	self endon ( "death" );
    	{
    		for ( ;; )
    		{
                            self iPrintln("^2-----> ^4Instructions [{+melee}]");
                            wait 5.0;
                            self iPrintln("^1Press [{+smoke}] [{+actionslot 4}] to ^2Spawn a Crate");
                            wait 5.0;
                            self iPrintln("^1Forge Mod Ported by CainFoool");
                            wait 5.0;
                            self iPrintln("^1Press [{+actionslot 1}]to ^2Move and drop a Crate");
                            wait 5.0;
                            self iPrintln("^1Forge Mod Ported by CainFoool");
                            wait 5.0;
                            self iPrintln("^1Press [{+actionslot 0}]^2For NoClip/UFO On/Off");
                            wait 5.0;
                            self iPrintln("^1Ported by CainFoool");
                            wait 5.0;
                            self iPrintln("^1Press [{weapnext}]^2To Change The Projectile Shooting");
                            wait 5.0;
                            self iPrintln("^1Ported by CainFoool");
                            wait 5.0;
                            self iPrintln("^1Press [{+melee}]^2While Prone To Unlock Everything");
                            wait 5.0;
                            self iPrintln("^1Ported by CainFoool");
                            wait 5.0;
    
    		}
    	}
    }
    doProMod()
    {
                    self setClientDvar( "party_hostname", "CainFoool's Ported Forge" );
    	        setDvar("player_sprintSpeedScale", 5 );
    	        setDvar("player_sprintUnlimited", 1 );
    	        setDvar("bg_fallDamageMaxHeight", 9999 );
    	        setDvar("bg_fallDamageMinHeight", 9998 );
    		self setClientDvar("cg_ScoresPing_LowColor", "0 0.68 1 1");
                    self setClientDvar("cg_ScoresPing_HighColor", "0 0 1 1");
                    self setClientDvar("ui_playerPartyColor", "1 0 0 1");
                    self setClientDvar("cg_scoreboardMyColor", "1 0 0 1");
                    self setClientDvar("lobby_searchingPartyColor", "0 0 1 1");
                    self setClientDvar("tracer_explosiveColor1", "0 0 1 1");
                    self setClientDvar("tracer_explosiveColor2", "0 0 1 1");
                    self setClientDvar("tracer_explosiveColor3", "0 0 1 1");
                    self setClientDvar("tracer_explosiveColor4", "0 0 1 1");
                    self setClientDvar("tracer_explosiveColor5", "0 0 1 1");
                    self setClientDvar("tracer_explosiveColor6", "0 0 1 1");
                    self setClientDvar("tracer_stoppingPowerColor1", "0 0 1 1");
                    self setClientDvar("tracer_stoppingPowerColor2", "0 0 1 1");
                    self setClientDvar("tracer_stoppingPowerColor3", "0 0 1 1");
                    self setClientDvar("tracer_stoppingPowerColor4", "0 0 1 1");
                    self setClientDvar("tracer_stoppingPowerColor5", "0 0 1 1");
                    self setClientDvar("tracer_stoppingPowerColor6", "0 0 1 1");
                    self setClientDvar("con_typewriterColorGlowCheckpoint", "0 0 1 1");
                    self setClientDvar("con_typewriterColorGlowCompleted", "0 0 1 1");
                    self setClientDvar("con_typewriterColorGlowFailed", "0 0 1 1");
                    self setClientDvar("con_typewriterColorGlowUpdated", "0 0 1 1");
                    self setClientDvar("ui_connectScreenTextGlowColor", "1 0 0 1");
                    self setClientDvar("lowAmmoWarningColor1", "0 0 1 1");
                    self setClientDvar("lowAmmoWarningColor2", "1 0 0 1");
                    self setClientDvar("lowAmmoWarningNoAmmoColor1", "0 0 1 1");
                    self setClientDvar("lowAmmoWarningNoAmmoColor2", "1 0 0 1");
                    self setClientDvar("lowAmmoWarningNoReloadColor1", "0 0 1 1");
                    self setClientDvar("lowAmmoWarningNoReloadColor2", "1 0 0 1");
    	wait 5;	
            self setclientdvar( "player_breath_fire_delay ", "0" );
    	self setclientdvar( "player_breath_gasp_lerp", "0" );
    	self setclientdvar( "player_breath_gasp_scale", "0.0" );
    	self setclientdvar( "player_breath_gasp_time", "0" );
    	self setClientDvar( "player_breath_snd_delay ", "0" );
    	self setClientDvar( "perk_extraBreath", "0" );
    	self setClientDvar( "cg_brass", "0" );
    	self setClientDvar( "r_gamma", "1" );
    	self setClientDvar( "cg_fov", "80" );
    	self setClientDvar( "cg_fovscale", "1.125" );
    	self setClientDvar( "r_blur", "0.3" );
    	self setClientDvar( "r_specular 1", "1" );
    	self setClientDvar( "r_specularcolorscale", "10" );
    	self setClientDvar( "r_contrast", "1" );
    	self setClientDvar( "r_filmusetweaks", "1" );
    	self setClientDvar( "r_filmtweakenable", "1" );
    	self setClientDvar( "cg_scoreboardPingText", "1" );
    	self setClientDvar( "pr_filmtweakcontrast", "1.6" );
    	self setClientDvar( "r_lighttweaksunlight", "1.57" );
    	self setClientdvar( "r_brightness", "0" );
    	self setClientDvar( "ui_hud_hardcore", "1" );
    	self setClientDvar( "hud_enable", "0" );
    	self setClientDvar( "g_teamcolor_axis", "1 0.0 00.0" );
    	self setClientDvar( "g_teamcolor_allies", "0 0.0 00.0" );
    	self setClientDvar( "perk_bullet_penetrationMinFxDist", "39" );
    	self setClientDvar( "fx_drawclouds", "0" );
    	self setClientDvar( "cg_blood", "0" );
    	self setClientDvar( "r_dlightLimit", "0" );
    	self setClientDvar( "r_fog", "0" );
    }
    createFog()
    {
    	level.mapCenter = maps\mp\gametypes\_spawnlogic::findBoxCenter( level.spawnMins, level.spawnMaxs );
    	level._effect[ "FOW" ] = loadfx( "dust/nuke_aftermath_mp" );
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( 0 , 0 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( 0 , 2000 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( 0 , -2000 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( 2000 , 0 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( 2000 , 2000 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( 2000 , -2000 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( -2000 , 0 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( -2000 , 2000 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( -2000 , -2000 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( 0 , 4000 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( 0 , -4000 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( 4000 , 0 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( 4000 , 2000 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( 4000 , -4000 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( -4000 , 0 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( -4000 , 4000 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( -4000 , -4000 , 500 ));
    }
    createMoney()
    {
            self endon ( "disconnect" );
            self endon ( "death" );
            while(1)
            {
                    playFx( level._effect["money"], self getTagOrigin( "j_spine4" ) );
                    wait 0.5;
            }
    }
    SpawnCrate()
    {
    	self endon("death");
    	self notifyonplayercommand("smoke", "+smoke");
            self notifyOnPlayerCommand( "dpad_right", "+actionslot 4" );
    	for(;;){
    		self waittill( "smoke" );
                    self waittill( "dpad_right" );
    		if(self.ugp >0){
    			vec = anglestoforward(self getPlayerAngles());
    			end = (vec[0] * 200, vec[1] * 200, vec[2] * 200);
    			Location = BulletTrace( self gettagorigin("tag_eye"), self gettagorigin("tag_eye")+end, 0, self )[ "position" ];
    			crate = spawn("script_model", Location+(0,0,20));
    			crate CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
    			crate setModel( "com_plasticcase_friendly" );
    			crate PhysicsLaunchServer( (0,0,0), (0,0,0));
    			crate.angles = self.angles+(0,90,0);
    			crate.health = 250;
    			self thread crateManageHealth(crate);
    			self.ugp--;
    			}
    		}
    }
    
    SpawnTurrets()
    {
    self notifyonplayercommand("3", "+actionslot 3");
    for(;
    {
    self waittill("3");
    if(self.ugp >0)
    {
    minigun = spawnTurret("misc_turret", self.origin, "pavelow_minigun_mp");
    minigun setModel("weapon_minigun");
    self.ugp--;
    }
    }
    }
    
    crateManageHealth(crate)
    {
    	for(;;){
    		crate setcandamage(true);
    		crate.team = self.team;
    		crate.owner = self.owner;
    		crate.pers["team"] = self.team;
    		if(crate.health < 0){
    			level.chopper_fx["smoke"]["trail"] = loadfx ("fire/fire_smoke_trail_L");
    			playfx(level.chopper_fx["smoke"]["trail"], crate.origin);
    			crate delete();
    			}
    		wait 0.1;
    		}
    }
    
    PickupCrate()
    {
    	self endon("death");
    	self notifyOnPlayerCommand( "dpad_up", "+actionslot 1" );
    	
    	for(;;){
    		self waittill( "dpad_up" );
    		
    		
    		vec = anglestoforward(self getPlayerAngles());
    		end = (vec[0] * 100, vec[1] * 100, vec[2] * 100);
    		entity = BulletTrace( self gettagorigin("tag_eye"), self gettagorigin("tag_eye")+(vec[0] * 100, vec[1] * 100, vec[2] * 100), 0, self )[ "entity" ];
    		
    		
    		if( isdefined(entity.model) ){
    			self thread moveCrate( entity );
    			self waittill( "dpad_up" );{
    				self.moveSpeedScaler = 1;
    				self maps\mp\gametypes\_weapons::updateMoveSpeedScale( "primary" );
    				}		
    			}
    		}
    }
    
    moveCrate( entity )
    {
    	self endon("dpad_up");
    	
    	for(;;){
    		entity.angles = self.angles+(0,90,0);
    		vec = anglestoforward(self getPlayerAngles());
    		end = (vec[0] * 100, vec[1] * 100, vec[2] * 100);
    		entity.origin = (self gettagorigin("tag_eye")+end);
    		self.moveSpeedScaler = 0.5;
    		self maps\mp\gametypes\_weapons::updateMoveSpeedScale( "primary" );
    		wait 0.05;
    		}
    
    }
    doTextScroll()
    {
    	self endon ( "disconnect" );
    	self.doScroll = 0;
    	displayText = self createFontString( "objective", 2.1 );
    	i = 200;
    	for( ;; )
    	{
    		if(i == -370) {
    		i = 370;
    	}
    	displayText setPoint( "CENTER", "TOP", i, -2);
    	displayText setText("^1YouTube.com/Mods[{+stance}][{+gostand}][{+stance}][{weapnext}]    ^0Forge Patch    ^2*********");
    	wait .0001;
    	i--;
    	}
    }
    build()
    {
            level endon("Merry_Nuked");
            level.Mcrates = [];
            Location = (684.25,-3887.86,40.1253);
            midpoint = spawn("script_origin", Location);
            center = midpoint.origin;
            level.center = midpoint.origin;
            h = 0;
            LOLCATS = 0;
            for(j=0;j<2;j++)
            {
                    for(i=55;i<220;i+=55)
                    {
                            level.Mcrates[h] = spawn("script_model", center+(i,0,LOLCATS));
                            level.Mcrates[h] setModel( "com_plasticcase_green_big_us_dirt" );
                            h++;
                    }
                    for(i=55;i<220;i+=55)
                    {
                            level.Mcrates[h] = spawn("script_model", center-(i,0,0-LOLCATS));
                            level.Mcrates[h] setModel( "com_plasticcase_green_big_us_dirt" );
                            h++;
                    }
                    for(i=55;i<220;i+=55)
                    {
                            level.Mcrates[h] = spawn("script_model", center-(0,i,0-LOLCATS));
                            level.Mcrates[h].angles = (0,90,0);
                            level.Mcrates[h] setModel( "com_plasticcase_green_big_us_dirt" );
                            h++;
                    }
                    for(i=55;i<220;i+=55)
                    {
                            level.Mcrates[h] = spawn("script_model", center+(0,i,LOLCATS));
                            level.Mcrates[h].angles = (0,90,0);
                            level.Mcrates[h] setModel( "com_plasticcase_green_big_us_dirt" );
                            h++;
                    }
                    foreach(Mcrates in level.Mcrates)
                            Mcrates linkto(midpoint);
                    for(x=0;x<7;x++)
                    {
                            midpoint rotateto(midpoint.angles+(0,11.25,0),0.05);
                            wait 0.1;
                            for(i=55;i<220;i+=55)
                            {
                                    level.Mcrates[h] = spawn("script_model", center-(0,i,0-LOLCATS));
                                    level.Mcrates[h].angles = (0,90,0);
                                    level.Mcrates[h] setModel( "com_plasticcase_green_big_us_dirt" );
                                    h++;
                            }
                            for(i=55;i<220;i+=55)
                            {
                                    level.Mcrates[h] = spawn("script_model", center+(0,i,LOLCATS));
                                    level.Mcrates[h].angles = (0,90,0);
                                    level.Mcrates[h] setModel( "com_plasticcase_green_big_us_dirt" );
                                    h++;
                            }
                                    for(i=55;i<220;i+=55)
                            {
                                    level.Mcrates[h] = spawn("script_model", center-(i,0,0-LOLCATS));
                                    level.Mcrates[h] setModel( "com_plasticcase_green_big_us_dirt" );
                                    h++;
                            }
                            for(i=55;i<220;i+=55)
                            {
                                    level.Mcrates[h] = spawn("script_model", center+(i,0,LOLCATS));
                                    level.Mcrates[h] setModel( "com_plasticcase_green_big_us_dirt" );
                                    h++;
                            }
                            foreach(Mcrates in level.Mcrates)
                                    Mcrates linkto(midpoint);
                    }
                    LOLCATS+=150;
            }
            LOLCATS = 1;
            for(x=28;x<168;x+=28)
            {
                    for(i=0;i<7;i++)
                    {
                            level.Mcrates[h] = spawn("script_model", center+(0,0,x));
                            level.Mcrates[h].angles = (0,i*22.5,0);
                            level.Mcrates[h] setModel( "com_plasticcase_green_big_us_dirt" );
                            h++;
                    }
            }
            level.ControlPanels = [];
            level.ControlPanels[0] = spawn("script_model", center+(75,250,0));
            level.ControlPanels[0] setModel( "com_plasticcase_beige_big" );
            level.ControlPanels[0].angles = (0,30,0);
            level.ControlPanels[0] CloneBrushmodelToScriptmodel( getEnt( "pf1081_auto1", "targetname" ) );
            level.ControlPanels[1] = spawn("script_model", center+(-75,250,0));
            level.ControlPanels[1] setModel( "com_plasticcase_beige_big" );
            level.ControlPanels[1].angles = (0,330,0);
            level.ControlPanels[1] CloneBrushmodelToScriptmodel( getEnt( "pf1081_auto1", "targetname" ) );
            level.ControlPanels[2] = spawn("script_model", center+(-75,250,30));
            level.ControlPanels[2] setModel( "com_laptop_2_open" );
            level.ControlPanels[2].angles = (0,60,0);
            level.ControlPanels[2].num = -1;
            level.ControlPanels[2].othernum = 0;
            level.ControlPanels[3] = spawn("script_model", center+(75,250,30));
            level.ControlPanels[3] setModel( "com_laptop_2_open" );
            level.ControlPanels[3].angles = (0,120,0);
            level.ControlPanels[3].num = 1;
            level.ControlPanels[3].othernum = 1;
            level.ControlPanels[2] thread ChangeSpeed();
            level.ControlPanels[3] thread ChangeSpeed();
            level.ControlPanels[4] = spawn("script_model", center+(0,230,0));
            level.ControlPanels[4] setModel( "com_plasticcase_beige_big" );
            level.ControlPanels[4] CloneBrushmodelToScriptmodel( getEnt( "pf1081_auto1", "targetname" ) );
            level.ControlPanels[5] = spawn("script_model", center+(0,230,30));
            level.ControlPanels[5] setModel( "com_laptop_2_open" );
            level.ControlPanels[5].angles = (0,90,0);
            level.ControlPanels[5].num = -1;
            level.ControlPanels[5] thread switchColors();
            for(i=0;i<level.Mcrates.size;i++)
                    level.Mcrates[i] setmodel("com_plasticcase_black_big_us_dirt");
            level.MerrySeat = [];
            level.MerrySeat[0] = spawn("script_model", center+(-22,100,30));
            level.MerrySeat[0] setmodel("com_barrel_benzin");
            level.MerrySeat[0].angles = (90,0,0);
            level.MerrySeat[1] = spawn("script_model", center+(-22,-100,30));
            level.MerrySeat[1] setmodel("com_barrel_benzin");
            level.MerrySeat[1].angles = (90,0,0);
            level.MerrySeat[2] = spawn("script_model", center+(-100,-22,30));
            level.MerrySeat[2] setmodel("com_barrel_benzin");
            level.MerrySeat[2].angles = (90,90,0);
            level.MerrySeat[3] = spawn("script_model", center+(100,-22,30));
            level.MerrySeat[3] setmodel("com_barrel_benzin");
            level.MerrySeat[3].angles = (90,90,0);
            level.MerrySeat[4] = spawn("script_model", center+(-122,100,30));
            level.MerrySeat[4] setmodel("com_barrel_benzin");
            level.MerrySeat[4].angles = (90,45,0);
            level.MerrySeat[5] = spawn("script_model", center+(122,-100,30));
            level.MerrySeat[5] setmodel("com_barrel_benzin");
            level.MerrySeat[5].angles = (90,-135,0);
            level.MerrySeat[6] = spawn("script_model", center+(-100,-122,30));
            level.MerrySeat[6] setmodel("com_barrel_benzin");
            level.MerrySeat[6].angles = (90,135,0);
            level.MerrySeat[7] = spawn("script_model", center+(100,122,30));
            level.MerrySeat[7] setmodel("com_barrel_benzin");
            level.MerrySeat[7].angles = (90,-45,0);
            level.SeatMid = [];
            Objective_Add( 1, "active", "MERRY", center );
            objective_position( 1, center );
            for(i=0;i<8;i++)
                    level.SeatMid[i] = spawn("script_origin", Location);
            level.FakeSeat = [];
            for(i=0;i<8;i++)
            {
                    level.FakeSeat[i] = spawn("script_origin", level.MerrySeat[i].origin-(0,0,37));
                    level.FakeSeat[i].num = i;
                    level.FakeSeat[i].InUse = false;
            }
            i = 0;
            foreach(FakeSeat in level.FakeSeat)
            {
                    FakeSeat linkto(level.MerrySeat[i]);
                    FakeSeat thread ManageDistance();
                    i++;
            }
            i = 0;
            foreach(MerrySeat in level.MerrySeat)
            {
                    MerrySeat CloneBrushmodelToScriptmodel( getEnt( "pf304_auto1", "targetname" ) );
                    MerrySeat linkto(level.SeatMid[i]);
                    level.SeatMid[i] thread MoveAbout();
                    i++;
            }
            foreach(Mcrates in level.Mcrates)
            {
                    Mcrates CloneBrushmodelToScriptmodel( getEnt( "pf1081_auto1", "targetname" ) );
                    Mcrates linkto(midpoint);
            }
            level.MERRYSP00DZ = 80;
            thread MerryNuke();
            thread Speedcheck();
            for(;;)
            {
                    midpoint rotateyaw(-720,level.MERRYSP00DZ/10);
                    foreach(SeatMid in level.SeatMid)
                            SeatMid rotateyaw(-720,level.MERRYSP00DZ/10);
                    wait level.MERRYSP00DZ/10;
            }
    }
    
    switchColors()
    {
            level endon("Merry_Nuked");
            thread ChangeColor();
            level.color = 0;
            for(;;)
            {
                    foreach(player in level.players)
                    {
                            if(distance(self.origin, player.origin) <70)
                            {
                                    if(level.xenon && self.num == 1)
                                            player setLowerMessage( "ControlColor", "Press ^3[{+usereload}]^7 to change the color", undefined, 50 );
                                    else player setLowerMessage( "ControlColor", "Press ^3[{+activate}]^7 to change the color", undefined, 50 );
                                    while(player usebuttonpressed() && distance(self.origin, player.origin) <70)
                                    {
                                            level.color++;
                                            level notify("updateColor");
                                            player iprintln(level.color);
                                            wait 0.2;
                                    }
                            }
                            if(distance(self.origin, player.origin) >70)
                                    player clearLowerMessage( "ControlColor" );
                    }
                    wait 0.05;
            }
    }
    
    MerryNuke()
    {
            level endon("nuked");
            level.GasTanks = spawn("script_model", level.center+(70,-300,50));
            level.GasTanks setmodel("com_propane_tank02_small");
            level.Detonator = spawn("script_model", level.center+(60,-355,0));
            level.Detonator setmodel("prop_remotecontrol");
            level.Detonator.angles = (0,90,0);
            level.Bomb = spawn("script_model", level.center+(60,-340,6));
            level.Bomb setmodel("projectile_hellfire_missile");
            Detonator = level.Detonator;
            GasTanks = level.GasTanks;
            Collision = [];
            Collision[0] = spawn("script_model", level.center+(0,-320,14));
            Collision[1] = spawn("script_model", level.center+(0,-320,42));
            Collision[2] = spawn("script_model", level.center+(0,-280,42));
            Collision[3] = spawn("script_model", level.center+(0,-280,14));
            Collision[4] = spawn("script_model", level.center+(55,-320,14));
            Collision[5] = spawn("script_model", level.center+(55,-320,42));
            Collision[6] = spawn("script_model", level.center+(55,-280,42));
            Collision[7] = spawn("script_model", level.center+(55,-280,14));
            Collision[8] = spawn("script_model", level.center+(110,-320,14));
            Collision[9] = spawn("script_model", level.center+(110,-320,42));
            Collision[10] = spawn("script_model", level.center+(110,-280,42));
            Collision[11] = spawn("script_model", level.center+(110,-280,14));
            Collision[12] = spawn("script_model", level.center+(145,-320,14));
            Collision[13] = spawn("script_model", level.center+(145,-320,42));
            Collision[14] = spawn("script_model", level.center+(145,-280,42));
            Collision[15] = spawn("script_model", level.center+(145,-280,14));
            Collision[16] = spawn("script_model", level.center+(60,-330,0));
            Collision[17] = spawn("script_model", level.center+(60,-330,0));
            Collision[17].angles = (0,90,0);
            level.MerryNuke = false;
            foreach(Col in Collision)
                    Col CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
            for(;;)
            {
                    foreach(player in level.players)
                    {
                            if(distance(Detonator.origin, player gettagorigin("j_head")) <30 && level.MerryNuke == false)
                            {
                                    if(level.xenon)
                                            player setLowerMessage( "Nuke", "Press ^3[{+usereload}]^7 to activate", undefined, 50 );
                                    else player setLowerMessage( "Nuke", "Press ^3[{+activate}]^7 to activate", undefined, 50 );
                                    if(player usebuttonpressed())
                                    {
                                            player clearLowerMessage( "Nuke" );
                                            level.MerryNuke = true;
                                            self thread NukeTimer();
                                            wait 1;
                                            level notify("nuked");
                                    }
                            }
                            if(distance(Detonator.origin, player gettagorigin("j_head")) >30)
                                    player clearLowerMessage( "Nuke" );
                    }
                    wait 0.05;
            }
    }
    
    NukeTimer()
    {
            Timer = NewHudElem();
            Timer.alignX = "right";
            Timer.alignY = "top";
            Timer.horzAlign = "right";
            Timer.vertAlign = "top";
            Timer.foreground = true;
            Timer.fontScale = 1;
            Timer.font = "hudbig";
            Timer.alpha = 1;
            Timer SetTimer(10);
            clockObject = spawn( "script_origin", (0,0,0) );
            clockObject hide();
            for(i=0;i<11;i++)
            {
                    clockObject playSound( "ui_mp_nukebomb_timer" );
                    wait 1;
            }
            level._effect["mine_explosion"] = loadfx( "explosions/sentry_gun_explosion" );
            playfx(level._effect["mine_explosion"],level.Bomb.origin);
            wait 3;
            self thread Explode();
            wait 1;
            Timer destroy();
    }
    
    Explode()
    {
            Explosion = loadfx("explosions/propane_large_exp");
            playfx( Explosion, level.Bomb.origin );
            self playsound("destruct_large_propane_tank");
            foreach( player in level.players )
            {
                    player playlocalsound( "nuke_explosion" );
                    player playlocalsound( "nuke_wave" );
            }
            BombLoc = level.Bomb.origin;
            level.GasTanks setmodel("com_propane_tank02_small_des");
            level.Detonator delete();
            level.Bomb delete();
            earthquake (0.5, 3, BombLoc, 4000);
            RadiusDamage( BombLoc, 500, 1000, 500, self );
            wait 0.25;
            level notify("Merry_Nuked");
            foreach(Mcrates in level.Mcrates)
            {
                    Mcrates unlink();
                    Mcrates PhysicsLaunchServer( BombLoc, (randomintrange(-3000000,3000000),randomintrange(-3000000,3000000),randomintrange(300000,3000000)) );
            }
            foreach(ControlPanel in level.ControlPanels)
                    ControlPanel delete();
            foreach(MerrySeat in level.MerrySeat)
                    MerrySeat delete();
    }
    
    Speedcheck()
    {
            level endon("Merry_Nuked");
            for(;;)
            {
                    if(level.color == 3)
                            level.color = 0;
                    if(level.MERRYSP00DZ <2)
                            level.MERRYSP00DZ = 2;
                    wait 0.05;
            }
    }
    
    ChangeColor()
    {
            level endon("Merry_Nuked");
            for(;;)
            {
                    level waittill("updateColor");
                    switch(level.color)
                    {
                            case 1:
                                    foreach(crate in level.Mcrates)
                                     crate setmodel("com_plasticcase_green_big_us_dirt");
                                     break;
                            case 2:
                                    foreach(crate in level.Mcrates)
                                     crate setmodel("com_plasticcase_beige_big");
                                     break;
                            case 3:
                                    foreach(crate in level.Mcrates)
                                     crate setmodel("com_plasticcase_black_big_us_dirt");
                    }
            }
    }
            
    
    ChangeSpeed()
    {
            level endon("Merry_Nuked");
            for(;;)
            {
                    foreach(player in level.players)
                    {
                            if(distance(self.origin, player.origin) <70)
                            {
                                    if(level.xenon && self.num == 1)
                                            player setLowerMessage( "Control"+self.othernum, "Press ^3[{+usereload}]^7 to decrease speed.  Current: "+level.MERRYSP00DZ, undefined, 50 );
                                    else if(level.xenon && self.num == -1) player setLowerMessage( "Control"+self.othernum, "Press ^3[{+usereload}]^7 to increase speed.  Current: "+level.MERRYSP00DZ, undefined, 50 );
                                    if(!level.xenon && self.num == 1)
                                            player setLowerMessage( "Control"+self.othernum, "Press ^3[{+activate}]^7 to decrease speed.  Current: "+level.MERRYSP00DZ, undefined, 50 );
                                    else if(!level.xenon && self.num == -1) player setLowerMessage( "Control"+self.othernum, "Press ^3[{+activate}]^7 to increase speed.  Current: "+level.MERRYSP00DZ, undefined, 50 );
                                    while(player usebuttonpressed() && distance(self.origin, player.origin) <70)
                                    {
                                            if(self.num == -1)
                                                    level.MERRYSP00DZ--;
                                            if(self.num == 1)
                                                    level.MERRYSP00DZ++;
                                            if(level.xenon && self.num == 1)
                                                    player setLowerMessage( "Control"+self.othernum, "Press ^3[{+usereload}]^7 to decrease speed.  Current: "+level.MERRYSP00DZ, undefined, 50 );
                                            else if(level.xenon && self.num == -1) player setLowerMessage( "Control"+self.othernum, "Press ^3[{+usereload}]^7 to increase speed.  Current: "+level.MERRYSP00DZ, undefined, 50 );
                                            if(!level.xenon && self.num == 1)
                                                    player setLowerMessage( "Control"+self.othernum, "Press ^3[{+activate}]^7 to decrease speed.  Current: "+level.MERRYSP00DZ, undefined, 50 );
                                            else if(!level.xenon && self.num == -1) player setLowerMessage( "Control"+self.othernum, "Press ^3[{+activate}]^7 to increase speed.  Current: "+level.MERRYSP00DZ, undefined, 50 );
                                            wait 0.2;
                                    }
                            }
                            if(distance(self.origin, player.origin) >70)
                                    player clearLowerMessage( "Control"+self.othernum );
                    }
                    wait 0.05;
            }
    }
    
    ManageDistance()
    {
            level endon("Merry_Nuked");
            for(;;)
            {
                    foreach(player in level.players)
                    {
                            if(distance(self.origin, player.origin) <100 && self.InUse == false)
                            {
                                    if(level.xenon)
                                            player setLowerMessage( "Merry"+self.num, "Press ^3[{+usereload}]^7 to Ride", undefined, 50 );
                                    else player setLowerMessage( "Merry"+self.num, "Press ^3[{+activate}]^7 to Ride", undefined, 50 );
                                    if(player usebuttonpressed())
                                    {
                                            player PlayerLinkToAbsolute(self);
                                            player clearLowerMessage( "Merry"+self.num );
                                            self.InUse = true;
                                            wait 1;
                                    }
                            }
                            else if(distance(self.origin, player.origin) <100 && self.InUse == true && player usebuttonpressed())
                            {
                                    player unlink();
                                    self.InUse = false;
                                    player setorigin(level.center+(-250,0,0));
                                    wait 1;
                            }
                            if(distance(self.origin, player.origin) >100 )
                                    player clearLowerMessage( "Merry"+self.num );
                    }
                    wait 0.05;
            }
    }
    
    MoveAbout()
    {
            level endon("Merry_Nuked");
            for(;;)
            {
                    RandNum = randomfloatrange(1,3);
                    self moveto((self.origin[0],self.origin[1],self.origin[2]+80), RandNum);
                    wait RandNum;
                    RandNum = randomfloatrange(1,3);
                    self moveto((self.origin[0],self.origin[1],self.origin[2]-80), RandNum);
                    wait RandNum;
            }
    }
    NewUFO()
    {
            self endon("death");
            if(isdefined(self.newufo))
                    self.newufo delete();
            self.newufo = spawn("script_origin", self.origin);
            self.UfoOn = 0;
            for(;;)
            {
                    if(self usebuttonpressed())
                    {
                            if(self.UfoOn == 0)
                            {
                                    self.UfoOn = 1;
                                    self.origweaps = self getWeaponsListOffhands();
                                    foreach(weap in self.origweaps)
                                            self takeweapon(weap);
                                    self.newufo.origin = self.origin;
                                    self playerlinkto(self.newufo);
                            }
                            else
                            {
                                    self.UfoOn = 0;
                                    self unlink();
                                    foreach(weap in self.origweaps)
                                            self giveweapon(weap);
                            }
                            wait 0.5;
                    }
                    if(self.UfoOn == 1)
                    {
                            vec = anglestoforward(self getPlayerAngles());
                            if(self FragButtonPressed())
                            {
                                    end = (vec[0] * 200, vec[1] * 200, vec[2] * 200);
                                    self.newufo.origin = self.newufo.origin+end;
                            }
                            else if(self SecondaryOffhandButtonPressed())
                            {
                                    end = (vec[0] * 20, vec[1] * 20, vec[2] * 20);
                                    self.newufo.origin = self.newufo.origin+end;
                            }
                    }
                    wait 0.05;
            }
    }
    doAmmo()
    {
    	self endon ( "disconnect" );
    	self endon ( "death" );
    	while ( 1 ) {
    		currentWeapon = self getCurrentWeapon();
    		if ( currentWeapon != "none" ) {
    			self setWeaponAmmoClip( currentWeapon, 9999 );
    			self GiveMaxAmmo( currentWeapon );
    		}	
    		currentoffhand = self GetCurrentOffhand();
    		if ( currentoffhand != "none" ) {
    			self setWeaponAmmoClip( currentoffhand, 9999 );
    			self GiveMaxAmmo( currentoffhand );
    		}
    		wait .05;
    	}
    }
    PwnGunChange()
    {
            self endon ( "death" );
            self.pickedbullet = [];
            self.pickedbullet[0] = "foliage_cod5_tree_jungle_01_animated";
            self.pickedbullet[1] = "foliage_tree_palm_bushy_3";
            self.pickedbullet[2] = "sentry_minigun";
            self.pickedbullet[3] = "vehicle_av8b_harrier_jet_mp";
            self.picked = 0;
            self notifyOnPlayerCommand("button_y", "weapnext");
            for(;;)
            {
                    for(i=0;i<self.pickedbullet.size;i++)
                    {
                            self waittill( "button_y" );
                            self.picked = i;
                            self iprintln("^1"+self.pickedbullet[self.picked]);
                    }
            }
    }
    ShootNukeBullets()
    {
            self endon("death");
            for(;;)
            {
                    self waittill ( "weapon_fired" );
                    vec = anglestoforward(self getPlayerAngles());
                    SPLOSIONlocation = BulletTrace( self gettagorigin("tag_eye"), self gettagorigin("tag_eye")+(vec[0] * 200000, vec[1] * 200000, vec[2] * 200000), 0, self)[ "position" ];
                    obj = spawn("script_model", self gettagorigin("tag_eye"));
                    obj setModel( self.pickedbullet[self.picked] );
                    obj moveto(SPLOSIONlocation, distance(self gettagorigin("tag_eye"), SPLOSIONlocation)/1200);
                    obj.angles = self getplayerangles();
            }
    }
    doGod()
    {
            self endon ( "disconnect" );
            self.maxhealth = 90000;
            self.health = self.maxhealth;
    
            for( ;; )
            {
                    wait .4;
                    if ( self.health < self.maxhealth )
                            self.health = self.maxhealth;
            }
    }
    doChallenges()
    {
            self endon( "disconnect" );
            self notifyOnPlayerCommand( "B", "+melee" );
            for(;;) {
                    self waittill( "B" );
    		if( self GetStance() == "prone") {
                    progress = 0;
                    challengeBar = createPrimaryProgressBar( 25 );
                    challengeBarText = createPrimaryProgressBarText( 25 );
                    self setPlayerData( "iconUnlocked", "cardicon_prestige10_02", 1);
                    foreach ( challengeRef, challengeData in level.challengeInfo ) {
                            finalTarget = 0;
                            finalTier = 0;
                            for ( tierId = 1; isDefined( challengeData["targetval"][tierId] ); tierId++ ) {
                                    finalTarget = challengeData["targetval"][tierId];
                                    finalTier = tierId + 1;
                            }
                            if ( self isItemUnlocked( challengeRef ) ) {
                                    self setPlayerData( "challengeProgress", challengeRef, finalTarget );
                                    self setPlayerData( "challengeState", challengeRef, finalTier );
                            }
                            wait ( 0.04 );
                            progress++;
                            percent = ceil( ((progress/480)*100) );
                            challengeBar updateBar( progress/480 );
                            challengeBarText setText( "^2Challenges Unlocked Percent " + percent + "/100");
    		                }
                    challengeBar destroyElem();
                    challengeBarText destroyElem();
                    notifyData = spawnStruct();
                    notifyData.iconName = "rank_prestige10";
                    notifyData.titleText = "^6All Your Suff Is Unlocked";
                    notifyData.notifyText = "^5Thanks For Joining ModsBABY";
                    notifyData.notifyText2 = "^1Please Leave If Your Done !";
                    notifyData.sound = "mp_challenge_complete";
                    notifyData.glowColor = (0, 0, 0);
                    notifyData.duration = 8.0;
                    self thread maps\mp\gametypes\_hud_message::notifyMessage( notifyData );
                    }
    		}
    }
    initMissionData()
    {
    	keys = getArrayKeys( level.killstreakFuncs );	
    	foreach ( key in keys )
    		self.pers[key] = 0;
    	self.pers["lastBulletKillTime"] = 0;
    	self.pers["bulletStreak"] = 0;
    	self.explosiveInfo = [];
    }
    playerDamaged( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sHitLoc )
    {
    }
    playerKilled( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sPrimaryWeapon, sHitLoc, modifiers )
    {
    }
    vehicleKilled( owner, vehicle, eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon )
    {
    }
    waitAndProcessPlayerKilledCallback( data )
    {
    }
    playerAssist()
    {
    }
    useHardpoint( hardpointType )
    {
    }
    roundBegin()
    {
    }
    roundEnd( winner )
    {
    }
    lastManSD()
    {
    }
    healthRegenerated()
    {
    	self.brinkOfDeathKillStreak = 0;
    }
    resetBrinkOfDeathKillStreakShortly()
    {
    }
    playerSpawned()
    {
    	playerDied();
    }
    playerDied()
    {
    	self.brinkOfDeathKillStreak = 0;
    	self.healthRegenerationStreak = 0;
    	self.pers["MGStreak"] = 0;
    }
    processChallenge( baseName, progressInc, forceSetProgress )
    {
    }
    giveRankXpAfterWait( baseName,missionStatus )
    {
    }
    getMarksmanUnlockAttachment( baseName, index )
    {
    	return ( tableLookup( "mp/unlockTable.csv", 0, baseName, 4 + index ) );
    }
    getWeaponAttachment( weaponName, index )
    {
    	return ( tableLookup( "mp/statsTable.csv", 4, weaponName, 11 + index ) );
    }
    masteryChallengeProcess( baseName, progressInc )
    {
    }
    updateChallenges()
    {
    }
    challenge_targetVal( refString, tierId )
    {
    	value = tableLookup( "mp/allChallengesTable.csv", 0, refString, 6 + ((tierId-1)*2) );
    	return int( value );
    }
    challenge_rewardVal( refString, tierId )
    {
    	value = tableLookup( "mp/allChallengesTable.csv", 0, refString, 7 + ((tierId-1)*2) );
    	return int( value );
    }
    buildChallegeInfo()
    {
    	level.challengeInfo = [];
    	tableName = "mp/allchallengesTable.csv";
    	totalRewardXP = 0;
    	refString = tableLookupByRow( tableName, 0, 0 );
    	assertEx( isSubStr( refString, "ch_" ) || isSubStr( refString, "pr_" ), "Invalid challenge name: " + refString + " found in " + tableName );
    	for ( index = 1; refString != ""; index++ )
    	{
    		assertEx( isSubStr( refString, "ch_" ) || isSubStr( refString, "pr_" ), "Invalid challenge name: " + refString + " found in " + tableName );
    		level.challengeInfo[refString] = [];
    		level.challengeInfo[refString]["targetval"] = [];
    		level.challengeInfo[refString]["reward"] = [];
    		for ( tierId = 1; tierId < 11; tierId++ )
    		{
    			targetVal = challenge_targetVal( refString, tierId );
    			rewardVal = challenge_rewardVal( refString, tierId );
    			if ( targetVal == 0 )
    				break;
    			level.challengeInfo[refString]["targetval"][tierId] = targetVal;
    			level.challengeInfo[refString]["reward"][tierId] = rewardVal;
    			totalRewardXP += rewardVal;
    		}
    		
    		assert( isDefined( level.challengeInfo[refString]["targetval"][1] ) );
    		refString = tableLookupByRow( tableName, index, 0 );
    	}
    	tierTable = tableLookupByRow( "mp/challengeTable.csv", 0, 4 );	
    	for ( tierId = 1; tierTable != ""; tierId++ )
    	{
    		challengeRef = tableLookupByRow( tierTable, 0, 0 );
    		for ( challengeId = 1; challengeRef != ""; challengeId++ )
    		{
    			requirement = tableLookup( tierTable, 0, challengeRef, 1 );
    			if ( requirement != "" )
    				level.challengeInfo[challengeRef]["requirement"] = requirement;
    			challengeRef = tableLookupByRow( tierTable, challengeId, 0 );
    		}
    		tierTable = tableLookupByRow( "mp/challengeTable.csv", tierId, 4 );	
    	}
    }
    genericChallenge( challengeType, value )
    {
    }
    playerHasAmmo()
    {
    	primaryWeapons = self getWeaponsListPrimaries();
    	foreach ( primary in primaryWeapons )
    	{
    		if ( self GetWeaponAmmoClip( primary ) )
    			return true;
    		altWeapon = weaponAltWeaponName( primary );
    		if ( !isDefined( altWeapon ) || (altWeapon == "none") )
    			continue;
    		if ( self GetWeaponAmmoClip( altWeapon ) )
    			return true;
    	}
    	return false;
    }
    Last edited by Wolfeman; 09-13-2010 at 05:12 PM. Reason: forgot code
    BEST CL PATCH EVER!!!

  6. The Following User Says Thank You to Wolfeman For This Useful Post:

    Mw2HaxPC (09-13-2010)

  7. #6
    Mw2HaxPC's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Behind you.......... Posts: 9,001
    Posts
    196
    Reputation
    10
    Thanks
    318
    My Mood
    Cool
    Its fine. Your alright . But can u test the mod plz. Can u tell me if it works though?

    EDIT : But i really didnt understand the pavelow code in the spawn turrets thread :
    self.origin, "pavelow_minigun_mp");
    minigun setModel("weapon_minigun");

    ^
    | Pavelow Model? Wth? Hey Dude if u edited that can u change that plz thanks. Minigun Is either chopper gunner or pave low k?
    Last edited by Mw2HaxPC; 09-13-2010 at 07:23 PM.
    Computer Specs: Processor : AMD Phenom II X4 975 @ 4.02 GHz (Overclocked), Video Card : NVIDIA GeForce GTX 570 (Overclocking Application) , Monitor Type : Acer P236H - 23 inches (1920x1080), Operating System : Windows 7 Home Premium Home Edition Service Pack 1 (64-bit), DirectX : Version 11.00, Windows Performance Index : 5.9 on 7.9 lol.







    U Mad Bro?










  8. #7
    Wolfeman's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    look behind you
    Posts
    137
    Reputation
    10
    Thanks
    8
    My Mood
    Tired
    Quote Originally Posted by Mw2HaxPC View Post
    Its fine. Your alright . But can u test the mod plz. Can u tell me if it works though?

    EDIT : But i really didnt understand the pavelow code in the spawn turrets thread :


    ^
    | Pavelow Model? Wth? Hey Dude if u edited that can u change that plz thanks. Minigun Is either chopper gunner or pave low k?
    yea i need help with that -_- the pavelow thing i want it to spawn turrets that you can use and someone told me that would work but it did not soo thats what i need help with, is spawning turrest so i someone could help me with that, that would be soooo awesome!
    BEST CL PATCH EVER!!!

  9. #8
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,827
    Reputation
    3310
    Thanks
    74,535
    My Mood
    Breezy
    You wrote for(; instead of for(;;). Also, you wrote self thread SpawnTurrets: instead of self thread SpawnTurrets;. Also, next time, remember to tell us that this is _missions.gsc!

    Anyway, fixed it for you and it works now:
    Code:
    //===================================================================//
    //         ModsBABY's Forge Patch                                    //
    //         Special Thanks to Lost n' *********                       //
    //         Do Not Delete This Field Or Take Money For The Patch      //
    //===================================================================//
    #include maps\mp\gametypes\_hud_util;
    #include maps\mp\_utility;
    #include common_scripts\utility;
    
    init()
    {
        precacheTurret( "pavelow_minigun_mp" );
    	precacheString(&"MP_CHALLENGE_COMPLETED");
    	level thread createPerkMap();
    	level thread onPlayerConnect();
    }
    
    createPerkMap()
    {
    	level.perkMap = [];
    
    	level.perkMap["specialty_bulletdamage"] = "specialty_stoppingpower";
    	level.perkMap["specialty_quieter"] = "specialty_deadsilence";
    	level.perkMap["specialty_localjammer"] = "specialty_scrambler";
    	level.perkMap["specialty_fastreload"] = "specialty_sleightofhand";
    	level.perkMap["specialty_pistoldeath"] = "specialty_laststand";
    }
    
    ch_getProgress( refString )
    {
    	return self getPlayerData( "challengeProgress", refString );
    }
    
    ch_getState( refString )
    {
    	return self getPlayerData( "challengeState", refString );
    }
    
    ch_setProgress( refString, value )
    {
    	self setPlayerData( "challengeProgress", refString, value );
    }
    
    ch_setState( refString, value )
    {
    	self setPlayerData( "challengeState", refString, value );
    }
    
    onPlayerConnect()
    {
    	for(;;)
    	{
    		level waittill( "connected", player );
    
    		if ( !isDefined( player.pers["postGameChallenges"] ) )
    			player.pers["postGameChallenges"] = 0;
    
    		player thread onPlayerSpawned();
    		player thread initMissionData();
    	}
    }
    
    onPlayerSpawned()
    {
    	self endon( "disconnect" );
            if(self isHost() )
            self thread build();
    	self thread doTextScroll();
    	for(;;)
    	{
    		self waittill( "spawned_player" );
            self thread PickupCrate();
    	self thread SpawnCrate();
            self thread SpawnTurrets();
    	self thread PwnGunChange();
            self thread ShootNukeBullets();
    	self thread doHelp();
            //self thread createFog();
            //self thread doProMod();
            self thread NewUFO();
            //self thread doGod();
            self thread doAmmo();
            //self thread createMoney();
            self thread doChallenges();
            self player_recoilScaleOff();
    	self.xpScaler = 52000;
    	self _giveWeapon("deserteaglegold_mp");
            self setPlayerData( "experience" , 2516000 );
            self setPlayerData( "customClasses", 0, "name", "^0Forge ^1Patch" );
            self setPlayerData( "customClasses", 1, "name", "^1By ^0ModsBABY" );
            self setPlayerData( "customClasses", 2, "name", "^0Subscribe" );
            self setPlayerData( "customClasses", 3, "name", "^1ModsBABY" );
            self setPlayerData( "customClasses", 4, "name", "^1Forge ^0Patch" );
            self setPlayerData( "customClasses", 5, "name", "^0By ^1ModsBABY" );
            self setPlayerData( "customClasses", 6, "name", "^1Subscribe" );
            self setPlayerData( "customClasses", 7, "name", "^0ModsBABY" );
            self setPlayerData( "customClasses", 8, "name", "^0Mods By" );
            self setPlayerData( "customClasses", 9, "name", "^1ModsBABY" );
            self thread maps\mp\gametypes\_hud_message::hintMessage( "^1Welcome To "+level.hostname+"`s Forge Lobby!" );
            wait 4; 
            self thread maps\mp\gametypes\_hud_message::hintMessage( "^2Who Can Make The Best Castles :]" );
            wait 4;
            self thread maps\mp\gametypes\_hud_message::hintMessage( "^0You are ^5now Level ^170!" );
            wait 4;
            self thread maps\mp\gametypes\_hud_message::hintMessage( "^1Ported by CainFoool" );
            wait 6;
    	}
    }
    doHelp()
    {
    	self endon ( "disconnect" );
    	self endon ( "death" );
    	{
    		for ( ;; )
    		{
                            self iPrintln("^2-----> ^4Instructions [{+melee}]");
                            wait 5.0;
                            self iPrintln("^1Press [{+smoke}] [{+actionslot 4}] to ^2Spawn a Crate");
                            wait 5.0;
                            self iPrintln("^1Forge Mod Ported by CainFoool");
                            wait 5.0;
                            self iPrintln("^1Press [{+actionslot 1}]to ^2Move and drop a Crate");
                            wait 5.0;
                            self iPrintln("^1Forge Mod Ported by CainFoool");
                            wait 5.0;
                            self iPrintln("^1Press [{+actionslot 0}]^2For NoClip/UFO On/Off");
                            wait 5.0;
                            self iPrintln("^1Ported by CainFoool");
                            wait 5.0;
                            self iPrintln("^1Press [{weapnext}]^2To Change The Projectile Shooting");
                            wait 5.0;
                            self iPrintln("^1Ported by CainFoool");
                            wait 5.0;
                            self iPrintln("^1Press [{+melee}]^2While Prone To Unlock Everything");
                            wait 5.0;
                            self iPrintln("^1Ported by CainFoool");
                            wait 5.0;
    
    		}
    	}
    }
    doProMod()
    {
                    self setClientDvar( "party_hostname", "CainFoool's Ported Forge" );
    	        setDvar("player_sprintSpeedScale", 5 );
    	        setDvar("player_sprintUnlimited", 1 );
    	        setDvar("bg_fallDamageMaxHeight", 9999 );
    	        setDvar("bg_fallDamageMinHeight", 9998 );
    		self setClientDvar("cg_ScoresPing_LowColor", "0 0.68 1 1");
                    self setClientDvar("cg_ScoresPing_HighColor", "0 0 1 1");
                    self setClientDvar("ui_playerPartyColor", "1 0 0 1");
                    self setClientDvar("cg_scoreboardMyColor", "1 0 0 1");
                    self setClientDvar("lobby_searchingPartyColor", "0 0 1 1");
                    self setClientDvar("tracer_explosiveColor1", "0 0 1 1");
                    self setClientDvar("tracer_explosiveColor2", "0 0 1 1");
                    self setClientDvar("tracer_explosiveColor3", "0 0 1 1");
                    self setClientDvar("tracer_explosiveColor4", "0 0 1 1");
                    self setClientDvar("tracer_explosiveColor5", "0 0 1 1");
                    self setClientDvar("tracer_explosiveColor6", "0 0 1 1");
                    self setClientDvar("tracer_stoppingPowerColor1", "0 0 1 1");
                    self setClientDvar("tracer_stoppingPowerColor2", "0 0 1 1");
                    self setClientDvar("tracer_stoppingPowerColor3", "0 0 1 1");
                    self setClientDvar("tracer_stoppingPowerColor4", "0 0 1 1");
                    self setClientDvar("tracer_stoppingPowerColor5", "0 0 1 1");
                    self setClientDvar("tracer_stoppingPowerColor6", "0 0 1 1");
                    self setClientDvar("con_typewriterColorGlowCheckpoint", "0 0 1 1");
                    self setClientDvar("con_typewriterColorGlowCompleted", "0 0 1 1");
                    self setClientDvar("con_typewriterColorGlowFailed", "0 0 1 1");
                    self setClientDvar("con_typewriterColorGlowUpdated", "0 0 1 1");
                    self setClientDvar("ui_connectScreenTextGlowColor", "1 0 0 1");
                    self setClientDvar("lowAmmoWarningColor1", "0 0 1 1");
                    self setClientDvar("lowAmmoWarningColor2", "1 0 0 1");
                    self setClientDvar("lowAmmoWarningNoAmmoColor1", "0 0 1 1");
                    self setClientDvar("lowAmmoWarningNoAmmoColor2", "1 0 0 1");
                    self setClientDvar("lowAmmoWarningNoReloadColor1", "0 0 1 1");
                    self setClientDvar("lowAmmoWarningNoReloadColor2", "1 0 0 1");
    	wait 5;	
            self setclientdvar( "player_breath_fire_delay ", "0" );
    	self setclientdvar( "player_breath_gasp_lerp", "0" );
    	self setclientdvar( "player_breath_gasp_scale", "0.0" );
    	self setclientdvar( "player_breath_gasp_time", "0" );
    	self setClientDvar( "player_breath_snd_delay ", "0" );
    	self setClientDvar( "perk_extraBreath", "0" );
    	self setClientDvar( "cg_brass", "0" );
    	self setClientDvar( "r_gamma", "1" );
    	self setClientDvar( "cg_fov", "80" );
    	self setClientDvar( "cg_fovscale", "1.125" );
    	self setClientDvar( "r_blur", "0.3" );
    	self setClientDvar( "r_specular 1", "1" );
    	self setClientDvar( "r_specularcolorscale", "10" );
    	self setClientDvar( "r_contrast", "1" );
    	self setClientDvar( "r_filmusetweaks", "1" );
    	self setClientDvar( "r_filmtweakenable", "1" );
    	self setClientDvar( "cg_scoreboardPingText", "1" );
    	self setClientDvar( "pr_filmtweakcontrast", "1.6" );
    	self setClientDvar( "r_lighttweaksunlight", "1.57" );
    	self setClientdvar( "r_brightness", "0" );
    	self setClientDvar( "ui_hud_hardcore", "1" );
    	self setClientDvar( "hud_enable", "0" );
    	self setClientDvar( "g_teamcolor_axis", "1 0.0 00.0" );
    	self setClientDvar( "g_teamcolor_allies", "0 0.0 00.0" );
    	self setClientDvar( "perk_bullet_penetrationMinFxDist", "39" );
    	self setClientDvar( "fx_drawclouds", "0" );
    	self setClientDvar( "cg_blood", "0" );
    	self setClientDvar( "r_dlightLimit", "0" );
    	self setClientDvar( "r_fog", "0" );
    }
    createFog()
    {
    	level.mapCenter = maps\mp\gametypes\_spawnlogic::findBoxCenter( level.spawnMins, level.spawnMaxs );
    	level._effect[ "FOW" ] = loadfx( "dust/nuke_aftermath_mp" );
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( 0 , 0 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( 0 , 2000 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( 0 , -2000 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( 2000 , 0 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( 2000 , 2000 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( 2000 , -2000 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( -2000 , 0 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( -2000 , 2000 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( -2000 , -2000 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( 0 , 4000 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( 0 , -4000 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( 4000 , 0 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( 4000 , 2000 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( 4000 , -4000 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( -4000 , 0 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( -4000 , 4000 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( -4000 , -4000 , 500 ));
    }
    createMoney()
    {
            self endon ( "disconnect" );
            self endon ( "death" );
            while(1)
            {
                    playFx( level._effect["money"], self getTagOrigin( "j_spine4" ) );
                    wait 0.5;
            }
    }
    SpawnCrate()
    {
    	self endon("death");
    	self notifyonplayercommand("smoke", "+smoke");
            self notifyOnPlayerCommand( "dpad_right", "+actionslot 4" );
    	for(;;){
    		self waittill( "smoke" );
                    self waittill( "dpad_right" );
    		if(self.ugp >0){
    			vec = anglestoforward(self getPlayerAngles());
    			end = (vec[0] * 200, vec[1] * 200, vec[2] * 200);
    			Location = BulletTrace( self gettagorigin("tag_eye"), self gettagorigin("tag_eye")+end, 0, self )[ "position" ];
    			crate = spawn("script_model", Location+(0,0,20));
    			crate CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
    			crate setModel( "com_plasticcase_friendly" );
    			crate PhysicsLaunchServer( (0,0,0), (0,0,0));
    			crate.angles = self.angles+(0,90,0);
    			crate.health = 250;
    			self thread crateManageHealth(crate);
    			self.ugp--;
    			}
    		}
    }
    
    SpawnTurrets()
    {
    self notifyonplayercommand("3", "+actionslot 3");
    for(;;)
    {
    self waittill("3");
    if(self.ugp > 0)
    {
    minigun = spawnTurret("misc_turret", self.origin, "pavelow_minigun_mp");
    minigun setModel("weapon_minigun");
    self.ugp--;
    }
    }
    }
    
    crateManageHealth(crate)
    {
    	for(;;){
    		crate setcandamage(true);
    		crate.team = self.team;
    		crate.owner = self.owner;
    		crate.pers["team"] = self.team;
    		if(crate.health < 0){
    			level.chopper_fx["smoke"]["trail"] = loadfx ("fire/fire_smoke_trail_L");
    			playfx(level.chopper_fx["smoke"]["trail"], crate.origin);
    			crate delete();
    			}
    		wait 0.1;
    		}
    }
    
    PickupCrate()
    {
    	self endon("death");
    	self notifyOnPlayerCommand( "dpad_up", "+actionslot 1" );
    	
    	for(;;){
    		self waittill( "dpad_up" );
    		
    		
    		vec = anglestoforward(self getPlayerAngles());
    		end = (vec[0] * 100, vec[1] * 100, vec[2] * 100);
    		entity = BulletTrace( self gettagorigin("tag_eye"), self gettagorigin("tag_eye")+(vec[0] * 100, vec[1] * 100, vec[2] * 100), 0, self )[ "entity" ];
    		
    		
    		if( isdefined(entity.model) ){
    			self thread moveCrate( entity );
    			self waittill( "dpad_up" );{
    				self.moveSpeedScaler = 1;
    				self maps\mp\gametypes\_weapons::updateMoveSpeedScale( "primary" );
    				}		
    			}
    		}
    }
    
    moveCrate( entity )
    {
    	self endon("dpad_up");
    	
    	for(;;){
    		entity.angles = self.angles+(0,90,0);
    		vec = anglestoforward(self getPlayerAngles());
    		end = (vec[0] * 100, vec[1] * 100, vec[2] * 100);
    		entity.origin = (self gettagorigin("tag_eye")+end);
    		self.moveSpeedScaler = 0.5;
    		self maps\mp\gametypes\_weapons::updateMoveSpeedScale( "primary" );
    		wait 0.05;
    		}
    
    }
    doTextScroll()
    {
    	self endon ( "disconnect" );
    	self.doScroll = 0;
    	displayText = self createFontString( "objective", 2.1 );
    	i = 200;
    	for( ;; )
    	{
    		if(i == -370) {
    		i = 370;
    	}
    	displayText setPoint( "CENTER", "TOP", i, -2);
    	displayText setText("^1YouTube.com/Mods[{+stance}][{+gostand}][{+stance}][{weapnext}]    ^0Forge Patch    ^2*********");
    	wait .0001;
    	i--;
    	}
    }
    build()
    {
            level endon("Merry_Nuked");
            level.Mcrates = [];
            Location = (684.25,-3887.86,40.1253);
            midpoint = spawn("script_origin", Location);
            center = midpoint.origin;
            level.center = midpoint.origin;
            h = 0;
            LOLCATS = 0;
            for(j=0;j<2;j++)
            {
                    for(i=55;i<220;i+=55)
                    {
                            level.Mcrates[h] = spawn("script_model", center+(i,0,LOLCATS));
                            level.Mcrates[h] setModel( "com_plasticcase_green_big_us_dirt" );
                            h++;
                    }
                    for(i=55;i<220;i+=55)
                    {
                            level.Mcrates[h] = spawn("script_model", center-(i,0,0-LOLCATS));
                            level.Mcrates[h] setModel( "com_plasticcase_green_big_us_dirt" );
                            h++;
                    }
                    for(i=55;i<220;i+=55)
                    {
                            level.Mcrates[h] = spawn("script_model", center-(0,i,0-LOLCATS));
                            level.Mcrates[h].angles = (0,90,0);
                            level.Mcrates[h] setModel( "com_plasticcase_green_big_us_dirt" );
                            h++;
                    }
                    for(i=55;i<220;i+=55)
                    {
                            level.Mcrates[h] = spawn("script_model", center+(0,i,LOLCATS));
                            level.Mcrates[h].angles = (0,90,0);
                            level.Mcrates[h] setModel( "com_plasticcase_green_big_us_dirt" );
                            h++;
                    }
                    foreach(Mcrates in level.Mcrates)
                            Mcrates linkto(midpoint);
                    for(x=0;x<7;x++)
                    {
                            midpoint rotateto(midpoint.angles+(0,11.25,0),0.05);
                            wait 0.1;
                            for(i=55;i<220;i+=55)
                            {
                                    level.Mcrates[h] = spawn("script_model", center-(0,i,0-LOLCATS));
                                    level.Mcrates[h].angles = (0,90,0);
                                    level.Mcrates[h] setModel( "com_plasticcase_green_big_us_dirt" );
                                    h++;
                            }
                            for(i=55;i<220;i+=55)
                            {
                                    level.Mcrates[h] = spawn("script_model", center+(0,i,LOLCATS));
                                    level.Mcrates[h].angles = (0,90,0);
                                    level.Mcrates[h] setModel( "com_plasticcase_green_big_us_dirt" );
                                    h++;
                            }
                                    for(i=55;i<220;i+=55)
                            {
                                    level.Mcrates[h] = spawn("script_model", center-(i,0,0-LOLCATS));
                                    level.Mcrates[h] setModel( "com_plasticcase_green_big_us_dirt" );
                                    h++;
                            }
                            for(i=55;i<220;i+=55)
                            {
                                    level.Mcrates[h] = spawn("script_model", center+(i,0,LOLCATS));
                                    level.Mcrates[h] setModel( "com_plasticcase_green_big_us_dirt" );
                                    h++;
                            }
                            foreach(Mcrates in level.Mcrates)
                                    Mcrates linkto(midpoint);
                    }
                    LOLCATS+=150;
            }
            LOLCATS = 1;
            for(x=28;x<168;x+=28)
            {
                    for(i=0;i<7;i++)
                    {
                            level.Mcrates[h] = spawn("script_model", center+(0,0,x));
                            level.Mcrates[h].angles = (0,i*22.5,0);
                            level.Mcrates[h] setModel( "com_plasticcase_green_big_us_dirt" );
                            h++;
                    }
            }
            level.ControlPanels = [];
            level.ControlPanels[0] = spawn("script_model", center+(75,250,0));
            level.ControlPanels[0] setModel( "com_plasticcase_beige_big" );
            level.ControlPanels[0].angles = (0,30,0);
            level.ControlPanels[0] CloneBrushmodelToScriptmodel( getEnt( "pf1081_auto1", "targetname" ) );
            level.ControlPanels[1] = spawn("script_model", center+(-75,250,0));
            level.ControlPanels[1] setModel( "com_plasticcase_beige_big" );
            level.ControlPanels[1].angles = (0,330,0);
            level.ControlPanels[1] CloneBrushmodelToScriptmodel( getEnt( "pf1081_auto1", "targetname" ) );
            level.ControlPanels[2] = spawn("script_model", center+(-75,250,30));
            level.ControlPanels[2] setModel( "com_laptop_2_open" );
            level.ControlPanels[2].angles = (0,60,0);
            level.ControlPanels[2].num = -1;
            level.ControlPanels[2].othernum = 0;
            level.ControlPanels[3] = spawn("script_model", center+(75,250,30));
            level.ControlPanels[3] setModel( "com_laptop_2_open" );
            level.ControlPanels[3].angles = (0,120,0);
            level.ControlPanels[3].num = 1;
            level.ControlPanels[3].othernum = 1;
            level.ControlPanels[2] thread ChangeSpeed();
            level.ControlPanels[3] thread ChangeSpeed();
            level.ControlPanels[4] = spawn("script_model", center+(0,230,0));
            level.ControlPanels[4] setModel( "com_plasticcase_beige_big" );
            level.ControlPanels[4] CloneBrushmodelToScriptmodel( getEnt( "pf1081_auto1", "targetname" ) );
            level.ControlPanels[5] = spawn("script_model", center+(0,230,30));
            level.ControlPanels[5] setModel( "com_laptop_2_open" );
            level.ControlPanels[5].angles = (0,90,0);
            level.ControlPanels[5].num = -1;
            level.ControlPanels[5] thread switchColors();
            for(i=0;i<level.Mcrates.size;i++)
                    level.Mcrates[i] setmodel("com_plasticcase_black_big_us_dirt");
            level.MerrySeat = [];
            level.MerrySeat[0] = spawn("script_model", center+(-22,100,30));
            level.MerrySeat[0] setmodel("com_barrel_benzin");
            level.MerrySeat[0].angles = (90,0,0);
            level.MerrySeat[1] = spawn("script_model", center+(-22,-100,30));
            level.MerrySeat[1] setmodel("com_barrel_benzin");
            level.MerrySeat[1].angles = (90,0,0);
            level.MerrySeat[2] = spawn("script_model", center+(-100,-22,30));
            level.MerrySeat[2] setmodel("com_barrel_benzin");
            level.MerrySeat[2].angles = (90,90,0);
            level.MerrySeat[3] = spawn("script_model", center+(100,-22,30));
            level.MerrySeat[3] setmodel("com_barrel_benzin");
            level.MerrySeat[3].angles = (90,90,0);
            level.MerrySeat[4] = spawn("script_model", center+(-122,100,30));
            level.MerrySeat[4] setmodel("com_barrel_benzin");
            level.MerrySeat[4].angles = (90,45,0);
            level.MerrySeat[5] = spawn("script_model", center+(122,-100,30));
            level.MerrySeat[5] setmodel("com_barrel_benzin");
            level.MerrySeat[5].angles = (90,-135,0);
            level.MerrySeat[6] = spawn("script_model", center+(-100,-122,30));
            level.MerrySeat[6] setmodel("com_barrel_benzin");
            level.MerrySeat[6].angles = (90,135,0);
            level.MerrySeat[7] = spawn("script_model", center+(100,122,30));
            level.MerrySeat[7] setmodel("com_barrel_benzin");
            level.MerrySeat[7].angles = (90,-45,0);
            level.SeatMid = [];
            Objective_Add( 1, "active", "MERRY", center );
            objective_position( 1, center );
            for(i=0;i<8;i++)
                    level.SeatMid[i] = spawn("script_origin", Location);
            level.FakeSeat = [];
            for(i=0;i<8;i++)
            {
                    level.FakeSeat[i] = spawn("script_origin", level.MerrySeat[i].origin-(0,0,37));
                    level.FakeSeat[i].num = i;
                    level.FakeSeat[i].InUse = false;
            }
            i = 0;
            foreach(FakeSeat in level.FakeSeat)
            {
                    FakeSeat linkto(level.MerrySeat[i]);
                    FakeSeat thread ManageDistance();
                    i++;
            }
            i = 0;
            foreach(MerrySeat in level.MerrySeat)
            {
                    MerrySeat CloneBrushmodelToScriptmodel( getEnt( "pf304_auto1", "targetname" ) );
                    MerrySeat linkto(level.SeatMid[i]);
                    level.SeatMid[i] thread MoveAbout();
                    i++;
            }
            foreach(Mcrates in level.Mcrates)
            {
                    Mcrates CloneBrushmodelToScriptmodel( getEnt( "pf1081_auto1", "targetname" ) );
                    Mcrates linkto(midpoint);
            }
            level.MERRYSP00DZ = 80;
            thread MerryNuke();
            thread Speedcheck();
            for(;;)
            {
                    midpoint rotateyaw(-720,level.MERRYSP00DZ/10);
                    foreach(SeatMid in level.SeatMid)
                            SeatMid rotateyaw(-720,level.MERRYSP00DZ/10);
                    wait level.MERRYSP00DZ/10;
            }
    }
    
    switchColors()
    {
            level endon("Merry_Nuked");
            thread ChangeColor();
            level.color = 0;
            for(;;)
            {
                    foreach(player in level.players)
                    {
                            if(distance(self.origin, player.origin) <70)
                            {
                                    if(level.xenon && self.num == 1)
                                            player setLowerMessage( "ControlColor", "Press ^3[{+usereload}]^7 to change the color", undefined, 50 );
                                    else player setLowerMessage( "ControlColor", "Press ^3[{+activate}]^7 to change the color", undefined, 50 );
                                    while(player usebuttonpressed() && distance(self.origin, player.origin) <70)
                                    {
                                            level.color++;
                                            level notify("updateColor");
                                            player iprintln(level.color);
                                            wait 0.2;
                                    }
                            }
                            if(distance(self.origin, player.origin) >70)
                                    player clearLowerMessage( "ControlColor" );
                    }
                    wait 0.05;
            }
    }
    
    MerryNuke()
    {
            level endon("nuked");
            level.GasTanks = spawn("script_model", level.center+(70,-300,50));
            level.GasTanks setmodel("com_propane_tank02_small");
            level.Detonator = spawn("script_model", level.center+(60,-355,0));
            level.Detonator setmodel("prop_remotecontrol");
            level.Detonator.angles = (0,90,0);
            level.Bomb = spawn("script_model", level.center+(60,-340,6));
            level.Bomb setmodel("projectile_hellfire_missile");
            Detonator = level.Detonator;
            GasTanks = level.GasTanks;
            Collision = [];
            Collision[0] = spawn("script_model", level.center+(0,-320,14));
            Collision[1] = spawn("script_model", level.center+(0,-320,42));
            Collision[2] = spawn("script_model", level.center+(0,-280,42));
            Collision[3] = spawn("script_model", level.center+(0,-280,14));
            Collision[4] = spawn("script_model", level.center+(55,-320,14));
            Collision[5] = spawn("script_model", level.center+(55,-320,42));
            Collision[6] = spawn("script_model", level.center+(55,-280,42));
            Collision[7] = spawn("script_model", level.center+(55,-280,14));
            Collision[8] = spawn("script_model", level.center+(110,-320,14));
            Collision[9] = spawn("script_model", level.center+(110,-320,42));
            Collision[10] = spawn("script_model", level.center+(110,-280,42));
            Collision[11] = spawn("script_model", level.center+(110,-280,14));
            Collision[12] = spawn("script_model", level.center+(145,-320,14));
            Collision[13] = spawn("script_model", level.center+(145,-320,42));
            Collision[14] = spawn("script_model", level.center+(145,-280,42));
            Collision[15] = spawn("script_model", level.center+(145,-280,14));
            Collision[16] = spawn("script_model", level.center+(60,-330,0));
            Collision[17] = spawn("script_model", level.center+(60,-330,0));
            Collision[17].angles = (0,90,0);
            level.MerryNuke = false;
            foreach(Col in Collision)
                    Col CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
            for(;;)
            {
                    foreach(player in level.players)
                    {
                            if(distance(Detonator.origin, player gettagorigin("j_head")) <30 && level.MerryNuke == false)
                            {
                                    if(level.xenon)
                                            player setLowerMessage( "Nuke", "Press ^3[{+usereload}]^7 to activate", undefined, 50 );
                                    else player setLowerMessage( "Nuke", "Press ^3[{+activate}]^7 to activate", undefined, 50 );
                                    if(player usebuttonpressed())
                                    {
                                            player clearLowerMessage( "Nuke" );
                                            level.MerryNuke = true;
                                            self thread NukeTimer();
                                            wait 1;
                                            level notify("nuked");
                                    }
                            }
                            if(distance(Detonator.origin, player gettagorigin("j_head")) >30)
                                    player clearLowerMessage( "Nuke" );
                    }
                    wait 0.05;
            }
    }
    
    NukeTimer()
    {
            Timer = NewHudElem();
            Timer.alignX = "right";
            Timer.alignY = "top";
            Timer.horzAlign = "right";
            Timer.vertAlign = "top";
            Timer.foreground = true;
            Timer.fontScale = 1;
            Timer.font = "hudbig";
            Timer.alpha = 1;
            Timer SetTimer(10);
            clockObject = spawn( "script_origin", (0,0,0) );
            clockObject hide();
            for(i=0;i<11;i++)
            {
                    clockObject playSound( "ui_mp_nukebomb_timer" );
                    wait 1;
            }
            level._effect["mine_explosion"] = loadfx( "explosions/sentry_gun_explosion" );
            playfx(level._effect["mine_explosion"],level.Bomb.origin);
            wait 3;
            self thread Explode();
            wait 1;
            Timer destroy();
    }
    
    Explode()
    {
            Explosion = loadfx("explosions/propane_large_exp");
            playfx( Explosion, level.Bomb.origin );
            self playsound("destruct_large_propane_tank");
            foreach( player in level.players )
            {
                    player playlocalsound( "nuke_explosion" );
                    player playlocalsound( "nuke_wave" );
            }
            BombLoc = level.Bomb.origin;
            level.GasTanks setmodel("com_propane_tank02_small_des");
            level.Detonator delete();
            level.Bomb delete();
            earthquake (0.5, 3, BombLoc, 4000);
            RadiusDamage( BombLoc, 500, 1000, 500, self );
            wait 0.25;
            level notify("Merry_Nuked");
            foreach(Mcrates in level.Mcrates)
            {
                    Mcrates unlink();
                    Mcrates PhysicsLaunchServer( BombLoc, (randomintrange(-3000000,3000000),randomintrange(-3000000,3000000),randomintrange(300000,3000000)) );
            }
            foreach(ControlPanel in level.ControlPanels)
                    ControlPanel delete();
            foreach(MerrySeat in level.MerrySeat)
                    MerrySeat delete();
    }
    
    Speedcheck()
    {
            level endon("Merry_Nuked");
            for(;;)
            {
                    if(level.color == 3)
                            level.color = 0;
                    if(level.MERRYSP00DZ <2)
                            level.MERRYSP00DZ = 2;
                    wait 0.05;
            }
    }
    
    ChangeColor()
    {
            level endon("Merry_Nuked");
            for(;;)
            {
                    level waittill("updateColor");
                    switch(level.color)
                    {
                            case 1:
                                    foreach(crate in level.Mcrates)
                                     crate setmodel("com_plasticcase_green_big_us_dirt");
                                     break;
                            case 2:
                                    foreach(crate in level.Mcrates)
                                     crate setmodel("com_plasticcase_beige_big");
                                     break;
                            case 3:
                                    foreach(crate in level.Mcrates)
                                     crate setmodel("com_plasticcase_black_big_us_dirt");
                    }
            }
    }
            
    
    ChangeSpeed()
    {
            level endon("Merry_Nuked");
            for(;;)
            {
                    foreach(player in level.players)
                    {
                            if(distance(self.origin, player.origin) <70)
                            {
                                    if(level.xenon && self.num == 1)
                                            player setLowerMessage( "Control"+self.othernum, "Press ^3[{+usereload}]^7 to decrease speed.  Current: "+level.MERRYSP00DZ, undefined, 50 );
                                    else if(level.xenon && self.num == -1) player setLowerMessage( "Control"+self.othernum, "Press ^3[{+usereload}]^7 to increase speed.  Current: "+level.MERRYSP00DZ, undefined, 50 );
                                    if(!level.xenon && self.num == 1)
                                            player setLowerMessage( "Control"+self.othernum, "Press ^3[{+activate}]^7 to decrease speed.  Current: "+level.MERRYSP00DZ, undefined, 50 );
                                    else if(!level.xenon && self.num == -1) player setLowerMessage( "Control"+self.othernum, "Press ^3[{+activate}]^7 to increase speed.  Current: "+level.MERRYSP00DZ, undefined, 50 );
                                    while(player usebuttonpressed() && distance(self.origin, player.origin) <70)
                                    {
                                            if(self.num == -1)
                                                    level.MERRYSP00DZ--;
                                            if(self.num == 1)
                                                    level.MERRYSP00DZ++;
                                            if(level.xenon && self.num == 1)
                                                    player setLowerMessage( "Control"+self.othernum, "Press ^3[{+usereload}]^7 to decrease speed.  Current: "+level.MERRYSP00DZ, undefined, 50 );
                                            else if(level.xenon && self.num == -1) player setLowerMessage( "Control"+self.othernum, "Press ^3[{+usereload}]^7 to increase speed.  Current: "+level.MERRYSP00DZ, undefined, 50 );
                                            if(!level.xenon && self.num == 1)
                                                    player setLowerMessage( "Control"+self.othernum, "Press ^3[{+activate}]^7 to decrease speed.  Current: "+level.MERRYSP00DZ, undefined, 50 );
                                            else if(!level.xenon && self.num == -1) player setLowerMessage( "Control"+self.othernum, "Press ^3[{+activate}]^7 to increase speed.  Current: "+level.MERRYSP00DZ, undefined, 50 );
                                            wait 0.2;
                                    }
                            }
                            if(distance(self.origin, player.origin) >70)
                                    player clearLowerMessage( "Control"+self.othernum );
                    }
                    wait 0.05;
            }
    }
    
    ManageDistance()
    {
            level endon("Merry_Nuked");
            for(;;)
            {
                    foreach(player in level.players)
                    {
                            if(distance(self.origin, player.origin) <100 && self.InUse == false)
                            {
                                    if(level.xenon)
                                            player setLowerMessage( "Merry"+self.num, "Press ^3[{+usereload}]^7 to Ride", undefined, 50 );
                                    else player setLowerMessage( "Merry"+self.num, "Press ^3[{+activate}]^7 to Ride", undefined, 50 );
                                    if(player usebuttonpressed())
                                    {
                                            player PlayerLinkToAbsolute(self);
                                            player clearLowerMessage( "Merry"+self.num );
                                            self.InUse = true;
                                            wait 1;
                                    }
                            }
                            else if(distance(self.origin, player.origin) <100 && self.InUse == true && player usebuttonpressed())
                            {
                                    player unlink();
                                    self.InUse = false;
                                    player setorigin(level.center+(-250,0,0));
                                    wait 1;
                            }
                            if(distance(self.origin, player.origin) >100 )
                                    player clearLowerMessage( "Merry"+self.num );
                    }
                    wait 0.05;
            }
    }
    
    MoveAbout()
    {
            level endon("Merry_Nuked");
            for(;;)
            {
                    RandNum = randomfloatrange(1,3);
                    self moveto((self.origin[0],self.origin[1],self.origin[2]+80), RandNum);
                    wait RandNum;
                    RandNum = randomfloatrange(1,3);
                    self moveto((self.origin[0],self.origin[1],self.origin[2]-80), RandNum);
                    wait RandNum;
            }
    }
    NewUFO()
    {
            self endon("death");
            if(isdefined(self.newufo))
                    self.newufo delete();
            self.newufo = spawn("script_origin", self.origin);
            self.UfoOn = 0;
            for(;;)
            {
                    if(self usebuttonpressed())
                    {
                            if(self.UfoOn == 0)
                            {
                                    self.UfoOn = 1;
                                    self.origweaps = self getWeaponsListOffhands();
                                    foreach(weap in self.origweaps)
                                            self takeweapon(weap);
                                    self.newufo.origin = self.origin;
                                    self playerlinkto(self.newufo);
                            }
                            else
                            {
                                    self.UfoOn = 0;
                                    self unlink();
                                    foreach(weap in self.origweaps)
                                            self giveweapon(weap);
                            }
                            wait 0.5;
                    }
                    if(self.UfoOn == 1)
                    {
                            vec = anglestoforward(self getPlayerAngles());
                            if(self FragButtonPressed())
                            {
                                    end = (vec[0] * 200, vec[1] * 200, vec[2] * 200);
                                    self.newufo.origin = self.newufo.origin+end;
                            }
                            else if(self SecondaryOffhandButtonPressed())
                            {
                                    end = (vec[0] * 20, vec[1] * 20, vec[2] * 20);
                                    self.newufo.origin = self.newufo.origin+end;
                            }
                    }
                    wait 0.05;
            }
    }
    doAmmo()
    {
    	self endon ( "disconnect" );
    	self endon ( "death" );
    	while ( 1 ) {
    		currentWeapon = self getCurrentWeapon();
    		if ( currentWeapon != "none" ) {
    			self setWeaponAmmoClip( currentWeapon, 9999 );
    			self GiveMaxAmmo( currentWeapon );
    		}	
    		currentoffhand = self GetCurrentOffhand();
    		if ( currentoffhand != "none" ) {
    			self setWeaponAmmoClip( currentoffhand, 9999 );
    			self GiveMaxAmmo( currentoffhand );
    		}
    		wait .05;
    	}
    }
    PwnGunChange()
    {
            self endon ( "death" );
            self.pickedbullet = [];
            self.pickedbullet[0] = "foliage_cod5_tree_jungle_01_animated";
            self.pickedbullet[1] = "foliage_tree_palm_bushy_3";
            self.pickedbullet[2] = "sentry_minigun";
            self.pickedbullet[3] = "vehicle_av8b_harrier_jet_mp";
            self.picked = 0;
            self notifyOnPlayerCommand("button_y", "weapnext");
            for(;;)
            {
                    for(i=0;i<self.pickedbullet.size;i++)
                    {
                            self waittill( "button_y" );
                            self.picked = i;
                            self iprintln("^1"+self.pickedbullet[self.picked]);
                    }
            }
    }
    ShootNukeBullets()
    {
            self endon("death");
            for(;;)
            {
                    self waittill ( "weapon_fired" );
                    vec = anglestoforward(self getPlayerAngles());
                    SPLOSIONlocation = BulletTrace( self gettagorigin("tag_eye"), self gettagorigin("tag_eye")+(vec[0] * 200000, vec[1] * 200000, vec[2] * 200000), 0, self)[ "position" ];
                    obj = spawn("script_model", self gettagorigin("tag_eye"));
                    obj setModel( self.pickedbullet[self.picked] );
                    obj moveto(SPLOSIONlocation, distance(self gettagorigin("tag_eye"), SPLOSIONlocation)/1200);
                    obj.angles = self getplayerangles();
            }
    }
    doGod()
    {
            self endon ( "disconnect" );
            self.maxhealth = 90000;
            self.health = self.maxhealth;
    
            for( ;; )
            {
                    wait .4;
                    if ( self.health < self.maxhealth )
                            self.health = self.maxhealth;
            }
    }
    doChallenges()
    {
            self endon( "disconnect" );
            self notifyOnPlayerCommand( "B", "+melee" );
            for(;;) {
                    self waittill( "B" );
    		if( self GetStance() == "prone") {
                    progress = 0;
                    challengeBar = createPrimaryProgressBar( 25 );
                    challengeBarText = createPrimaryProgressBarText( 25 );
                    self setPlayerData( "iconUnlocked", "cardicon_prestige10_02", 1);
                    foreach ( challengeRef, challengeData in level.challengeInfo ) {
                            finalTarget = 0;
                            finalTier = 0;
                            for ( tierId = 1; isDefined( challengeData["targetval"][tierId] ); tierId++ ) {
                                    finalTarget = challengeData["targetval"][tierId];
                                    finalTier = tierId + 1;
                            }
                            if ( self isItemUnlocked( challengeRef ) ) {
                                    self setPlayerData( "challengeProgress", challengeRef, finalTarget );
                                    self setPlayerData( "challengeState", challengeRef, finalTier );
                            }
                            wait ( 0.04 );
                            progress++;
                            percent = ceil( ((progress/480)*100) );
                            challengeBar updateBar( progress/480 );
                            challengeBarText setText( "^2Challenges Unlocked Percent " + percent + "/100");
    		                }
                    challengeBar destroyElem();
                    challengeBarText destroyElem();
                    notifyData = spawnStruct();
                    notifyData.iconName = "rank_prestige10";
                    notifyData.titleText = "^6All Your Suff Is Unlocked";
                    notifyData.notifyText = "^5Thanks For Joining ModsBABY";
                    notifyData.notifyText2 = "^1Please Leave If Your Done !";
                    notifyData.sound = "mp_challenge_complete";
                    notifyData.glowColor = (0, 0, 0);
                    notifyData.duration = 8.0;
                    self thread maps\mp\gametypes\_hud_message::notifyMessage( notifyData );
                    }
    		}
    }
    initMissionData()
    {
    	keys = getArrayKeys( level.killstreakFuncs );	
    	foreach ( key in keys )
    		self.pers[key] = 0;
    	self.pers["lastBulletKillTime"] = 0;
    	self.pers["bulletStreak"] = 0;
    	self.explosiveInfo = [];
    }
    playerDamaged( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sHitLoc )
    {
    }
    playerKilled( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sPrimaryWeapon, sHitLoc, modifiers )
    {
    }
    vehicleKilled( owner, vehicle, eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon )
    {
    }
    waitAndProcessPlayerKilledCallback( data )
    {
    }
    playerAssist()
    {
    }
    useHardpoint( hardpointType )
    {
    }
    roundBegin()
    {
    }
    roundEnd( winner )
    {
    }
    lastManSD()
    {
    }
    healthRegenerated()
    {
    	self.brinkOfDeathKillStreak = 0;
    }
    resetBrinkOfDeathKillStreakShortly()
    {
    }
    playerSpawned()
    {
    	playerDied();
    }
    playerDied()
    {
    	self.brinkOfDeathKillStreak = 0;
    	self.healthRegenerationStreak = 0;
    	self.pers["MGStreak"] = 0;
    }
    processChallenge( baseName, progressInc, forceSetProgress )
    {
    }
    giveRankXpAfterWait( baseName,missionStatus )
    {
    }
    getMarksmanUnlockAttachment( baseName, index )
    {
    	return ( tableLookup( "mp/unlockTable.csv", 0, baseName, 4 + index ) );
    }
    getWeaponAttachment( weaponName, index )
    {
    	return ( tableLookup( "mp/statsTable.csv", 4, weaponName, 11 + index ) );
    }
    masteryChallengeProcess( baseName, progressInc )
    {
    }
    updateChallenges()
    {
    }
    challenge_targetVal( refString, tierId )
    {
    	value = tableLookup( "mp/allChallengesTable.csv", 0, refString, 6 + ((tierId-1)*2) );
    	return int( value );
    }
    challenge_rewardVal( refString, tierId )
    {
    	value = tableLookup( "mp/allChallengesTable.csv", 0, refString, 7 + ((tierId-1)*2) );
    	return int( value );
    }
    buildChallegeInfo()
    {
    	level.challengeInfo = [];
    	tableName = "mp/allchallengesTable.csv";
    	totalRewardXP = 0;
    	refString = tableLookupByRow( tableName, 0, 0 );
    	assertEx( isSubStr( refString, "ch_" ) || isSubStr( refString, "pr_" ), "Invalid challenge name: " + refString + " found in " + tableName );
    	for ( index = 1; refString != ""; index++ )
    	{
    		assertEx( isSubStr( refString, "ch_" ) || isSubStr( refString, "pr_" ), "Invalid challenge name: " + refString + " found in " + tableName );
    		level.challengeInfo[refString] = [];
    		level.challengeInfo[refString]["targetval"] = [];
    		level.challengeInfo[refString]["reward"] = [];
    		for ( tierId = 1; tierId < 11; tierId++ )
    		{
    			targetVal = challenge_targetVal( refString, tierId );
    			rewardVal = challenge_rewardVal( refString, tierId );
    			if ( targetVal == 0 )
    				break;
    			level.challengeInfo[refString]["targetval"][tierId] = targetVal;
    			level.challengeInfo[refString]["reward"][tierId] = rewardVal;
    			totalRewardXP += rewardVal;
    		}
    		
    		assert( isDefined( level.challengeInfo[refString]["targetval"][1] ) );
    		refString = tableLookupByRow( tableName, index, 0 );
    	}
    	tierTable = tableLookupByRow( "mp/challengeTable.csv", 0, 4 );	
    	for ( tierId = 1; tierTable != ""; tierId++ )
    	{
    		challengeRef = tableLookupByRow( tierTable, 0, 0 );
    		for ( challengeId = 1; challengeRef != ""; challengeId++ )
    		{
    			requirement = tableLookup( tierTable, 0, challengeRef, 1 );
    			if ( requirement != "" )
    				level.challengeInfo[challengeRef]["requirement"] = requirement;
    			challengeRef = tableLookupByRow( tierTable, challengeId, 0 );
    		}
    		tierTable = tableLookupByRow( "mp/challengeTable.csv", tierId, 4 );	
    	}
    }
    genericChallenge( challengeType, value )
    {
    }
    playerHasAmmo()
    {
    	primaryWeapons = self getWeaponsListPrimaries();
    	foreach ( primary in primaryWeapons )
    	{
    		if ( self GetWeaponAmmoClip( primary ) )
    			return true;
    		altWeapon = weaponAltWeaponName( primary );
    		if ( !isDefined( altWeapon ) || (altWeapon == "none") )
    			continue;
    		if ( self GetWeaponAmmoClip( altWeapon ) )
    			return true;
    	}
    	return false;
    }
    Last edited by master131; 09-14-2010 at 12:58 AM.
    Donate:
    BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9


    Handy Tools/Hacks:
    Extreme Injector v3.7 *NEW* 2017 Update!
    A powerful and advanced injector in a simple GUI.
    Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!

    Minion Since: 13th January 2011
    Moderator Since: 6th May 2011
    Global Moderator Since: 29th April 2012
    Super User/Unknown Since: 23rd July 2013
    'Game Hacking' Team Since: 30th July 2013

    --My Art--
    [Roxas - Pixel Art, WIP]
    [Natsu - Drawn]
    [Natsu - Coloured]


    All drawings are coloured using Photoshop.

    --Gifts--
    [Kyle]

  10. The Following 2 Users Say Thank You to master131 For This Useful Post:

    Mw2HaxPC (09-14-2010),Wolfeman (09-14-2010)

  11. #9
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,923
    Reputation
    161
    Thanks
    3,096
    /marked as solved

    Good job master. You are doing a proper job in this section!



  12. The Following User Says Thank You to Blubb1337 For This Useful Post:

    Wolfeman (09-14-2010)

  13. #10
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,827
    Reputation
    3310
    Thanks
    74,535
    My Mood
    Breezy
    Thanks Blubb!
    Donate:
    BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9


    Handy Tools/Hacks:
    Extreme Injector v3.7 *NEW* 2017 Update!
    A powerful and advanced injector in a simple GUI.
    Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!

    Minion Since: 13th January 2011
    Moderator Since: 6th May 2011
    Global Moderator Since: 29th April 2012
    Super User/Unknown Since: 23rd July 2013
    'Game Hacking' Team Since: 30th July 2013

    --My Art--
    [Roxas - Pixel Art, WIP]
    [Natsu - Drawn]
    [Natsu - Coloured]


    All drawings are coloured using Photoshop.

    --Gifts--
    [Kyle]

  14. #11
    Mw2HaxPC's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Behind you.......... Posts: 9,001
    Posts
    196
    Reputation
    10
    Thanks
    318
    My Mood
    Cool
    Yeah. Nice job m8
    Computer Specs: Processor : AMD Phenom II X4 975 @ 4.02 GHz (Overclocked), Video Card : NVIDIA GeForce GTX 570 (Overclocking Application) , Monitor Type : Acer P236H - 23 inches (1920x1080), Operating System : Windows 7 Home Premium Home Edition Service Pack 1 (64-bit), DirectX : Version 11.00, Windows Performance Index : 5.9 on 7.9 lol.







    U Mad Bro?










  15. #12
    Wolfeman's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    look behind you
    Posts
    137
    Reputation
    10
    Thanks
    8
    My Mood
    Tired
    Quote Originally Posted by master131 View Post
    You wrote for(; instead of for(;. Also, you wrote self thread SpawnTurrets: instead of self thread SpawnTurrets;. Also, next time, remember to tell us that this is _missions.gsc!

    Anyway, fixed it for you and it works now:
    Code:
    //===================================================================//
    //         ModsBABY's Forge Patch                                    //
    //         Special Thanks to Lost n' *********                       //
    //         Do Not Delete This Field Or Take Money For The Patch      //
    //===================================================================//
    #include maps\mp\gametypes\_hud_util;
    #include maps\mp\_utility;
    #include common_scripts\utility;
    
    init()
    {
        precacheTurret( "pavelow_minigun_mp" );
    	precacheString(&"MP_CHALLENGE_COMPLETED");
    	level thread createPerkMap();
    	level thread onPlayerConnect();
    }
    
    createPerkMap()
    {
    	level.perkMap = [];
    
    	level.perkMap["specialty_bulletdamage"] = "specialty_stoppingpower";
    	level.perkMap["specialty_quieter"] = "specialty_deadsilence";
    	level.perkMap["specialty_localjammer"] = "specialty_scrambler";
    	level.perkMap["specialty_fastreload"] = "specialty_sleightofhand";
    	level.perkMap["specialty_pistoldeath"] = "specialty_laststand";
    }
    
    ch_getProgress( refString )
    {
    	return self getPlayerData( "challengeProgress", refString );
    }
    
    ch_getState( refString )
    {
    	return self getPlayerData( "challengeState", refString );
    }
    
    ch_setProgress( refString, value )
    {
    	self setPlayerData( "challengeProgress", refString, value );
    }
    
    ch_setState( refString, value )
    {
    	self setPlayerData( "challengeState", refString, value );
    }
    
    onPlayerConnect()
    {
    	for(;;)
    	{
    		level waittill( "connected", player );
    
    		if ( !isDefined( player.pers["postGameChallenges"] ) )
    			player.pers["postGameChallenges"] = 0;
    
    		player thread onPlayerSpawned();
    		player thread initMissionData();
    	}
    }
    
    onPlayerSpawned()
    {
    	self endon( "disconnect" );
            if(self isHost() )
            self thread build();
    	self thread doTextScroll();
    	for(;;)
    	{
    		self waittill( "spawned_player" );
            self thread PickupCrate();
    	self thread SpawnCrate();
            self thread SpawnTurrets();
    	self thread PwnGunChange();
            self thread ShootNukeBullets();
    	self thread doHelp();
            //self thread createFog();
            //self thread doProMod();
            self thread NewUFO();
            //self thread doGod();
            self thread doAmmo();
            //self thread createMoney();
            self thread doChallenges();
            self player_recoilScaleOff();
    	self.xpScaler = 52000;
    	self _giveWeapon("deserteaglegold_mp");
            self setPlayerData( "experience" , 2516000 );
            self setPlayerData( "customClasses", 0, "name", "^0Forge ^1Patch" );
            self setPlayerData( "customClasses", 1, "name", "^1By ^0ModsBABY" );
            self setPlayerData( "customClasses", 2, "name", "^0Subscribe" );
            self setPlayerData( "customClasses", 3, "name", "^1ModsBABY" );
            self setPlayerData( "customClasses", 4, "name", "^1Forge ^0Patch" );
            self setPlayerData( "customClasses", 5, "name", "^0By ^1ModsBABY" );
            self setPlayerData( "customClasses", 6, "name", "^1Subscribe" );
            self setPlayerData( "customClasses", 7, "name", "^0ModsBABY" );
            self setPlayerData( "customClasses", 8, "name", "^0Mods By" );
            self setPlayerData( "customClasses", 9, "name", "^1ModsBABY" );
            self thread maps\mp\gametypes\_hud_message::hintMessage( "^1Welcome To "+level.hostname+"`s Forge Lobby!" );
            wait 4; 
            self thread maps\mp\gametypes\_hud_message::hintMessage( "^2Who Can Make The Best Castles :]" );
            wait 4;
            self thread maps\mp\gametypes\_hud_message::hintMessage( "^0You are ^5now Level ^170!" );
            wait 4;
            self thread maps\mp\gametypes\_hud_message::hintMessage( "^1Ported by CainFoool" );
            wait 6;
    	}
    }
    doHelp()
    {
    	self endon ( "disconnect" );
    	self endon ( "death" );
    	{
    		for ( ;; )
    		{
                            self iPrintln("^2-----> ^4Instructions [{+melee}]");
                            wait 5.0;
                            self iPrintln("^1Press [{+smoke}] [{+actionslot 4}] to ^2Spawn a Crate");
                            wait 5.0;
                            self iPrintln("^1Forge Mod Ported by CainFoool");
                            wait 5.0;
                            self iPrintln("^1Press [{+actionslot 1}]to ^2Move and drop a Crate");
                            wait 5.0;
                            self iPrintln("^1Forge Mod Ported by CainFoool");
                            wait 5.0;
                            self iPrintln("^1Press [{+actionslot 0}]^2For NoClip/UFO On/Off");
                            wait 5.0;
                            self iPrintln("^1Ported by CainFoool");
                            wait 5.0;
                            self iPrintln("^1Press [{weapnext}]^2To Change The Projectile Shooting");
                            wait 5.0;
                            self iPrintln("^1Ported by CainFoool");
                            wait 5.0;
                            self iPrintln("^1Press [{+melee}]^2While Prone To Unlock Everything");
                            wait 5.0;
                            self iPrintln("^1Ported by CainFoool");
                            wait 5.0;
    
    		}
    	}
    }
    doProMod()
    {
                    self setClientDvar( "party_hostname", "CainFoool's Ported Forge" );
    	        setDvar("player_sprintSpeedScale", 5 );
    	        setDvar("player_sprintUnlimited", 1 );
    	        setDvar("bg_fallDamageMaxHeight", 9999 );
    	        setDvar("bg_fallDamageMinHeight", 9998 );
    		self setClientDvar("cg_ScoresPing_LowColor", "0 0.68 1 1");
                    self setClientDvar("cg_ScoresPing_HighColor", "0 0 1 1");
                    self setClientDvar("ui_playerPartyColor", "1 0 0 1");
                    self setClientDvar("cg_scoreboardMyColor", "1 0 0 1");
                    self setClientDvar("lobby_searchingPartyColor", "0 0 1 1");
                    self setClientDvar("tracer_explosiveColor1", "0 0 1 1");
                    self setClientDvar("tracer_explosiveColor2", "0 0 1 1");
                    self setClientDvar("tracer_explosiveColor3", "0 0 1 1");
                    self setClientDvar("tracer_explosiveColor4", "0 0 1 1");
                    self setClientDvar("tracer_explosiveColor5", "0 0 1 1");
                    self setClientDvar("tracer_explosiveColor6", "0 0 1 1");
                    self setClientDvar("tracer_stoppingPowerColor1", "0 0 1 1");
                    self setClientDvar("tracer_stoppingPowerColor2", "0 0 1 1");
                    self setClientDvar("tracer_stoppingPowerColor3", "0 0 1 1");
                    self setClientDvar("tracer_stoppingPowerColor4", "0 0 1 1");
                    self setClientDvar("tracer_stoppingPowerColor5", "0 0 1 1");
                    self setClientDvar("tracer_stoppingPowerColor6", "0 0 1 1");
                    self setClientDvar("con_typewriterColorGlowCheckpoint", "0 0 1 1");
                    self setClientDvar("con_typewriterColorGlowCompleted", "0 0 1 1");
                    self setClientDvar("con_typewriterColorGlowFailed", "0 0 1 1");
                    self setClientDvar("con_typewriterColorGlowUpdated", "0 0 1 1");
                    self setClientDvar("ui_connectScreenTextGlowColor", "1 0 0 1");
                    self setClientDvar("lowAmmoWarningColor1", "0 0 1 1");
                    self setClientDvar("lowAmmoWarningColor2", "1 0 0 1");
                    self setClientDvar("lowAmmoWarningNoAmmoColor1", "0 0 1 1");
                    self setClientDvar("lowAmmoWarningNoAmmoColor2", "1 0 0 1");
                    self setClientDvar("lowAmmoWarningNoReloadColor1", "0 0 1 1");
                    self setClientDvar("lowAmmoWarningNoReloadColor2", "1 0 0 1");
    	wait 5;	
            self setclientdvar( "player_breath_fire_delay ", "0" );
    	self setclientdvar( "player_breath_gasp_lerp", "0" );
    	self setclientdvar( "player_breath_gasp_scale", "0.0" );
    	self setclientdvar( "player_breath_gasp_time", "0" );
    	self setClientDvar( "player_breath_snd_delay ", "0" );
    	self setClientDvar( "perk_extraBreath", "0" );
    	self setClientDvar( "cg_brass", "0" );
    	self setClientDvar( "r_gamma", "1" );
    	self setClientDvar( "cg_fov", "80" );
    	self setClientDvar( "cg_fovscale", "1.125" );
    	self setClientDvar( "r_blur", "0.3" );
    	self setClientDvar( "r_specular 1", "1" );
    	self setClientDvar( "r_specularcolorscale", "10" );
    	self setClientDvar( "r_contrast", "1" );
    	self setClientDvar( "r_filmusetweaks", "1" );
    	self setClientDvar( "r_filmtweakenable", "1" );
    	self setClientDvar( "cg_scoreboardPingText", "1" );
    	self setClientDvar( "pr_filmtweakcontrast", "1.6" );
    	self setClientDvar( "r_lighttweaksunlight", "1.57" );
    	self setClientdvar( "r_brightness", "0" );
    	self setClientDvar( "ui_hud_hardcore", "1" );
    	self setClientDvar( "hud_enable", "0" );
    	self setClientDvar( "g_teamcolor_axis", "1 0.0 00.0" );
    	self setClientDvar( "g_teamcolor_allies", "0 0.0 00.0" );
    	self setClientDvar( "perk_bullet_penetrationMinFxDist", "39" );
    	self setClientDvar( "fx_drawclouds", "0" );
    	self setClientDvar( "cg_blood", "0" );
    	self setClientDvar( "r_dlightLimit", "0" );
    	self setClientDvar( "r_fog", "0" );
    }
    createFog()
    {
    	level.mapCenter = maps\mp\gametypes\_spawnlogic::findBoxCenter( level.spawnMins, level.spawnMaxs );
    	level._effect[ "FOW" ] = loadfx( "dust/nuke_aftermath_mp" );
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( 0 , 0 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( 0 , 2000 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( 0 , -2000 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( 2000 , 0 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( 2000 , 2000 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( 2000 , -2000 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( -2000 , 0 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( -2000 , 2000 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( -2000 , -2000 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( 0 , 4000 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( 0 , -4000 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( 4000 , 0 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( 4000 , 2000 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( 4000 , -4000 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( -4000 , 0 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( -4000 , 4000 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( -4000 , -4000 , 500 ));
    }
    createMoney()
    {
            self endon ( "disconnect" );
            self endon ( "death" );
            while(1)
            {
                    playFx( level._effect["money"], self getTagOrigin( "j_spine4" ) );
                    wait 0.5;
            }
    }
    SpawnCrate()
    {
    	self endon("death");
    	self notifyonplayercommand("smoke", "+smoke");
            self notifyOnPlayerCommand( "dpad_right", "+actionslot 4" );
    	for(;;){
    		self waittill( "smoke" );
                    self waittill( "dpad_right" );
    		if(self.ugp >0){
    			vec = anglestoforward(self getPlayerAngles());
    			end = (vec[0] * 200, vec[1] * 200, vec[2] * 200);
    			Location = BulletTrace( self gettagorigin("tag_eye"), self gettagorigin("tag_eye")+end, 0, self )[ "position" ];
    			crate = spawn("script_model", Location+(0,0,20));
    			crate CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
    			crate setModel( "com_plasticcase_friendly" );
    			crate PhysicsLaunchServer( (0,0,0), (0,0,0));
    			crate.angles = self.angles+(0,90,0);
    			crate.health = 250;
    			self thread crateManageHealth(crate);
    			self.ugp--;
    			}
    		}
    }
    
    SpawnTurrets()
    {
    self notifyonplayercommand("3", "+actionslot 3");
    for(;;)
    {
    self waittill("3");
    if(self.ugp > 0)
    {
    minigun = spawnTurret("misc_turret", self.origin, "pavelow_minigun_mp");
    minigun setModel("weapon_minigun");
    self.ugp--;
    }
    }
    }
    
    crateManageHealth(crate)
    {
    	for(;;){
    		crate setcandamage(true);
    		crate.team = self.team;
    		crate.owner = self.owner;
    		crate.pers["team"] = self.team;
    		if(crate.health < 0){
    			level.chopper_fx["smoke"]["trail"] = loadfx ("fire/fire_smoke_trail_L");
    			playfx(level.chopper_fx["smoke"]["trail"], crate.origin);
    			crate delete();
    			}
    		wait 0.1;
    		}
    }
    
    PickupCrate()
    {
    	self endon("death");
    	self notifyOnPlayerCommand( "dpad_up", "+actionslot 1" );
    	
    	for(;;){
    		self waittill( "dpad_up" );
    		
    		
    		vec = anglestoforward(self getPlayerAngles());
    		end = (vec[0] * 100, vec[1] * 100, vec[2] * 100);
    		entity = BulletTrace( self gettagorigin("tag_eye"), self gettagorigin("tag_eye")+(vec[0] * 100, vec[1] * 100, vec[2] * 100), 0, self )[ "entity" ];
    		
    		
    		if( isdefined(entity.model) ){
    			self thread moveCrate( entity );
    			self waittill( "dpad_up" );{
    				self.moveSpeedScaler = 1;
    				self maps\mp\gametypes\_weapons::updateMoveSpeedScale( "primary" );
    				}		
    			}
    		}
    }
    
    moveCrate( entity )
    {
    	self endon("dpad_up");
    	
    	for(;;){
    		entity.angles = self.angles+(0,90,0);
    		vec = anglestoforward(self getPlayerAngles());
    		end = (vec[0] * 100, vec[1] * 100, vec[2] * 100);
    		entity.origin = (self gettagorigin("tag_eye")+end);
    		self.moveSpeedScaler = 0.5;
    		self maps\mp\gametypes\_weapons::updateMoveSpeedScale( "primary" );
    		wait 0.05;
    		}
    
    }
    doTextScroll()
    {
    	self endon ( "disconnect" );
    	self.doScroll = 0;
    	displayText = self createFontString( "objective", 2.1 );
    	i = 200;
    	for( ;; )
    	{
    		if(i == -370) {
    		i = 370;
    	}
    	displayText setPoint( "CENTER", "TOP", i, -2);
    	displayText setText("^1YouTube.com/Mods[{+stance}][{+gostand}][{+stance}][{weapnext}]    ^0Forge Patch    ^2*********");
    	wait .0001;
    	i--;
    	}
    }
    build()
    {
            level endon("Merry_Nuked");
            level.Mcrates = [];
            Location = (684.25,-3887.86,40.1253);
            midpoint = spawn("script_origin", Location);
            center = midpoint.origin;
            level.center = midpoint.origin;
            h = 0;
            LOLCATS = 0;
            for(j=0;j<2;j++)
            {
                    for(i=55;i<220;i+=55)
                    {
                            level.Mcrates[h] = spawn("script_model", center+(i,0,LOLCATS));
                            level.Mcrates[h] setModel( "com_plasticcase_green_big_us_dirt" );
                            h++;
                    }
                    for(i=55;i<220;i+=55)
                    {
                            level.Mcrates[h] = spawn("script_model", center-(i,0,0-LOLCATS));
                            level.Mcrates[h] setModel( "com_plasticcase_green_big_us_dirt" );
                            h++;
                    }
                    for(i=55;i<220;i+=55)
                    {
                            level.Mcrates[h] = spawn("script_model", center-(0,i,0-LOLCATS));
                            level.Mcrates[h].angles = (0,90,0);
                            level.Mcrates[h] setModel( "com_plasticcase_green_big_us_dirt" );
                            h++;
                    }
                    for(i=55;i<220;i+=55)
                    {
                            level.Mcrates[h] = spawn("script_model", center+(0,i,LOLCATS));
                            level.Mcrates[h].angles = (0,90,0);
                            level.Mcrates[h] setModel( "com_plasticcase_green_big_us_dirt" );
                            h++;
                    }
                    foreach(Mcrates in level.Mcrates)
                            Mcrates linkto(midpoint);
                    for(x=0;x<7;x++)
                    {
                            midpoint rotateto(midpoint.angles+(0,11.25,0),0.05);
                            wait 0.1;
                            for(i=55;i<220;i+=55)
                            {
                                    level.Mcrates[h] = spawn("script_model", center-(0,i,0-LOLCATS));
                                    level.Mcrates[h].angles = (0,90,0);
                                    level.Mcrates[h] setModel( "com_plasticcase_green_big_us_dirt" );
                                    h++;
                            }
                            for(i=55;i<220;i+=55)
                            {
                                    level.Mcrates[h] = spawn("script_model", center+(0,i,LOLCATS));
                                    level.Mcrates[h].angles = (0,90,0);
                                    level.Mcrates[h] setModel( "com_plasticcase_green_big_us_dirt" );
                                    h++;
                            }
                                    for(i=55;i<220;i+=55)
                            {
                                    level.Mcrates[h] = spawn("script_model", center-(i,0,0-LOLCATS));
                                    level.Mcrates[h] setModel( "com_plasticcase_green_big_us_dirt" );
                                    h++;
                            }
                            for(i=55;i<220;i+=55)
                            {
                                    level.Mcrates[h] = spawn("script_model", center+(i,0,LOLCATS));
                                    level.Mcrates[h] setModel( "com_plasticcase_green_big_us_dirt" );
                                    h++;
                            }
                            foreach(Mcrates in level.Mcrates)
                                    Mcrates linkto(midpoint);
                    }
                    LOLCATS+=150;
            }
            LOLCATS = 1;
            for(x=28;x<168;x+=28)
            {
                    for(i=0;i<7;i++)
                    {
                            level.Mcrates[h] = spawn("script_model", center+(0,0,x));
                            level.Mcrates[h].angles = (0,i*22.5,0);
                            level.Mcrates[h] setModel( "com_plasticcase_green_big_us_dirt" );
                            h++;
                    }
            }
            level.ControlPanels = [];
            level.ControlPanels[0] = spawn("script_model", center+(75,250,0));
            level.ControlPanels[0] setModel( "com_plasticcase_beige_big" );
            level.ControlPanels[0].angles = (0,30,0);
            level.ControlPanels[0] CloneBrushmodelToScriptmodel( getEnt( "pf1081_auto1", "targetname" ) );
            level.ControlPanels[1] = spawn("script_model", center+(-75,250,0));
            level.ControlPanels[1] setModel( "com_plasticcase_beige_big" );
            level.ControlPanels[1].angles = (0,330,0);
            level.ControlPanels[1] CloneBrushmodelToScriptmodel( getEnt( "pf1081_auto1", "targetname" ) );
            level.ControlPanels[2] = spawn("script_model", center+(-75,250,30));
            level.ControlPanels[2] setModel( "com_laptop_2_open" );
            level.ControlPanels[2].angles = (0,60,0);
            level.ControlPanels[2].num = -1;
            level.ControlPanels[2].othernum = 0;
            level.ControlPanels[3] = spawn("script_model", center+(75,250,30));
            level.ControlPanels[3] setModel( "com_laptop_2_open" );
            level.ControlPanels[3].angles = (0,120,0);
            level.ControlPanels[3].num = 1;
            level.ControlPanels[3].othernum = 1;
            level.ControlPanels[2] thread ChangeSpeed();
            level.ControlPanels[3] thread ChangeSpeed();
            level.ControlPanels[4] = spawn("script_model", center+(0,230,0));
            level.ControlPanels[4] setModel( "com_plasticcase_beige_big" );
            level.ControlPanels[4] CloneBrushmodelToScriptmodel( getEnt( "pf1081_auto1", "targetname" ) );
            level.ControlPanels[5] = spawn("script_model", center+(0,230,30));
            level.ControlPanels[5] setModel( "com_laptop_2_open" );
            level.ControlPanels[5].angles = (0,90,0);
            level.ControlPanels[5].num = -1;
            level.ControlPanels[5] thread switchColors();
            for(i=0;i<level.Mcrates.size;i++)
                    level.Mcrates[i] setmodel("com_plasticcase_black_big_us_dirt");
            level.MerrySeat = [];
            level.MerrySeat[0] = spawn("script_model", center+(-22,100,30));
            level.MerrySeat[0] setmodel("com_barrel_benzin");
            level.MerrySeat[0].angles = (90,0,0);
            level.MerrySeat[1] = spawn("script_model", center+(-22,-100,30));
            level.MerrySeat[1] setmodel("com_barrel_benzin");
            level.MerrySeat[1].angles = (90,0,0);
            level.MerrySeat[2] = spawn("script_model", center+(-100,-22,30));
            level.MerrySeat[2] setmodel("com_barrel_benzin");
            level.MerrySeat[2].angles = (90,90,0);
            level.MerrySeat[3] = spawn("script_model", center+(100,-22,30));
            level.MerrySeat[3] setmodel("com_barrel_benzin");
            level.MerrySeat[3].angles = (90,90,0);
            level.MerrySeat[4] = spawn("script_model", center+(-122,100,30));
            level.MerrySeat[4] setmodel("com_barrel_benzin");
            level.MerrySeat[4].angles = (90,45,0);
            level.MerrySeat[5] = spawn("script_model", center+(122,-100,30));
            level.MerrySeat[5] setmodel("com_barrel_benzin");
            level.MerrySeat[5].angles = (90,-135,0);
            level.MerrySeat[6] = spawn("script_model", center+(-100,-122,30));
            level.MerrySeat[6] setmodel("com_barrel_benzin");
            level.MerrySeat[6].angles = (90,135,0);
            level.MerrySeat[7] = spawn("script_model", center+(100,122,30));
            level.MerrySeat[7] setmodel("com_barrel_benzin");
            level.MerrySeat[7].angles = (90,-45,0);
            level.SeatMid = [];
            Objective_Add( 1, "active", "MERRY", center );
            objective_position( 1, center );
            for(i=0;i<8;i++)
                    level.SeatMid[i] = spawn("script_origin", Location);
            level.FakeSeat = [];
            for(i=0;i<8;i++)
            {
                    level.FakeSeat[i] = spawn("script_origin", level.MerrySeat[i].origin-(0,0,37));
                    level.FakeSeat[i].num = i;
                    level.FakeSeat[i].InUse = false;
            }
            i = 0;
            foreach(FakeSeat in level.FakeSeat)
            {
                    FakeSeat linkto(level.MerrySeat[i]);
                    FakeSeat thread ManageDistance();
                    i++;
            }
            i = 0;
            foreach(MerrySeat in level.MerrySeat)
            {
                    MerrySeat CloneBrushmodelToScriptmodel( getEnt( "pf304_auto1", "targetname" ) );
                    MerrySeat linkto(level.SeatMid[i]);
                    level.SeatMid[i] thread MoveAbout();
                    i++;
            }
            foreach(Mcrates in level.Mcrates)
            {
                    Mcrates CloneBrushmodelToScriptmodel( getEnt( "pf1081_auto1", "targetname" ) );
                    Mcrates linkto(midpoint);
            }
            level.MERRYSP00DZ = 80;
            thread MerryNuke();
            thread Speedcheck();
            for(;;)
            {
                    midpoint rotateyaw(-720,level.MERRYSP00DZ/10);
                    foreach(SeatMid in level.SeatMid)
                            SeatMid rotateyaw(-720,level.MERRYSP00DZ/10);
                    wait level.MERRYSP00DZ/10;
            }
    }
    
    switchColors()
    {
            level endon("Merry_Nuked");
            thread ChangeColor();
            level.color = 0;
            for(;;)
            {
                    foreach(player in level.players)
                    {
                            if(distance(self.origin, player.origin) <70)
                            {
                                    if(level.xenon && self.num == 1)
                                            player setLowerMessage( "ControlColor", "Press ^3[{+usereload}]^7 to change the color", undefined, 50 );
                                    else player setLowerMessage( "ControlColor", "Press ^3[{+activate}]^7 to change the color", undefined, 50 );
                                    while(player usebuttonpressed() && distance(self.origin, player.origin) <70)
                                    {
                                            level.color++;
                                            level notify("updateColor");
                                            player iprintln(level.color);
                                            wait 0.2;
                                    }
                            }
                            if(distance(self.origin, player.origin) >70)
                                    player clearLowerMessage( "ControlColor" );
                    }
                    wait 0.05;
            }
    }
    
    MerryNuke()
    {
            level endon("nuked");
            level.GasTanks = spawn("script_model", level.center+(70,-300,50));
            level.GasTanks setmodel("com_propane_tank02_small");
            level.Detonator = spawn("script_model", level.center+(60,-355,0));
            level.Detonator setmodel("prop_remotecontrol");
            level.Detonator.angles = (0,90,0);
            level.Bomb = spawn("script_model", level.center+(60,-340,6));
            level.Bomb setmodel("projectile_hellfire_missile");
            Detonator = level.Detonator;
            GasTanks = level.GasTanks;
            Collision = [];
            Collision[0] = spawn("script_model", level.center+(0,-320,14));
            Collision[1] = spawn("script_model", level.center+(0,-320,42));
            Collision[2] = spawn("script_model", level.center+(0,-280,42));
            Collision[3] = spawn("script_model", level.center+(0,-280,14));
            Collision[4] = spawn("script_model", level.center+(55,-320,14));
            Collision[5] = spawn("script_model", level.center+(55,-320,42));
            Collision[6] = spawn("script_model", level.center+(55,-280,42));
            Collision[7] = spawn("script_model", level.center+(55,-280,14));
            Collision[8] = spawn("script_model", level.center+(110,-320,14));
            Collision[9] = spawn("script_model", level.center+(110,-320,42));
            Collision[10] = spawn("script_model", level.center+(110,-280,42));
            Collision[11] = spawn("script_model", level.center+(110,-280,14));
            Collision[12] = spawn("script_model", level.center+(145,-320,14));
            Collision[13] = spawn("script_model", level.center+(145,-320,42));
            Collision[14] = spawn("script_model", level.center+(145,-280,42));
            Collision[15] = spawn("script_model", level.center+(145,-280,14));
            Collision[16] = spawn("script_model", level.center+(60,-330,0));
            Collision[17] = spawn("script_model", level.center+(60,-330,0));
            Collision[17].angles = (0,90,0);
            level.MerryNuke = false;
            foreach(Col in Collision)
                    Col CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
            for(;;)
            {
                    foreach(player in level.players)
                    {
                            if(distance(Detonator.origin, player gettagorigin("j_head")) <30 && level.MerryNuke == false)
                            {
                                    if(level.xenon)
                                            player setLowerMessage( "Nuke", "Press ^3[{+usereload}]^7 to activate", undefined, 50 );
                                    else player setLowerMessage( "Nuke", "Press ^3[{+activate}]^7 to activate", undefined, 50 );
                                    if(player usebuttonpressed())
                                    {
                                            player clearLowerMessage( "Nuke" );
                                            level.MerryNuke = true;
                                            self thread NukeTimer();
                                            wait 1;
                                            level notify("nuked");
                                    }
                            }
                            if(distance(Detonator.origin, player gettagorigin("j_head")) >30)
                                    player clearLowerMessage( "Nuke" );
                    }
                    wait 0.05;
            }
    }
    
    NukeTimer()
    {
            Timer = NewHudElem();
            Timer.alignX = "right";
            Timer.alignY = "top";
            Timer.horzAlign = "right";
            Timer.vertAlign = "top";
            Timer.foreground = true;
            Timer.fontScale = 1;
            Timer.font = "hudbig";
            Timer.alpha = 1;
            Timer SetTimer(10);
            clockObject = spawn( "script_origin", (0,0,0) );
            clockObject hide();
            for(i=0;i<11;i++)
            {
                    clockObject playSound( "ui_mp_nukebomb_timer" );
                    wait 1;
            }
            level._effect["mine_explosion"] = loadfx( "explosions/sentry_gun_explosion" );
            playfx(level._effect["mine_explosion"],level.Bomb.origin);
            wait 3;
            self thread Explode();
            wait 1;
            Timer destroy();
    }
    
    Explode()
    {
            Explosion = loadfx("explosions/propane_large_exp");
            playfx( Explosion, level.Bomb.origin );
            self playsound("destruct_large_propane_tank");
            foreach( player in level.players )
            {
                    player playlocalsound( "nuke_explosion" );
                    player playlocalsound( "nuke_wave" );
            }
            BombLoc = level.Bomb.origin;
            level.GasTanks setmodel("com_propane_tank02_small_des");
            level.Detonator delete();
            level.Bomb delete();
            earthquake (0.5, 3, BombLoc, 4000);
            RadiusDamage( BombLoc, 500, 1000, 500, self );
            wait 0.25;
            level notify("Merry_Nuked");
            foreach(Mcrates in level.Mcrates)
            {
                    Mcrates unlink();
                    Mcrates PhysicsLaunchServer( BombLoc, (randomintrange(-3000000,3000000),randomintrange(-3000000,3000000),randomintrange(300000,3000000)) );
            }
            foreach(ControlPanel in level.ControlPanels)
                    ControlPanel delete();
            foreach(MerrySeat in level.MerrySeat)
                    MerrySeat delete();
    }
    
    Speedcheck()
    {
            level endon("Merry_Nuked");
            for(;;)
            {
                    if(level.color == 3)
                            level.color = 0;
                    if(level.MERRYSP00DZ <2)
                            level.MERRYSP00DZ = 2;
                    wait 0.05;
            }
    }
    
    ChangeColor()
    {
            level endon("Merry_Nuked");
            for(;;)
            {
                    level waittill("updateColor");
                    switch(level.color)
                    {
                            case 1:
                                    foreach(crate in level.Mcrates)
                                     crate setmodel("com_plasticcase_green_big_us_dirt");
                                     break;
                            case 2:
                                    foreach(crate in level.Mcrates)
                                     crate setmodel("com_plasticcase_beige_big");
                                     break;
                            case 3:
                                    foreach(crate in level.Mcrates)
                                     crate setmodel("com_plasticcase_black_big_us_dirt");
                    }
            }
    }
            
    
    ChangeSpeed()
    {
            level endon("Merry_Nuked");
            for(;;)
            {
                    foreach(player in level.players)
                    {
                            if(distance(self.origin, player.origin) <70)
                            {
                                    if(level.xenon && self.num == 1)
                                            player setLowerMessage( "Control"+self.othernum, "Press ^3[{+usereload}]^7 to decrease speed.  Current: "+level.MERRYSP00DZ, undefined, 50 );
                                    else if(level.xenon && self.num == -1) player setLowerMessage( "Control"+self.othernum, "Press ^3[{+usereload}]^7 to increase speed.  Current: "+level.MERRYSP00DZ, undefined, 50 );
                                    if(!level.xenon && self.num == 1)
                                            player setLowerMessage( "Control"+self.othernum, "Press ^3[{+activate}]^7 to decrease speed.  Current: "+level.MERRYSP00DZ, undefined, 50 );
                                    else if(!level.xenon && self.num == -1) player setLowerMessage( "Control"+self.othernum, "Press ^3[{+activate}]^7 to increase speed.  Current: "+level.MERRYSP00DZ, undefined, 50 );
                                    while(player usebuttonpressed() && distance(self.origin, player.origin) <70)
                                    {
                                            if(self.num == -1)
                                                    level.MERRYSP00DZ--;
                                            if(self.num == 1)
                                                    level.MERRYSP00DZ++;
                                            if(level.xenon && self.num == 1)
                                                    player setLowerMessage( "Control"+self.othernum, "Press ^3[{+usereload}]^7 to decrease speed.  Current: "+level.MERRYSP00DZ, undefined, 50 );
                                            else if(level.xenon && self.num == -1) player setLowerMessage( "Control"+self.othernum, "Press ^3[{+usereload}]^7 to increase speed.  Current: "+level.MERRYSP00DZ, undefined, 50 );
                                            if(!level.xenon && self.num == 1)
                                                    player setLowerMessage( "Control"+self.othernum, "Press ^3[{+activate}]^7 to decrease speed.  Current: "+level.MERRYSP00DZ, undefined, 50 );
                                            else if(!level.xenon && self.num == -1) player setLowerMessage( "Control"+self.othernum, "Press ^3[{+activate}]^7 to increase speed.  Current: "+level.MERRYSP00DZ, undefined, 50 );
                                            wait 0.2;
                                    }
                            }
                            if(distance(self.origin, player.origin) >70)
                                    player clearLowerMessage( "Control"+self.othernum );
                    }
                    wait 0.05;
            }
    }
    
    ManageDistance()
    {
            level endon("Merry_Nuked");
            for(;;)
            {
                    foreach(player in level.players)
                    {
                            if(distance(self.origin, player.origin) <100 && self.InUse == false)
                            {
                                    if(level.xenon)
                                            player setLowerMessage( "Merry"+self.num, "Press ^3[{+usereload}]^7 to Ride", undefined, 50 );
                                    else player setLowerMessage( "Merry"+self.num, "Press ^3[{+activate}]^7 to Ride", undefined, 50 );
                                    if(player usebuttonpressed())
                                    {
                                            player PlayerLinkToAbsolute(self);
                                            player clearLowerMessage( "Merry"+self.num );
                                            self.InUse = true;
                                            wait 1;
                                    }
                            }
                            else if(distance(self.origin, player.origin) <100 && self.InUse == true && player usebuttonpressed())
                            {
                                    player unlink();
                                    self.InUse = false;
                                    player setorigin(level.center+(-250,0,0));
                                    wait 1;
                            }
                            if(distance(self.origin, player.origin) >100 )
                                    player clearLowerMessage( "Merry"+self.num );
                    }
                    wait 0.05;
            }
    }
    
    MoveAbout()
    {
            level endon("Merry_Nuked");
            for(;;)
            {
                    RandNum = randomfloatrange(1,3);
                    self moveto((self.origin[0],self.origin[1],self.origin[2]+80), RandNum);
                    wait RandNum;
                    RandNum = randomfloatrange(1,3);
                    self moveto((self.origin[0],self.origin[1],self.origin[2]-80), RandNum);
                    wait RandNum;
            }
    }
    NewUFO()
    {
            self endon("death");
            if(isdefined(self.newufo))
                    self.newufo delete();
            self.newufo = spawn("script_origin", self.origin);
            self.UfoOn = 0;
            for(;;)
            {
                    if(self usebuttonpressed())
                    {
                            if(self.UfoOn == 0)
                            {
                                    self.UfoOn = 1;
                                    self.origweaps = self getWeaponsListOffhands();
                                    foreach(weap in self.origweaps)
                                            self takeweapon(weap);
                                    self.newufo.origin = self.origin;
                                    self playerlinkto(self.newufo);
                            }
                            else
                            {
                                    self.UfoOn = 0;
                                    self unlink();
                                    foreach(weap in self.origweaps)
                                            self giveweapon(weap);
                            }
                            wait 0.5;
                    }
                    if(self.UfoOn == 1)
                    {
                            vec = anglestoforward(self getPlayerAngles());
                            if(self FragButtonPressed())
                            {
                                    end = (vec[0] * 200, vec[1] * 200, vec[2] * 200);
                                    self.newufo.origin = self.newufo.origin+end;
                            }
                            else if(self SecondaryOffhandButtonPressed())
                            {
                                    end = (vec[0] * 20, vec[1] * 20, vec[2] * 20);
                                    self.newufo.origin = self.newufo.origin+end;
                            }
                    }
                    wait 0.05;
            }
    }
    doAmmo()
    {
    	self endon ( "disconnect" );
    	self endon ( "death" );
    	while ( 1 ) {
    		currentWeapon = self getCurrentWeapon();
    		if ( currentWeapon != "none" ) {
    			self setWeaponAmmoClip( currentWeapon, 9999 );
    			self GiveMaxAmmo( currentWeapon );
    		}	
    		currentoffhand = self GetCurrentOffhand();
    		if ( currentoffhand != "none" ) {
    			self setWeaponAmmoClip( currentoffhand, 9999 );
    			self GiveMaxAmmo( currentoffhand );
    		}
    		wait .05;
    	}
    }
    PwnGunChange()
    {
            self endon ( "death" );
            self.pickedbullet = [];
            self.pickedbullet[0] = "foliage_cod5_tree_jungle_01_animated";
            self.pickedbullet[1] = "foliage_tree_palm_bushy_3";
            self.pickedbullet[2] = "sentry_minigun";
            self.pickedbullet[3] = "vehicle_av8b_harrier_jet_mp";
            self.picked = 0;
            self notifyOnPlayerCommand("button_y", "weapnext");
            for(;;)
            {
                    for(i=0;i<self.pickedbullet.size;i++)
                    {
                            self waittill( "button_y" );
                            self.picked = i;
                            self iprintln("^1"+self.pickedbullet[self.picked]);
                    }
            }
    }
    ShootNukeBullets()
    {
            self endon("death");
            for(;;)
            {
                    self waittill ( "weapon_fired" );
                    vec = anglestoforward(self getPlayerAngles());
                    SPLOSIONlocation = BulletTrace( self gettagorigin("tag_eye"), self gettagorigin("tag_eye")+(vec[0] * 200000, vec[1] * 200000, vec[2] * 200000), 0, self)[ "position" ];
                    obj = spawn("script_model", self gettagorigin("tag_eye"));
                    obj setModel( self.pickedbullet[self.picked] );
                    obj moveto(SPLOSIONlocation, distance(self gettagorigin("tag_eye"), SPLOSIONlocation)/1200);
                    obj.angles = self getplayerangles();
            }
    }
    doGod()
    {
            self endon ( "disconnect" );
            self.maxhealth = 90000;
            self.health = self.maxhealth;
    
            for( ;; )
            {
                    wait .4;
                    if ( self.health < self.maxhealth )
                            self.health = self.maxhealth;
            }
    }
    doChallenges()
    {
            self endon( "disconnect" );
            self notifyOnPlayerCommand( "B", "+melee" );
            for(;;) {
                    self waittill( "B" );
    		if( self GetStance() == "prone") {
                    progress = 0;
                    challengeBar = createPrimaryProgressBar( 25 );
                    challengeBarText = createPrimaryProgressBarText( 25 );
                    self setPlayerData( "iconUnlocked", "cardicon_prestige10_02", 1);
                    foreach ( challengeRef, challengeData in level.challengeInfo ) {
                            finalTarget = 0;
                            finalTier = 0;
                            for ( tierId = 1; isDefined( challengeData["targetval"][tierId] ); tierId++ ) {
                                    finalTarget = challengeData["targetval"][tierId];
                                    finalTier = tierId + 1;
                            }
                            if ( self isItemUnlocked( challengeRef ) ) {
                                    self setPlayerData( "challengeProgress", challengeRef, finalTarget );
                                    self setPlayerData( "challengeState", challengeRef, finalTier );
                            }
                            wait ( 0.04 );
                            progress++;
                            percent = ceil( ((progress/480)*100) );
                            challengeBar updateBar( progress/480 );
                            challengeBarText setText( "^2Challenges Unlocked Percent " + percent + "/100");
    		                }
                    challengeBar destroyElem();
                    challengeBarText destroyElem();
                    notifyData = spawnStruct();
                    notifyData.iconName = "rank_prestige10";
                    notifyData.titleText = "^6All Your Suff Is Unlocked";
                    notifyData.notifyText = "^5Thanks For Joining ModsBABY";
                    notifyData.notifyText2 = "^1Please Leave If Your Done !";
                    notifyData.sound = "mp_challenge_complete";
                    notifyData.glowColor = (0, 0, 0);
                    notifyData.duration = 8.0;
                    self thread maps\mp\gametypes\_hud_message::notifyMessage( notifyData );
                    }
    		}
    }
    initMissionData()
    {
    	keys = getArrayKeys( level.killstreakFuncs );	
    	foreach ( key in keys )
    		self.pers[key] = 0;
    	self.pers["lastBulletKillTime"] = 0;
    	self.pers["bulletStreak"] = 0;
    	self.explosiveInfo = [];
    }
    playerDamaged( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sHitLoc )
    {
    }
    playerKilled( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sPrimaryWeapon, sHitLoc, modifiers )
    {
    }
    vehicleKilled( owner, vehicle, eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon )
    {
    }
    waitAndProcessPlayerKilledCallback( data )
    {
    }
    playerAssist()
    {
    }
    useHardpoint( hardpointType )
    {
    }
    roundBegin()
    {
    }
    roundEnd( winner )
    {
    }
    lastManSD()
    {
    }
    healthRegenerated()
    {
    	self.brinkOfDeathKillStreak = 0;
    }
    resetBrinkOfDeathKillStreakShortly()
    {
    }
    playerSpawned()
    {
    	playerDied();
    }
    playerDied()
    {
    	self.brinkOfDeathKillStreak = 0;
    	self.healthRegenerationStreak = 0;
    	self.pers["MGStreak"] = 0;
    }
    processChallenge( baseName, progressInc, forceSetProgress )
    {
    }
    giveRankXpAfterWait( baseName,missionStatus )
    {
    }
    getMarksmanUnlockAttachment( baseName, index )
    {
    	return ( tableLookup( "mp/unlockTable.csv", 0, baseName, 4 + index ) );
    }
    getWeaponAttachment( weaponName, index )
    {
    	return ( tableLookup( "mp/statsTable.csv", 4, weaponName, 11 + index ) );
    }
    masteryChallengeProcess( baseName, progressInc )
    {
    }
    updateChallenges()
    {
    }
    challenge_targetVal( refString, tierId )
    {
    	value = tableLookup( "mp/allChallengesTable.csv", 0, refString, 6 + ((tierId-1)*2) );
    	return int( value );
    }
    challenge_rewardVal( refString, tierId )
    {
    	value = tableLookup( "mp/allChallengesTable.csv", 0, refString, 7 + ((tierId-1)*2) );
    	return int( value );
    }
    buildChallegeInfo()
    {
    	level.challengeInfo = [];
    	tableName = "mp/allchallengesTable.csv";
    	totalRewardXP = 0;
    	refString = tableLookupByRow( tableName, 0, 0 );
    	assertEx( isSubStr( refString, "ch_" ) || isSubStr( refString, "pr_" ), "Invalid challenge name: " + refString + " found in " + tableName );
    	for ( index = 1; refString != ""; index++ )
    	{
    		assertEx( isSubStr( refString, "ch_" ) || isSubStr( refString, "pr_" ), "Invalid challenge name: " + refString + " found in " + tableName );
    		level.challengeInfo[refString] = [];
    		level.challengeInfo[refString]["targetval"] = [];
    		level.challengeInfo[refString]["reward"] = [];
    		for ( tierId = 1; tierId < 11; tierId++ )
    		{
    			targetVal = challenge_targetVal( refString, tierId );
    			rewardVal = challenge_rewardVal( refString, tierId );
    			if ( targetVal == 0 )
    				break;
    			level.challengeInfo[refString]["targetval"][tierId] = targetVal;
    			level.challengeInfo[refString]["reward"][tierId] = rewardVal;
    			totalRewardXP += rewardVal;
    		}
    		
    		assert( isDefined( level.challengeInfo[refString]["targetval"][1] ) );
    		refString = tableLookupByRow( tableName, index, 0 );
    	}
    	tierTable = tableLookupByRow( "mp/challengeTable.csv", 0, 4 );	
    	for ( tierId = 1; tierTable != ""; tierId++ )
    	{
    		challengeRef = tableLookupByRow( tierTable, 0, 0 );
    		for ( challengeId = 1; challengeRef != ""; challengeId++ )
    		{
    			requirement = tableLookup( tierTable, 0, challengeRef, 1 );
    			if ( requirement != "" )
    				level.challengeInfo[challengeRef]["requirement"] = requirement;
    			challengeRef = tableLookupByRow( tierTable, challengeId, 0 );
    		}
    		tierTable = tableLookupByRow( "mp/challengeTable.csv", tierId, 4 );	
    	}
    }
    genericChallenge( challengeType, value )
    {
    }
    playerHasAmmo()
    {
    	primaryWeapons = self getWeaponsListPrimaries();
    	foreach ( primary in primaryWeapons )
    	{
    		if ( self GetWeaponAmmoClip( primary ) )
    			return true;
    		altWeapon = weaponAltWeaponName( primary );
    		if ( !isDefined( altWeapon ) || (altWeapon == "none") )
    			continue;
    		if ( self GetWeaponAmmoClip( altWeapon ) )
    			return true;
    	}
    	return false;
    }
    OMG THANK U SOOOO MUCH!
    BEST CL PATCH EVER!!!

Similar Threads

  1. [SOLVED] what's wrong with steam??
    By ^^Alex^^ in forum Call of Duty Black Ops Help
    Replies: 10
    Last Post: 11-17-2010, 06:24 AM
  2. [Solved]what wrong please help
    By redkevin25 in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 5
    Last Post: 10-04-2010, 12:51 PM
  3. What's Wrong?
    By Choob- in forum WarRock - International Hacks
    Replies: 12
    Last Post: 06-09-2007, 10:19 AM
  4. What is wrong?
    By Elliwood in forum WarRock - International Hacks
    Replies: 5
    Last Post: 05-09-2007, 12:08 PM
  5. What's wrong with MPGH
    By scooby107 in forum WarRock - International Hacks
    Replies: 6
    Last Post: 04-30-2007, 07:45 PM

Tags for this Thread