Raised This Month: $51 Target: $400
 12% 

Block dmg from he nade


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
rapara13
Member
Join Date: Jun 2008
Location: Local Disk (X:)
Old 04-23-2010 , 15:22   Block dmg from he nade
Reply With Quote #1

How to block dmg from he nade only for attacker

sorry for my bad english!
__________________
rapara13 is offline
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 04-23-2010 , 15:27   Re: Block dmg from he nade
Reply With Quote #2

Search.
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 04-23-2010 , 20:52   Re: Block dmg from he nade
Reply With Quote #3

I just did a quick search myself and didn't come across this exact request.

This will block a player from taking damage from his own grenades.
PHP Code:
#include <amxmodx>
#include <hamsandwich>

#define DMG_GRENADE    ( 1 << 24 )

public plugin_init() 
{
    
register_plugin"No Self Grenade Damage" "0.1" "bugsy" );
    
    
RegisterHamHam_TakeDamage "player" "fw_HamTakeDamage" );
}

public 
fw_HamTakeDamageiVictim iInflictor iAttacker Float:fDamage iDmgBits )
{
    return ( ( 
iDmgBits DMG_GRENADE ) && ( iVictim == iAttacker ) ) ? HAM_SUPERCEDE HAM_IGNORED;

Here's a plugin that will allow players to take damage from their own grenades but will not allow suicide from grenades.
http://forums.alliedmods.net/showpos...83&postcount=4
__________________
Bugsy is offline
Reply



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:11.


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