Raised This Month: $ Target: $400
 0% 

Pass player if attacked?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
MasterKy
Junior Member
Join Date: Aug 2009
Old 09-01-2009 , 13:27   Pass player if attacked?
Reply With Quote #1

PHP Code:
public plugin_init()
{
    
register_plugin(PLUGVERSAUTH);
    
register_event("DeathMsg""EVENT_TakeDamage""be")
    
RegisterHam(Ham_TakeDamage"player""EVENT_TakeDamage")
}

public 
EVENT_TakeDamage(id){
new 
iPlayers32 ];
new 
iPlayerCount
get_players
iPlayersiPlayerCount"ae""TERRORIST" ); 
        if(
iPlayerCount == 1){
        
        }else
        if(
iPlayerCount == 2){
        new 
CsTeams:userTeam cs_get_user_team(id)
        if(
get_user_attacker(id)){
            if(
userTeam == CS_TEAM_T) {
            
cs_set_user_team(id,CS_TEAM_CT)
            
captured(id)
                }
            }
        }else{
        new 
CsTeams:userTeam cs_get_user_team(id)
        if(
get_user_attacker(id)){
            if(
userTeam == CS_TEAM_T) {
            
cs_set_user_team(id,CS_TEAM_CT)
            
captured(id)
            
client_print(0,print_chat"Hahaha.A terrorist has been captured!!!",id)
            
server_cmd("amx_execall spk misc/risamalo")
                }
            }
        }
        return 
PLUGIN_CONTINUE

Hello!
this is my plugin but i have a problem
it send the TR player for CT if him be attacked.
I need it to send the terrorist
for CT if a CT shoot him, but do not want him to lose HP and do not want him(Terrorist) to go (to CT team) if a terrorist attack him.

Thanks for all!
MasterKy is offline
 


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 14:58.


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