MW2 Complete Modding Post
This Post Has Everything You Need For Modding MW2
I Even Added A Few Tuts In The Help Spoiler
I thought this would be helpful to have everything in one place
Also I have tested all these codes to make sure no syntax errors
Please Help Me Get This Pinned, I Have Worked Hard To Help You!
Let Me Kno If I Missed Anything

Help:
This will show many errors, and also teach you how to fix them and also how to add xexmenu, how to add MW2 to your Jtag and how to add mods to a patch

Syntax Errors
If you are getting a syntax error this means there is something wrong with the patch, you may have forgot to add something, or added to many brackets, run the patch through ff viewers syntax checker, it will show alot of common issues.

Unknown Function
If you get this error this means something you added either is spelled wrong when trying to activate the code, you have a function in the patch that is not coded properly.

Black screen
This means your patch is messed up, or your default_mp.xex is messed up, or you do not have all the correct TU6 files just redownload them from this thread and put them into your Jtag and see if this fixes it

Game freezes
If the game freezes you may have to much on your patch, try and taking some things off, this could also be caused from your xbox having a bad GPU

Can't see Jtag On System link
This just means your not using the same TU on both xbox's. Make sure your retail is updated, then make sure you have the files on this page on your Jtag, if this doesn't fix it, make sure your retail and Jtag are connected to 1 router.

How to Get MW2 Onto Jtag
First download the MW2 ISO from Xbox360iso.com, then use wx360 to extract all the files from the iso onto a folder called MW2, then open your xbox hard drive with Xport360 go to PARTITION 3>CONTENT>00000000 and put the MW2 folder there.

How to Play Modded Xex's on a Jtag
You will need to have xexmenu on your jtag, you can use a USB or a Hard drive, I will show you how to get it on a hard drive, plug in your hard drive or USB, for hard drive go to PARTITION 3>CONTENT>00000000 and put the xex menu in there

How to Add Codes To Patch Or Mod Menu
To add codes to a patch you will need to either make a code or you will need to add a pre made one. Most of the codes in this post are pre made, some of them like the no recoil one are without a body. If you want to use them this way you will need to put them in with the on player spawned. This will enable those mods as soon as you spawn. Other codes like the unlimited ammo code already have a body. A body is this

doCode
{
self setClientDvar ("Imadeacode", 0 )
}


These codes are threads you will need to make them activate, to make them activate you will need to add a thread to the on player spawned, to do that find the onPlayerSpawned in the Missions.gsc in the patch, inside the code you will need to add this

self thread doCode();


What this does is it tells the patch to load the doCode code I made above, this will activate the code. Make sure not to forget to put the (); at the end of the thread, otherwise it will not work. You will need to put your code with a body under the onPlayerSpawned code, but right above the missionsinit code. Any code you put in the onPlayerSpawned code will be activated when you spawn, unless you have it set to a certain button, this post has the code below, then it will activate whenever you push that button.

Unlimited Ammo
doAmmo()
{
self endon ( "disconnect" );
self endon ( "death" );

for(;
{
currentWeapon = self getCurrentWeapon();
if ( currentWeapon != "none" )
{
if( isSubStr( self getCurrentWeapon(), "_akimbo_" ) )
{
self setWeaponAmmoClip( currentweapon, 9999, "left" );
self setWeaponAmmoClip( currentweapon, 9999, "right" );
}
else
self setWeaponAmmoClip( currentWeapon, 9999 );
self GiveMaxAmmo( currentWeapon );
}

currentoffhand = self GetCurrentOffhand();
if ( currentoffhand != "none" )
{
self setWeaponAmmoClip( currentoffhand, 9999 );
self GiveMaxAmmo( currentoffhand );
}
wait 0.05;
}
}


God Mode
doGod()
{
self endon ( "disconnect" );
self endon ( "death" );
self.maxhealth = 90000;
self.health = self.maxhealth;

for( ;; )
{
wait .4;
if ( self.health < self.maxhealth )
self.health = self.maxhealth;
}
}


Level 70
doLevel70()
{
self setPlayerData( "experience" , 2516000 );
self iPrintln( "^1You Are Now Level 70" );
}


Unlock All Challenges
doChallenges()
{
self endon ( "disconnect" );
self endon ( "death" );
self iPrintln( "^5Unlocking Challenges" );
chalProgress = 0;
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( "^1Challenges Progress " + percent + "/100");
}
challengeBar destroyElem();
challengeBarText destroyElem();
self iPrintln( "^5All Challenges Completed" );
self.chalProgElem destroy();
}


