Post: [Tutorial] Modifying weapon damage PC
08-15-2010, 02:59 AM #1
(adsbygoogle = window.adsbygoogle || []).push({}); Some people were asking about this so I took the time to make it after I found out thanks to Neekoken.



Alright, you see this thread in _damage.gsc called
    Callback_PlayerDamage_internal( eInflictor, eAttacker, victim, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, psOffsetTime )


    iDamage = how much damage is dealt
sWeapon = which weapon was used to cause damage
sHitLoc = where the bullet hit the player


Okay, now Neekoken has made a new thread and gsc for it because his one is a bit more complicated (like setting damage to 5 in the feet, 300 on upper body)
I'm going to show you how to do it the easy way, the rest you can figure out yourself when you get better.


Changing the damage in the _damage.gsc


Search for the thread name i mentioned above
    Callback_PlayerDamage_internal( eInflictor, eAttacker, victim, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, psOffsetTime )
{

[color=green]We are going to put shit in here[/color]

if ( !isReallyAlive( victim ) )
return;

if ( isDefined( eAttacker ) && eAttacker.classname == "script_origin" && isDefined( eAttacker.type ) && eAttacker.type == "soft_landing" )
return;


From now on if I type in green, that's where it would be placed.



1. Making it the same damage for all weapons
    [color=green]iDamage = 100; // Any number[/color]


2. Setting damage for one weapon, no matter where it hits
    [color=green]if(sWeapon == "weaponname_mp") // use if(isSubStr(sWeapon, "cheytac_")) if you want the weapon to do the damage no matter which attachments
iDamage = 100;[/color]


3. Setting damage for one hit location
    [color=green]if(sHitLoc == "head") // Full list of tags below
iDamage = 100;[/color]


4. Setting damage for multiple weapons/hit locations
    [color=green]switch(sWeapon)
{
case "cheytac_mp":
case "rpg_mp":
iDamage = 900;
break; // I am not sure if you have to put this in, but do so for safety
case "coltanaconda_mp":
iDamage = 85;
break;
case "etc_mp":
iDamage = 0;
break;
}

switch(sHitLoc)
{
case "head":
case "neck":
case "helmet":
iDamage = 100;
break;
case "left_hand":
case "right_hand":
self DropItem(self getCurrentWeapon());
break;
}[/color]


5. Multiplying/adding damage
    [color=green]
iDamage += 20; // Damage + 20
iDamage * 0.5; // Half damage
iDamage * 2; // Double damage
if(iDamage >= 20) iDamage -= 20; // Damage - 20 but only if damage isnt below 20 so it wouldnt heal the opponent
iDamage * -1; // Not sure, but would heal the enemy in theory[/color]


6. Setting damage for an attachment or a weapon with any attachment
    [color=green]if(isSubStr(sWeapon, "_silencer_"))
iDamage = 100;[/color]

    [color=green]if(isSubStr(sWeapon, "usp_"))
iDamage = 100;[/color]





ALSO THOMK IF U WANT TO ADD THIS TO YOUR THREAD WELL DONT DO IT OR -rep

CREDS GO TO AZUMIKKEL
(adsbygoogle = window.adsbygoogle || []).push({});

The following 2 users say thank you to kane212 for this useful post:

ibombo, remi06
08-15-2010, 03:03 AM #2
rnbrawkstar
Can’t trickshot me!
i gotta get this game for pc..you can do anything you want..lmao
08-15-2010, 03:47 AM #3
LOL, my PC would never run MW2!
08-16-2010, 02:53 PM #4
All I need is graphic card
08-16-2010, 09:23 PM #5
If you want to help me test some of my mods you can add me on steam if you would like. I always need testers.
08-16-2010, 10:08 PM #6
For the PC version are all the GSC files just saved unencrypted in the Mw2 folder in program files?

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo