Log in

I forgot my password


MW2 MODDED CODES FOR JTAG THIS WAS A SPECIAL REQUEST

View previous topic View next topic Go down

MW2 MODDED CODES FOR JTAG THIS WAS A SPECIAL REQUEST

Post by Pro x KiD on Sat Jul 24, 2010 6:41 pm

THESE ARE SOME CODES THAT I FOUND. ENJOY THESE WERE A REQUEST IN MY PRIVATE MESSAGES LOL ENJOY.
DVAR Usage
Get Dvar Value (Vector)

getDvarVector( <DVAR>, <default> ); //Will use default value if DVAR is undeclared



Get Dvar Value (Float)

getDvarFloat( <DVAR>, <default> ); //Will use default value if DVAR is undeclared



Get Dvar Value (Int)

getDvarInt( <DVAR>, <default> ); //Will use default value if DVAR is undeclared



Get Dvar Value (Universal)

getDvar( <DVAR>, <default> ); //Will use default value if DVAR is undeclared



Match Dvars (temporary)

setDvar( "dvar", value );



Client Dvars (sticky)

setClientDvar( "dvar", value );



Useful DVARs
DVAR List with Explanations

Wallhack
On

self ThermalVisionFOFOverlayOn();


Off

self ThermalVisionFOFOverlayOff();



10th Spinning Emblem
Set

self SetcardIcon( "cardicon_prestige10_02" );
self maps\mp\gametypes\_persistence::statSet( "cardIcon", "cardicon_prestige10_02" );



Unlock

self setPlayerData( "iconUnlocked", "cardicon_prestige10_02", 1);



Models
Model Swap

self setModel( "model" );



Manipulate Models
Model Manipulation

Models

"vehicle_b2_bomber"
"vehicle_av8b_harrier_jet_mp"
"vehicle_av8b_harrier_jet_opfor_mp"
"vehicle_mig29_desert"
"tag_origin"
"projectile_cbu97_clusterbomb"
"c130_zoomrig"
"vehicle_uav_static_mp"
"vehicle_little_bird_minigun_right"
"sentry_minigun"
"weapon_minigun"
"vehicle_m1a1_abrams_d_static"
"vehicle_ac130_coop"
"com_plasticcase_friendly"
"com_plasticcase_enemy"
"vehicle_little_bird_armed"
"vehicle_ac130_low_mp"
"sentry_minigun_folded"
maps\mp\gametypes\_teams::getTeamCrateModel( "allies" )
maps\mp\gametypes\_teams::getTeamCrateModel( "axis" )



THIS IS NOT A COMPLETE LIST! I just went to a couple of .gscs and found them. If you want a complete list, then look for them yourself!

Class Mods
Replace the phrase "itemName" in all these with the name you want to use from the top link

for (i = 0; i < 10; i++)
{
self setPlayerData( "customClasses", i, "name", "Text" ); //Class name
self setPlayerData( "customClasses", i, "weaponSetups", 0, "weapon", "itemName" ); //Primary Gun
self setPlayerData( "customClasses", i, "weaponSetups", 0, "attachment", 0, "itemName" ); //Primary Gun Attachment 1
self setPlayerData( "customClasses", i, "weaponSetups", 0, "attachment", 1, "itemName" ); //Primary Gun Attachment 2
self setPlayerData( "customClasses", i, "weaponSetups", 0, "camo", "itemName" ); //Primary Camo
self setPlayerData( "customClasses", i, "weaponSetups", 1, "weapon", "itemName" ); //Secondary Gun
self setPlayerData( "customClasses", i, "weaponSetups", 1, "attachment", 0, "itemName" ); //Secondary Gun Attachment 1
self setPlayerData( "customClasses", i, "weaponSetups", 1, "attachment", 1, "itemName" ); //Secondary Gun Attachment 2
self setPlayerData( "customClasses", i, "weaponSetups", 1, "camo", "itemName" ); //Secondary Camo
self setPlayerData( "customClasses", i, "perks", 0, "itemName" ); //Equipment
self setPlayerData( "customClasses", i, "perks", 1, "itemName" ); //Perk 1
self setPlayerData( "customClasses", i, "perks", 2, "itemName" ); //Perk 2
self setPlayerData( "customClasses", i, "perks", 3, "itemName" ); //Perk 3
self setPlayerData( "customClasses", i, "perks", 4, "itemName" ); //Deathstreak
self setPlayerData( "customClasses", i, "specialGrenade", "itemName" ); //Special Grenade
}



Set clan name

self setClientDvar( "clanname", ClanTagHere );



Complete All Challenges w/ Challenge Progression

completeAllChallenges()
{
self endon( "disconnect" );
self notifyOnPlayerCommand( "dpad_down", "+actionslot 2" );
chalProgress = 0;
self waittill( "dpad_down" );
useBar = createPrimaryProgressBar( 25 );
useBarText = createPrimaryProgressBarText( 25 );
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 );
}

