AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [SOLVED] DeathMsg Event Help.! (https://forums.alliedmods.net/showthread.php?t=237775)

xxxperts 03-29-2014 08:59

[SOLVED] DeathMsg Event Help.!
 
1 Attachment(s)
Whenever i switch the team then also the message display. please see the attached screenshot & also the my code.. Below

PHP Code:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Attacker Shower"
#define VERSION "1.0"
#define AUTHOR "LOL ?"

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_event("DeathMsg""event_dead""a""1>0")
}

public 
event_dead()
{
    new 
iKiller read_data(1)
    new 
iVictim read_data(2)
    new 
iHskill read_data(3)
    
    new 
vicname[32], attackername[32];
    
get_user_name(iVictimvicname31)
    
get_user_name(iKillerattackername31)
    
    new 
weapon[32]
    
read_data(4weapon31)
    
    if (
iHskill)
    {
        
client_print(0print_chat"%s Had Just Killed %s with (%s) Headshot"attackernamevicnameweapon)
    }
    else
    {
        
client_print(iKillerprint_chat"You Had Just Killed %s with (%s)"vicnameweapon)
    }
}

/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/ 


amx_tiger 03-29-2014 09:45

Re: DeathMsg Event Help.!
 
So what's the problem? You don't want to see that message when you change the team?

This should work:

PHP Code:

#include <amxmodx>  
#include <amxmisc>  

#define PLUGIN "Attacker Shower"  
#define VERSION "1.0"  
#define AUTHOR "LOL ?"  

public plugin_init()   
{  
    
register_plugin(PLUGINVERSIONAUTHOR)  
    
register_event("DeathMsg""event_dead""a""1>0")  
}  

public 
event_dead()  
{  
    new 
iKiller read_data(1)  
    new 
iVictim read_data(2)  

    if (!
is_user_connected(iKiller) || iKiller == iVictim
          return 
PLUGIN_CONTINUE

    new 
iHskill read_data(3)  
      
    new 
vicname[32], attackername[32];  
    
get_user_name(iVictimvicname31)  
    
get_user_name(iKillerattackername31)  
      
    new 
weapon[32]  
    
read_data(4weapon31)  
      
    if (
iHskill)  
    {  
        
client_print(0print_chat"%s Had Just Killed %s with (%s) Headshot"attackernamevicnameweapon)  
    }  
    else  
    {  
        
client_print(iKillerprint_chat"You Had Just Killed %s with (%s)"vicnameweapon)  
    }  
    
    return 
PLUGIN_CONTINUE;



swapped 03-29-2014 10:52

Re: DeathMsg Event Help.!
 
Nop, this is for the same team (if friendly fire is on), they want only for a specific team
tell us the team ..


All times are GMT -4. The time now is 05:57.

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