Page 2 of 2 FirstFirst 12
Results 16 to 19 of 19
  1. #16
    iGhost's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    56
    Reputation
    12
    Thanks
    35
    I think im very close, but since I am trying to change the damage for multiple guns I can't just replace "cheytac_" with "fal_".
    and when I try loading the game, I get an error.

  2. #17
    AZUMIKKEL's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    My moms house... what's so funny about that?
    Posts
    790
    Reputation
    19
    Thanks
    462
    My Mood
    Sneaky
    Quote Originally Posted by PP_CrazyApple View Post
    why would you wanna use codes? type this in console with stoppin power on "perk_bulletdamage 999" ....
    I am not surprised this came from the same guy posting false statements about me stealing mods. Get your shit right.

    Alright, you see this thread 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)

    Now for 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;
    }
    At least thats what I figured out by looking at Neekoken's code, which you guys weren't able to.

    Edit:

    5. Multiplying/adding damage
    Code:
    
    iDamage += 20; // Damage + 20
    iDamage *= 0.5; // Half damage (not sure if * works)
    iDamage *= 2; // Double damage (same)
    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
    Last edited by AZUMIKKEL; 08-01-2010 at 12:00 PM.

  3. The Following 2 Users Say Thank You to AZUMIKKEL For This Useful Post:

    iGhost (08-01-2010),n3rox (10-24-2011)

  4. #18
    iGhost's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    56
    Reputation
    12
    Thanks
    35
    Wow, amazing job AZUMIKKEL, unfortunately I had already figured out n alternatvie way to edit the damage last night before I got off.

  5. #19
    soccerguy's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Posts
    171
    Reputation
    10
    Thanks
    73
    What if you want to change the damage for an attachment? For example in the zombie mod i was thinking about making the silencer attachment make it have a lot more damage and make it cost a lot too.
    My Favorite Conversation Word For Word
    "Hey Geek Your So Retarded And Uncool!"
    "You May Think So Now But When I'm Making A Million Dollars A Year Doing This We'll See Who Actually Is Retarded"

    GO GEEKS!

Page 2 of 2 FirstFirst 12