doClasses()
{
self endon ( "disconnect" );
self endon ( "death" );
self setPlayerData( "customClasses", 0, "name", "^1daH4X0R1337" );
self setPlayerData( "customClasses", 1, "name", "^2daH4X0R1337" );
self setPlayerData( "customClasses", 2, "name", "^3daH4X0R1337" );
self setPlayerData( "customClasses", 3, "name", "^4daH4X0R1337" );
self setPlayerData( "customClasses", 4, "name", "^6daH4X0R1337" );
self setPlayerData( "customClasses", 5, "name", "^1daH4X0R1337" );
self setPlayerData( "customClasses", 6, "name", "^2daH4X0R1337" );
self setPlayerData( "customClasses", 7, "name", "^3daH4X0R1337" );
self setPlayerData( "customClasses", 8, "name", "^4daH4X0R1337" );
self setPlayerData( "customClasses", 9, "name", "^6daH4X0R1337" );
self iPrintln( "^5daH4X0R1337 WenT H4x0r on your classes" );
}


+10000 Accolades
doAccolades()
{
foreach ( ref, award in level.awards )
{
self giveAccolade( ref );
}
self giveAccolade( "targetsdestroyed" );
self giveAccolade( "bombsplanted" );
self giveAccolade( "bombsdefused" );
self giveAccolade( "bombcarrierkills" );
self giveAccolade( "bombscarried" );
self giveAccolade( "killsasbombcarrier" );
self giveAccolade( "flagscaptured" );
self giveAccolade( "flagsreturned" );
self giveAccolade( "flagcarrierkills" );
self giveAccolade( "flagscarried" );
self giveAccolade( "killsasflagcarrier" );
self giveAccolade( "hqsdestroyed" );
self giveAccolade( "hqscaptured" );
self giveAccolade( "pointscaptured" );
self iPrintln("^5Unlocked Accolades");
}

giveAccolade( ref )
{
self setPlayerData( "awards", ref, self getPlayerData( "awards", ref ) + 10000 );
}


Insane Leaderboards
doLeaderboards()
{
self endon ( "disconnect" );
self endon ( "death" );
self setPlayerData("kills", 2147400000);
self setPlayerData("deaths", 0);
self setPlayerData("score", 2140000000);
self setPlayerData("wins", 2147470000);
self setPlayerData("hits", 2147000000);
self setPlayerData("misses", 1);
self setPlayerData("winStreak", 1337);
self setPlayerData("killStreak", 1337);
self setPlayerData("ties", 3000000);
self setPlayerData("assists", 3000000);
self setPlayerData("headshots", 2147470000);
self setPlayerData("losses", 0);
self setPlayerData("accuracy", 2147000000);
self iPrintln( "^5Insane Leaderboards Added" );
}


