Raised This Month: $ Target: $400
 0% 

Ham Take Damage help


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 09-28-2009 , 02:22   Ham Take Damage help
Reply With Quote #1

So what the code below does is for humans only removes friendly fire completly

how ever bots still remain getting damaged by friendly fire any ideas?


PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <hamsandwich>

#define PLUGIN    "Variable Friendly Fire"
#define AUTHOR    "David"
#define VERSION    "1.0"

new dmg_reduce;

public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
dmg_reduce register_cvar("dmg_var""0.0")
    
    
RegisterHamHam_TakeDamage "player" "PlayerHurt"0);
}

public 
PlayerHurtvictim,inflictor,attacker,Float:damageDamageBits )
{
    if(
is_user_alive(victim) && is_user_alive(attacker) && cs_get_user_team(victim""0) == cs_get_user_team(attacker""0))
    {
        
SetHamParamFloat(4damage get_pcvar_float(dmg_reduce));
    }
    return 
HAM_IGNORED

Doc-Holiday is offline
 



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 22:37.


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