Raised This Month: $ Target: $400
 0% 

FreindlyFire


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 02-06-2013 , 17:18   Re: FreindlyFire
Reply With Quote #5

Quote:
Originally Posted by simanovich View Post
Turn on FF and then block Ham_TakeDamage hook (before that check if the player is a terrorist and he is attacking a terrorist, if it's true, then don't block and if not, block)

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

new bool:CanAttackFriends[33];

public 
plugin_init(){
    
RegisterHam(Ham_TakeDamage,"player","fw_HamTakeDamage");
}

public 
fw_HamTakeDamage(victiminflictorattackerFloat:dmgdmgbits){
    if (
get_user_team(victim) == && get_user_team(attacker) == && CanAttackFriends[attacker])
        return 
HAM_IGNORED;
        
    return 
HAM_SUPERCEDE;

and for cstrike I was told you should use cs_get_user_team and CS_TEAM_CT/T
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 20:32.


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