Raised This Month: $ Target: $400
 0% 

DMG_ALWAYSGIB friendly fire


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SyluxLockjaw100
Senior Member
Join Date: Jul 2010
Location: Novaya Russia
Old 11-24-2011 , 23:42   DMG_ALWAYSGIB friendly fire
Reply With Quote #1

Ok,I have a plugin that turns HE grenades to grenade launchers,and I set DMG_ALWAYSGIB for the grenade launcher,but you can team kill regardless of mp_friendlyfire - DMG_ALWAYSGIB is causing this so how can I prevent it?

Code:
public fw_TakeDamage(victim, inflictor, attacker, Float:damage)
{
    if ( is_valid_player( attacker ) && get_user_weapon(attacker) == CSW_HEGRENADE && g_HaveGL[attacker] )
    {
        SetHamParamFloat(4, damage * get_pcvar_float( cvar_dmgmultiplier ) )
        SetHamParamInteger(5, DMG_ALWAYSGIB) // this damage type is causing friendly fire even if you turn off friendly fire!
    }
}
SyluxLockjaw100 is offline
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 11-25-2011 , 00:13   Re: DMG_ALWAYSGIB friendly fire
Reply With Quote #2

Check if mp_friendlyfire is 1 and the victim and the attacker are on the same team and then choose one of the following:
  • Set the damage to 0
  • Don't set DMG_ALWAYSGIB
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:23.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode