Raised This Month: $ Target: $400
 0% 

how to make 100% team damage


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
0920357689
Senior Member
Join Date: Apr 2008
Old 06-25-2010 , 08:00   how to make 100% team damage
Reply With Quote #1

how to make 100% team damage
just like ct attack tc 100%damage
0920357689 is offline
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 06-25-2010 , 08:08   Re: how to make 100% team damage
Reply With Quote #2

Hook Ham_TakeDamage, check if player teams are equal, then multiply the damage 3x with SetHamParamFloat.
Backstabnoob is offline
0920357689
Senior Member
Join Date: Apr 2008
Old 06-25-2010 , 08:17   Re: how to make 100% team damage
Reply With Quote #3

oh..thx
0920357689 is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 06-25-2010 , 08:40   Re: how to make 100% team damage
Reply With Quote #4

Try this :

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

#define VERSION "0.0.3"

#define MAX_PLAYERS    32

#define TEAM_T        1
#define TEAM_CT    2

#define XO_PLAYER    5
#define m_iTeam    114

#define cs_get_user_team_index(%1)        get_pdata_int(%1, m_iTeam, XO_PLAYER)
#define cs_set_user_team_index(%1,%2)    set_pdata_int(%1, m_iTeam, %2, XO_PLAYER)

#define IsPlayer(%1)    ( 1 <= %1 <= g_iMaxPlayers )

new g_iMaxPlayers
new g_iVictimTeam
new HamHook:g_iHhTakeDamagePost

public plugin_init()
{
    
register_plugin("Real FriendlyFire"VERSION"ConnorMcLeod")

    
RegisterHam(Ham_TakeDamage"player""Player_TakeDamage_Pre")
    
g_iHhTakeDamagePost RegisterHam(Ham_TakeDamage"player""Player_TakeDamage_Post"1)
    
DisableHamForwardg_iHhTakeDamagePost )

    
g_iMaxPlayers get_maxplayers()
}

public 
Player_TakeDamage_Pre(iVictimiInflictoriAttacker)
{
    if( 
IsPlayeriAttacker ) && iVictim != iAttacker )
    {
        
g_iVictimTeam cs_get_user_team_index(iVictim)
        if( 
g_iVictimTeam == cs_get_user_team_index(iAttacker) )
        {
            
cs_set_user_team_index(iVictimg_iVictimTeam == TEAM_T TEAM_CT TEAM_T)
            
EnableHamForwardg_iHhTakeDamagePost )
            return 
HAM_HANDLED
        
}
    }
    return 
HAM_IGNORED
}

public 
Player_TakeDamage_Post(iVictim)
{
    
cs_set_user_team_index(iVictimg_iVictimTeam)
    
DisableHamForwardg_iHhTakeDamagePost )

__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 06-25-2010 at 08:51.
ConnorMcLeod 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 14:42.


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