Raised This Month: $ Target: $400
 0% 

Ham_TakeDamage, CsTeams tag mismatch


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 07-31-2014 , 10:21   Ham_TakeDamage, CsTeams tag mismatch
Reply With Quote #1

Hey, guys! I just want to ask why is this tag mismatch caused in the code. It's purpose is to block FF for Terrorist and allow it for CTs. Thanks!
PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <cstrike>

#define PLUGIN "CT FF"
#define VERSION "1.0"
#define AUTHOR "Flicker"

new mpFriendlyFire

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
mpFriendlyFire get_cvar_pointer("mp_friendlyfire")
    
set_pcvar_num(mpFriendlyFire1)
    
    
RegisterHam(Ham_TakeDamage"player""onTakeDamage")
}

public 
onTakeDamage(victiminflictorattackerFloat:damagedmgbits)
{
    new 
CsTeams:Vteam cs_get_user_team(victim)
    new 
CsTeams:Ateam cs_get_user_team(attacker)
    
    return (
Vteam == Ateam == CS_TEAM_T) ? HAM_SUPERCEDE HAM_IGNORED

__________________
Flick3rR is offline
Send a message via Skype™ to Flick3rR
 



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 12:56.


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