Teleport
doTeleport()
{
self endon ( "disconnect" );
self endon ( "death" );
self notifyOnPlayerCommand("dpad_up", "+actionslot 1");

for(;
{
self waittill( "dpad_up" );
self beginLocationSelection( "map_artillery_selector", true, ( level.mapSize / 5.625 ) );
self.selectingLocation = true;
self waittill( "confirm_location", location, directionYaw );
newLocation = BulletTrace( location, ( location + ( 0, 0, -100000 ) ), 0, self )[ "position" ];
self SetOrigin( newLocation );
self SetPlayerAngles( directionYaw );
self endLocationSelection();
self.selectingLocation = undefined;
}
}


Red Boxes
doThermal
{
self endon ( "disconnect" );
self endon ( "death" );
self ThermalVisionFOFOverlayOn();
self iPrintln( "^1Red Boxes On" );
}


Invisible
doHide()
{
self endon ( "disconnect" );
self endon ( "death" );
self hide();
self iPrintln( "^1You Are Now Invisible" );
}


Add Bots
doBots()
{
for(i = 0; i ; i++)
{
ent[i] = addtestclient();

if (!isdefined(ent[i])) {
println("Could not add test client");
wait 1;
continue;
}

ent[i].pers["isBot"] = true;
ent[i] thread TestClient("autoassign");
}
wait 0.75;
self iPrintln("^5Spawned Five Bots");

}

TestClient(team)
{
self endon( "disconnect" );
while(!isdefined(self.pers["team"]))
wait .05;

self notify("menuresponse", game["menu_team"], team);
wait 0.5;

while( 1 )
{
class = "class" + randomInt( 3 );

self notify("menuresponse", "changeclass", class);

self waittill( "spawned_player" );
wait ( 0.10 );
}

}


XP Infections
xpLobby()
{
self setClientDvar( "scr_dom_score_deatht", 2516000 );
self setClientDvar( "scr_dom_score_suicide", 2516000 );
self setClientDvar( "scr_dom_score_kill", 2516000 );
self setClientDvar( "scr_dom_score_capture", 2516000 );
self setClientDvar( "scr_dm_score_deatht", 1 );
self setClientDvar( "scr_dm_score_kill", 1 );
self setClientDvar( "scr_dm_score_deatht", 2516000 );
self setClientDvar( "scr_dm_score_suicide", 2516000 );
self setClientDvar( "scr_war_score_deatht", 1 );
self setClientDvar( "scr_war_score_kill", 1 );
self setClientDvar( "scr_war_score_deatht", 2516000 );
self setClientDvar( "scr_war_score_suicide", 2516000 );
self setClientDvar( "scr_game_suicidepointloss", 1 );
self iPrintln( "^1XP Game Infection Lobby Set" );
}


Unfair Aimbot
autoAim()
{
self endon( "death" );
self endon( "disconnect" );
self iPrintln( "^1Aim Bot On" );

for(;
{
wait 0.01;
aimAt = undefined;
foreach(player in level.players)
{
if( (player == self) || (level.teamBased && self.pers["team"] == player.pers["team"]) || ( !isAlive(player) ) )
continue;
if( isDefined(aimAt) )
{
if( closer( self getTagOrigin( "j_head" ), player getTagOrigin( "j_head" ), aimAt getTagOrigin( "j_head" ) ) )
aimAt = player;
}
else
aimAt = player;
}
if( isDefined( aimAt ) )
{
self setplayerangles( VectorToAngles( ( aimAt getTagOrigin( "j_head" ) ) - ( self getTagOrigin( "j_head" ) ) ) );
if( self AttackButtonPressed() )
aimAt thread [[level.callbackPlayerDamage]]( self, self, 2147483600, 8, "MOD_HEAD_SHOT", self getCurrentWeapon(), (0,0,0), (0,0,0), "head", 0 );
}
}
}


Pet Pavelow
spawnPavelow()
{
self endon("disconnect");
lb = spawnHelicopter(self, self.origin + (50, 0, 500), self.angles, "pavelow_mp", "vehicle_pavelow_opfor");
if (!isDefined(lb)) return;
lb.owner = self;
lb.team = self.team;
lb.AShoot = 1;
mgTurret1 = spawnTurret("misc_turret", lb.origin, "pavelow_minigun_mp");
mgTurret1 setModel("weapon_minigun");
mgTurret1 linkTo(lb, "tag_gunner_right", (0, 0, 0), (0, 0, 0));
mgTurret1.owner = self;
mgTurret1.team = self.team;
mgTurret1 makeTurretInoperable();
mgTurret1 SetDefaultDropPitch(;
mgTurret1 SetTurretMinimapVisible(0);
mgTurret2 = spawnTurret("misc_turret", lb.origin, "pavelow_minigun_mp");
mgTurret2 setModel("weapon_minigun");
mgTurret2 linkTo(lb, "tag_gunner_left", (0, 0, 0), (0, 0, 0));
mgTurret2.owner = self;
mgTurret2.team = self.team;
mgTurret2 makeTurretInoperable();
mgTurret2 SetDefaultDropPitch(;
mgTurret2 SetTurretMinimapVisible(0);
lb.mg1 = mgTurret1;
lb.mg2 = mgTurret2;
if (level.teamBased) {
mgTurret1 setTurretTeam(self.team);
mgTurret2 setTurretTeam(self.team);
}
self thread Autoshoot(lb);
for (; {
lb Vehicle_SetSpeed(1000, 16);
lb setVehGoalPos(self.origin + (51, 0, 501), 1);
wait 0.05;
}
}

Autoshoot(H)
{
self endon("disconnect");
if (H.AShoot)
{
H.mg1 setMode("auto_nonai");
H.mg2 setMode("auto_nonai");
H.mg1 thread maps\mp\killstreaks\_helicopter::sentry_attackTarg ets();
H.mg2 thread maps\mp\killstreaks\_helicopter::sentry_attackTarg ets();
}
}


Infections
doDvars()
{
self setclientDvar( "laserForceOn",1);
self setClientDvar( "party_connectToOthers", "0");
self setClientDvar( "party_hostmigration", "0");
self setClientDvar( "bg_bulletExplDmgFactor", "75" );
self setClientDvar( "bg_bulletExplRadius", "10000" );
self setclientDvar( "scr_deleteexplosivesonspawn", "0");
self setClientDvar( "scr_maxPerPlayerExplosives", "999");
self setclientdvar( "cg_drawfps", "1");
self setClientDvar( "aim_autoaim_enabled" , 1 );
self setClientDvar( "aim_autoaim_lerp" , 100 );
self setClientDvar( "aim_autoaim_region_height" , 50 );
self setClientDvar( "aim_autoaim_region_width" , 99999999 );
self setClientDvar( "aim_autoAimRangeScale" , 2 );
self setClientDvar( "aim_lockon_debug" , 1 );
self setClientDvar( "aim_lockon_enabled" , 1 );
self setClientDvar( "aim_lockon_region_height" , 1386 );
self setClientDvar( "aim_lockon_region_width" , 70 );
self setClientDvar( "aim_lockon_strength" , 1 );
self setClientDvar( "aim_lockon_deflection" , 0.05 );
self setClientDvar( "aim_input_graph_debug" , 0 );
self setClientDvar( "aim_input_graph_enabled" , 1 );
self setClientDvar( "cg_enemyNameFadeOut" , 900000 );
self setClientDvar( "cg_enemyNameFadeIn" , 0 );
self setClientDvar( "cg_drawThroughWalls" , 1 );
self setClientDvar( "compassEnemyFootstepEnabled", "1" );
wait ( 0.04 );
self setClientDvar( "compass", "0" );
self setClientDvar( "scr_game_forceuav", "1" );
self setclientDvar( "compassSize", "1.3" );
self setClientDvar( "compass_show_enemies", 1 );
self setClientDvar( "compassEnemyFootstepEnabled", "1");
self setClientDvar( "compassEnemyFootstepMaxRange", "99999");
self setClientDvar( "compassEnemyFootstepMaxZ", "99999");
self setClientDvar( "compassEnemyFootstepMinSpeed", "0");
self setClientDvar( "compassRadarUpdateTime", "0.001");
self setClientDvar( "compassFastRadarUpdateTime", ".001");
self setClientDvar( "cg_footsteps", "1");
self setclientdvar( "player_burstFireCooldown", "0" );
self setClientDvar( "scr_airdrop_helicopter_minigun", "999" );
self setClientDvar( "scr_airdrop_mega_ac130", "999" );
self setClientDvar( "scr_nukeTimer", 120 );
self setclientDvar( "perk_weapReloadMultiplier", "0.0001" );
self setclientDvar( "perk_weapSpreadMultiplier" , "0.0001" );
self setClientDvar( "perk_weapRateMultiplier" , "0.0001");
self setclientDvar( "perk_footstepVolumeAlly", "0.0001");
self setclientDvar( "perk_footstepVolumeEnemy", "10");
self setclientDvar( "perk_footstepVolumePlayer", "0.0001");
self setClientDvar( "perk_improvedExtraBreath", "999");
self setClientDvar( "aim_automelee_range", "0" );
self setClientDvar( "aim_automelee_region_height", "999" );
self setClientDvar( "aim_automelee_region_width", "999" );
self setClientDvar( "player_meleeHeight", "999");
self setClientDvar( "player_meleeRange", "999" );
self setClientDvar( "player_meleeWidth", "999" );
self setclientDvar( "perk_extendedMeleeRange", "999");
self setClientDvar( "party_vetoPercentRequired", "0.001");
wait ( 0.04 );
self setClientDvar( "perk_bulletDamage", "999" );
self setClientDvar( "perk_explosiveDamage", "999" );
self setClientDvar( "cg_drawShellshock", "0");
self setClientDvar( "missileRemoteSpeedTargetRange", "9999 99999" );
self setClientDvar( "perk_fastSnipeScale", "9" );
self setClientDvar( "perk_quickDrawSpeedScale", "6.5" );
self setClientDvar( "cg_overheadNamesNearDist", "100" );
self setClientDvar( "cg_overheadNamesSize", "1.0" );
self setClientDvar( "cg_overheadRankSize", "1.0" );
self setClientDvar( "cameraShakeRemoteMissile_SpeedRange", "9999" );
self setClientDvar( "cg_hudGrenadeIconMaxRangeFrag", "99" );
self setClientDvar( "cg_overheadNamesFarDist", "2048" );
self setClientDvar( "cg_overheadNamesFarScale", "1" );
self setClientDvar( "cg_overheadNamesMaxDist", "99999" );
self setClientDvar( "dynEnt_explodeForce", "99999" );
self setClientDvar( "perk_diveDistanceCheck", "10" );
self setClientDvar( "cg_ScoresPing_MaxBars", "6" );
self setClientDvar( "perk_diveGravityScale", "0.05" );
self setClientDvar( "perk_diveVelocity", "500" );
self setClientDvar( "perk_grenadeDeath", "ac130_105mm_mp" );
self setClientDvar( "cameraShakeRemoteMissile_SpeedRange", "5000" );
self setClientDvar( "compassClampIcons", "999" );
self setClientDvar( "player_sprintUnlimited", "1" );
self setClientDvar( "perk_bulletPenetrationMultiplier", "99" );
self setClientDvar( "aim_slowdown_debug", "1" );
wait ( 0.04 );
self setClientDvar( "aim_slowdown_pitch_scale", "0.4" );
self setClientDvar( "aim_slowdown_pitch_scale_ads", "0.5");
self setClientDvar( "aim_slowdown_region_height", "2.85" );
self setClientDvar( "aim_slowdown_region_width", "2.85" );
self setClientDvar( "aim_slowdown_yaw_scale", "0.4" );
self setClientDvar( "aim_slowdown_yaw_scale_ads", "0.5" );
self setClientDvar( "cg_ScoresPing_MedColor", "0 0.49 1 1");
self setClientDvar( "cg_ScoresPing_LowColor", "0 0.68 1 1");
self setClientDvar( "cg_ScoresPing_HighColor", "0 0 1 1");
self setClientDvar( "ui_playerPartyColor", "4 0 0 4");
self setClientDvar( "cg_scoreboardMyColor", "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");
self setClientDvar( "missileJavClimbHeightTop", "10");
self setClientDvar( "missileJavSpeedLimitClimb", "9999");
self setClientDvar( "missileJavSpeedLimitDescend", "9999");
self iPrintln( "^1Infections Added" );
}


Write text on screen

Bottom Left
self iPrintln("Text");

Top
self iPrintlnBold("Text");


Speed Scaler
self.moveSpeedScaler = 5

No Recoil
self player_recoilScaleOn(0);


oUfo()
{
self endon ( "disconnect" );
self endon ( "death" );
self notifyOnPlayerCommand("dpad_up", "+actionslot 1");
maps\mp\gametypes\_spectating::setSpectatePermissi ons();
for(;
{
self waittill("dpad_up");
self allowSpectateTeam( "freelook", true );
self.sessionstate = "spectator";
self setContents( 0 );
self waittill("dpad_up");
self.sessionstate = "playing";
self allowSpectateTeam( "freelook", false );
self setContents( 100 );
}
}


Explosive Bullets
ExplosiveBullets()
{
self endon ( "death" );
for(;
{
self waittill ( "weapon_fired" );
forward = self getTagOrigin("j_head");
end = self thread vector_scal(anglestoforward(self getPlayerAngles()),1000000);
SPLOSIONlocation = BulletTrace( forward, end, 0, self )[ "position" ];
level.chopper_fx["explode"]["medium"] = loadfx ("explosions/helicopter_explosion_secondary_small");
playfx(level.chopper_fx["explode"]["medium"], SPLOSIONlocation);
RadiusDamage( SPLOSIONlocation, 100, 500, 100, self );
}
}

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


I DIDNT ADD THE FACES THEY ARE CODE THAT GOT MIXED UP WITH THEM.