Raised This Month: $ Target: $400
 0% 

friendlynade help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 06-19-2014 , 20:11   Re: friendlynade help
Reply With Quote #1

If I got it right, you don't want to make a grenade damage on teammates? Or in other words - when you hit some teammate with HE grenade, he won't get any damage. Here is something like this.
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <hamsandwich>

#define PLUGIN "Friendly Nade No Damage"
#define VERSION "1.0"
#define AUTHOR "Flicker"

#define DMG_NADE (1<<24)

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
RegisterHam(Ham_TakeDamage"player""Damage")
}

public 
Damage(victiminflictorattackerFloat:damagedmgbits
{
    if(
is_user_connected(attacker
    && 
get_user_team(attacker) == get_user_team(victim
    && (
dmgbits DMG_NADE))
        
SetHamParamFloat(40.0)
        
//or
        //return HAM_SUPERCEDE
        
    
return HAM_IGNORED

__________________
Flick3rR is offline
Send a message via Skype™ to Flick3rR
Administrator
Member
Join Date: Jun 2014
Old 06-20-2014 , 04:00   Re: friendlynade help
Reply With Quote #2

I need to hurt his grenade
Administrator is offline
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 06-20-2014 , 07:35   Re: friendlynade help
Reply With Quote #3

Uhm... You men that your friendlyfire is disabled but you want only nades to make damage on teammates? But I don't know if it's possible.
Try this:
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <hamsandwich>

#define PLUGIN "Friendly Nade No Damage"
#define VERSION "1.0"
#define AUTHOR "Flicker"

#define DMG_NADE (1<<24)

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
RegisterHam(Ham_TakeDamage"player""Damage")
}

public 
Damage(victiminflictorattackerFloat:damagedmgbits
{
    if(
is_user_connected(attacker
    && 
get_user_team(attacker) == get_user_team(victim
    && (
dmgbits DMG_NADE))
        
SetHamParamFloat(4damage)
        
    return 
HAM_IGNORED

__________________

Last edited by Flick3rR; 06-20-2014 at 07:35.
Flick3rR is offline
Send a message via Skype™ to Flick3rR
Administrator
Member
Join Date: Jun 2014
Old 06-21-2014 , 13:33   Re: friendlynade help
Reply With Quote #4

oh no, not work
Administrator is offline
Old 06-22-2014, 02:04
Administrator
This message has been deleted by YamiKaitou. Reason: wait 14 days before you bump
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 21:17.


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