Raised This Month: $32 Target: $400
 8% 

Solved [Req] Teammates kill


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mr.EwY
Junior Member
Join Date: Apr 2018
Location: In your mind
Old 04-08-2018 , 14:09   [Req] Teammates kill
Reply With Quote #1

Hello guys , i nedd a plugin who give +1 frag for who kill his teammates
Can any one made this plugin for me ?
Note : This plugin is useful for jailbreak mods.

Last edited by Mr.EwY; 04-08-2018 at 17:54. Reason: Solved
Mr.EwY is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 04-08-2018 , 16:37   Re: [Req] Teammates kill
Reply With Quote #2

Try

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

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_event("DeathMsg""event_DeathMsg""a")
}

public 
event_DeathMsg()
{
    new 
iKiller read_data(1), iVictim read_data(2)
    if(
get_user_team(iKiller) == get_user_team(iVictim) && iKiller != iVictim)
    {
        
ExecuteHam(Ham_AddPointsiKiller2true)
    }

__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 04-08-2018 , 17:37   Re: [Req] Teammates kill
Reply With Quote #3

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

new g_iFriendlyFire ;

public 
plugin_init( ) {

    
register_plugin"FF Points""1.0""DoNii" ) ;

    
register_event"HLTV""OnNewRound""a""1=0""2=0" ) ;
    
    
RegisterHamHam_Killed"player""fw_HamKilledPost") ;
    
RegisterHamHam_TakeDamage"player""fw_HamTakeDamagePre") ;

    
g_iFriendlyFire get_cvar_pointer"mp_friendlyfire" ) ;    
}

public 
fw_HamKilledPostiVictimiAttackeriShouldGib ) {

    if( ! 
is_user_aliveiAttacker ) )
    return 
HAM_IGNORED ;

    if( 
get_user_teamiVictim ) == get_user_teamiAttacker ) ) {

        
ExecuteHamBHam_AddPointsiAttacker2true ) ;
        return 
HAM_SUPERCEDE ;
    }

    return 
HAM_IGNORED ;
}

public 
fw_HamTakeDamagePreiVictimiInflictoriAttackerFloat:fDamageiDamageBits ) {

    if( ! ( 
is_user_connectediVictim ) || is_user_connectediAttacker ) ) )
    return 
HAM_IGNORED ;

    if( 
get_user_teamiVictim ) == get_user_teamiAttacker ) ) {
        
        
SetHamParamFloat4fDamage *= 2.86 ) ;
    }
    
    return 
HAM_IGNORED ;
}

public 
OnNewRound( ) {

    if( 
get_pcvar_numg_iFriendlyFire ) == )
    
set_pcvar_numg_iFriendlyFire) ;
    
    return 
PLUGIN_CONTINUE ;

__________________
edon1337 is offline
Mr.EwY
Junior Member
Join Date: Apr 2018
Location: In your mind
Old 04-08-2018 , 17:53   Re: [Req] Teammates kill
Reply With Quote #4

Working perfect !
Thank guys for support <3 !
Mr.EwY is offline
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 05:42.


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