Post: [CODE] modify weapon damage
02-07-2011, 04:42 AM #1
(adsbygoogle = window.adsbygoogle || []).push({}); Ok since my friend coder that was a cool as dude has basically came back 2 life
He said he will be flooding me with codes & scripts so get ready.

A better modify weapon damage

Alright, you see this thread in _damage.gsc

Code:
Callback_PlayerDamage_internal( eInflictor, eAttacker, victim, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, psOffsetTime )

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


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
Code:
Callback_PlayerDamage_internal( eInflictor, eAttacker, victim, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, psOffsetTime )
Code:
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
Code:
Callback_PlayerDamage_internal( eInflictor, eAttacker, victim, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, psOffsetTime )
{

We are going to put shit in here

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
Code:
iDamage = 100; // Any number
2. Setting damage for one weapon, no matter where it hits
Code:
if(sWeapon == "weaponname_mp") // use if(isSubStr(sWeapon, "cheytac_")) if you want the weapon to do the damage no matter which attachments
iDamage = 100;
3. Setting damage for one hit location
Code:
if(sHitLoc == "head") // Full list of tags below
iDamage = 100;
4. Setting damage for multiple weapons/hit locations
Code:
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;
}
5. Multiplying/adding damage
Code:

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
6. Setting damage for an attachment or a weapon with any attachment
Code:
if(isSubStr(sWeapon, "_silencer_"))
iDamage = 100;
Code:
if(isSubStr(sWeapon, "usp_"))
iDamage = 100;

Ok I told him 2 sign up on here but he said no so I'll just update u guys

Don't flame me credit's my unknow friend goddmonsta90I

---------- Post added at 11:42 PM ---------- Previous post was at 11:41 PM ----------

My friend is beast his age unknow his hacking skills very good!
(adsbygoogle = window.adsbygoogle || []).push({});
02-07-2011, 04:45 AM #2
Blackstorm
Veni. Vidi. Vici.
This was already in MW2 ORIGINAL Patches.. Pretty pointless tbh.. Your friend didn't code this
02-07-2011, 04:52 AM #3
Srry I ment 2 put more detailed
02-07-2011, 07:00 AM #4
Originally posted by SALOOTME View Post
Srry I ment 2 put more detailed

are you ill or mentally retarded? Do you need us to get you some help ?
Stop spamming this section with your copy and paste bullshit. It's getting annoying....

The following 4 users say thank you to x_DaftVader_x for this useful post:

cjmurder123, Dreamcather, Kameo, Skyl1n3
02-07-2011, 08:22 AM #5
ViiZiiKz
old name was EpiCz-SniiPz
OMG This is AMAZING!! LOL jk STFU and GTFO :carling:
02-07-2011, 12:44 PM #6
...are you ****ing serious?

This is AZUMIKKELS thread from MPGH.

Please stop copypasting and GTFO.
02-07-2011, 02:49 PM #7
Dreamcather
Call me Eddie Winky Winky
Use
     Next Time /facepalm
You are not cool. I think your friend are bad coder.
02-07-2011, 04:06 PM #8
Originally posted by Playstation3lb View Post
Use
     Next Time /facepalm
You are not cool. I think your friend are bad coder.[/quote]

Lol, it's AZUMIKKELS code and he's from mpgh. AZUMIKKEL is a really good coder..

And seriously, stop leeching all the codes of MPGH and putting them onto NGU.
02-07-2011, 04:31 PM #9
Default Avatar
Gizmo
Guest
You must login or register to view this content.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo