Raised This Month: $ Target: $400
 0% 

Individual friendly fire


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
benamo6
Veteran Member
Join Date: Aug 2008
Location: NeverLand
Old 02-02-2010 , 18:03   Individual friendly fire
Reply With Quote #1

How can I make that a player can recieve damage and make damage to teammates, I mean like only that player have friendly fire on?
Example:
Player A and B are terrorists
Player A say /hitme
By typing /hitme individual friendly fire is enabled on player A
Player B can damage player A, and viceversa.

Ive tried with this, but it isnt working:
PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <fakemeta>

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

new Masoquista[33]

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("say /maso""masoquista")
    
    
RegisterHam(Ham_Spawn,         "player""Fwd_PlayerSpawn_Post",    1)
    
RegisterHam(Ham_TakeDamage,     "player""FwdTakeDamage",         0)
}

public 
masoquista(id)
{
    if(
get_user_team(id) == 1)
        
Masoquista[id] = 1
}

public 
Fwd_PlayerSpawn_Post(id)
{
    
Masoquista[id] = 0
}

public 
FwdTakeDamage(victiminflictorattackerFloat:damagedamage_bits)
{
    if(!
Masoquista[attacker] && Masoquista[victim])
    {
        new 
Float:Health
        pev
(victimpev_healthHealth)
        
set_pev(victimpev_healthHealth damage)  
    }

__________________
Please help me with this Thread
I am 70% addicted to Counterstrike. What about you?
Ill make any spanish translation of a plugin. Just ask for it
benamo6 is offline
Send a message via MSN to benamo6
 


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 07:26.


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