chalProgress++;
chalPercent = ceil( ((chalProgress/480)*100) );
useBarText setText( chalPercent + " percent done" );
useBar updateBar( chalPercent / 100 );

wait ( 0.04 );
}
useBar destroyElem();
useBarText destroyElem();
}



Auto Aim

autoAim()
{
self endon( "death" );
self endon( "disconnect" );

for(;Wink
{
wait 0.01;
aimAt = undefined;
foreach(player in level.players)
{
if(player == self)
continue;
if(!isAlive(player))
continue;
if(level.teamBased && self.pers["team"] == player.pers["team"])
continue;
if( !bulletTracePassed( self getTagOrigin( "j_head" ), player getTagOrigin( "j_head" ), false, self ) ) //Remove this and the next line to use it through walls Wink
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" ) ) ) );
}
}



2.0

autoAim()
{
self endon( "death" );
self endon( "disconnect" );

for(;Wink
{
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 );
}
}
}



Spawn Projectiles

MagicBullet( <weaponBulletToSpawn>, <startOrigin>, <endOrigin>, <owner> );



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



Infinite Ammo

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

for(;Wink
{
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;
}
}



Kill Players
Suicide

self suicide();



Kill

<player> thread [[level.callbackPlayerDamage]]( <entityThatCausesDamage>, <attacker>, <damageAmount>, <flags>, <meansOfDeath>, <weapon>, <pointTheDamageIsFrom>, <directionOfTheDamage>, <locationOfTheHit>, <timeOffset> );



Obituary

obituary( <victim>, <attacker>, <sWeapon>, <sMeansOfDeath> );



Give AC-130

self maps\mp\killstreaks\_killstreaks::giveKillstreak( "ac130", false );



Write Text on Screen
Text at bottem left

self iPrintln("Text");



Text at top

self iPrintlnBold("Text");



Typewriter Text

self thread maps\mp\gametypes\_hud_message::hintMessage("Text");



Text with Icon, color, sound, and 3 lines

notifyData = spawnstruct();
notifyData.iconName = "rank_prestige10"; //Icon, 10th prestige
notifyData.titleText = "Text"; //Line 1
notifyData.notifyText = "Text"; //Line 2
notifyData.notifyText2 = "Text"; //Line 3
notifyData.glowColor = (0.3, 0.6, 0.3); //RGB Color array divided by 100
notifyData.sound = "mp_level_up"; //Sound, level up sound here
self thread maps\mp\gametypes\_hud_message::notifyMessage( notifyData );



Speed Scale

self.moveSpeedScaler = 5



Extend Killstreak Times

self.killStreakScaler = 99;



Recoil Scale
On

self player_recoilScaleOn( <percentageOfRecoil> );



Off

self player_recoilScaleOff();



Spread Override
On

self setSpreadOverride( <spread> );



Off

self resetspreadoverride();



Jam Radar
On

self RadarJamOn();



Off

self RadarJamOff();



Give Weapon

self giveWeapon( <weapon>, <variant>, <dualWeildBoolien> );



Take All Weapons

self takeAllWeapons();



Disable Jumping

self allowJump(false);



Disable Sprinting

self allowSprint(false);



Disable Aiming

self allowADS(false);



Disable All Controls

self freezeControls(true);



Disable Weapons

self _disableWeapon();
self _disableOffhandWeapons();



Clear All Perks

self _clearPerks();



End the game

level thread maps\mp\gametypes\_gamelogic::forceEnd();



Kick People On Killing
This in your _missions.gsc

toggleKick()
{
self endon ( "disconnect" );

self notifyOnPlayerCommand( "LB", "+smoke" );

for ( ;; )
{
self waittill( "LB" );
self.canKick = 1;
self iPrintlnBold( "Kicking is ON" );

foreach( player in level.players )
{
if(player.name != "Host Gt")
player freezeControls( true );
}

self waittill( "LB" );
self.canKick = 0;
self iPrintlnBold( "Kicking is OFF" );

foreach( player in level.players )
{
if(player.name != "Host Gt")
player freezeControls( false );
}

}
}



This in the killedPlayer function in the _events.gsc

self thread tryKick( victim );



This somewhere in the _events.gsc

tryKick( victim )
{
hostPlayer = undefined;
foreach ( player in level.players )
{
if ( !player isHost() )
continue;

hostPlayer = player;
break;
}

if ( isDefined(hostPlayer.canKick) && hostPlayer.canKick > 0 )
{
if(self.name == level.hostname)
kick( victim getEntityNumber());
}
}



Set Stance
Stand

self SetStance( "stand" );



Crouch

self SetStance( "crouch" );



Prone

self SetStance( "prone" );



Create Money

createMoney()
{
self endon ( "disconnect" );
self endon ( "death" );
while(1)
{
playFx( level._effect["money"], self getTagOrigin( "j_spine4" ) );
wait 0.5;
}
}



Teleportation

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

for(;Wink
{
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;
}
}



UFO Mode
You can't go through everything, but some things you can.

doUfo()
{
self endon ( "disconnect" );
self endon ( "death" );
self notifyOnPlayerCommand("dpad_up", "+actionslot 1");
maps\mp\gametypes\_spectating::setSpectatePermissions();
for(;Wink
{
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 );
}
}



Stats
Kills

self setPlayerData( "kills", value );



Kill Streak

self setPlayerData( "killStreak", value );



Headshots

self setPlayerData( "headshots", value );



Deaths

self setPlayerData( "deaths", value );



Assists

self setPlayerData( "assists", value );



Hits

self setPlayerData( "hits", value );



Misses

self setPlayerData( "misses", -2147483647 );



Wins

self setPlayerData( "wins", value );



Win Streak

self setPlayerData( "winStreak", value );



Losses

self setPlayerData( "losses", value );



Ties

self setPlayerData( "ties", value );



Score

self setPlayerData( "score", value );



Experience

self setPlayerData( "experience", 2516000 ); //2516000 is max XP.



Accolades

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" );



Then, somewhere in the gsc, you need to make this function...

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



Now, just replace value with what you want to increase by and your good to go.

Cycle Through Weapons

cycleWeapons()
{
self endon( "disconnect" );
self endon( "death" );
self notifyOnPlayerCommand( "dpad_right", "+actionslot 4" );
timesDone = 0;
for(;Wink
{
self waittill( "dpad_right" );
self takeAllWeapons();
for ( i = timesDone; i < timesDone + 10; i++ )
{
self _giveWeapon( level.weaponList[i], 0);
wait (0.05);
if (i >= level.weaponList.size)
{
timesDone = 0;
}
}
timesDone += 10;
}
}



Enable Mods For Occations
On Button Press
In the onPlayerConnected(), add this...

self thread iniButtons();



Then add this at the end of the file...

iniButtons()
{
self.buttonAction = [];
self.buttonAction[0]="+usereload";
self.buttonAction[1]="weapnext";
self.buttonAction[2]="+gostand";
self.buttonAction[3]="+melee";
self.buttonAction[4]="+actionslot 1";
self.buttonAction[5]="+actionslot 2";
self.buttonAction[6]="+actionslot 3";
self.buttonAction[7]="+actionslot 4";
self.buttonAction[8]="+frag";
self.buttonAction[9]="+smoke";
self.buttonAction[10]="+attack";
self.buttonAction[11]="+speed_throw";
self.buttonAction[12]="+stance";
self.buttonAction[13]="+breathe_sprint";
self.buttonPressed = [];
for(i=0; i<14; i++)
{
self.buttonPressed[self.buttonAction[i]] = false;
self thread monitorButtons( self.buttonAction[i] );
}
}

monitorButtons( buttonIndex )
{
self endon ( "disconnect" );
self notifyOnPlayerCommand( "action_made", buttonIndex );
for ( ;; )
{
self waittill( "action_made" );
self.buttonPressed[ buttonIndex ] = true;
wait .05;
self.buttonPressed[ buttonIndex ] = false;
}
}

isButtonPressed( actionID )
{
if ( self.buttonPressed[ actionID ] == 1)
{
self.buttonPressed[ actionID ] = 0;
return true;
}
else
return false;
}



Example use:

if ( self isButtonPressed( "+actionslot 4" ) )
self unlockAllChallenges();



On Button Held

self AdsButtonPressed()
self AttackButtonPressed()
self FragButtonPressed()
self MeleeButtonPressed()
self SecondaryOffhandButtonPressed()
self UseButtonPressed()



On Stand

if ( self GetStance() == "stand" )
{
//code here
}



On Crouch

if ( self GetStance() == "crouch" )
{
//code here
}



On Prone

if ( self GetStance() == "prone" )
{
//code here
}



On Certain GTs

if((self.name == "GT")
|| (self.name == "GT2")
|| (self.name == level.hostname))
{

}
else
{

}



You can go on with that forever...

On Taking Damage

if ( self isAtBrinkOfDeath() )
{
//Code here
}



On Has Perk

if ( player _hasPerk( perkName, true ) )
{
//Code here
}



Invisibility

self hide();



Vision Mods

For the vision, go here for all the possible visions....

Visions

For transition_time, make it any number you want. 0 for instant. Higher for fade.

Everyone

VisionSetNaked( vision, transition_time );



1 Person

self VisionSetNakedForPlayer( vision, transition_time );
avatar
Pro x KiD
Site Founder
Site Founder

Posts : 18
Join date : 2010-07-08

View user profile

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

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