Raised This Month: $ Target: $400
 0% 

message appears when the player is killed


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 04-14-2014 , 15:42   Re: message appears when the player is killed
Reply With Quote #9

And here I've added some more abbilities in your messages, swapped! I've got the victim and attacke names, also added some colors to the chat messages! Here you go:
PHP Code:
#include <amxmodx> 

public plugin_init() 

    
register_event("DeathMsg""death_msg_function""a"); 


public 
death_msg_function() 

    new 
victim read_data); 
    new 
attacker read_data); 
    new 
hs read_data); 
    new 
NameVictim[32]
    
get_user_name(victimNameVictim31)
    new 
NameAttacker[32]
    
get_user_name(attackerNameAttacker31)

    if(
hs
    { 
        
ColorMessage(victim"You have been headshoted by %s!"NameAttacker

        
ColorMessage(attacker"You have headshoted %s!"NameVictim); 
    } 

    else 
    { 
        
ColorMessage(victim,  "You have been normal killed by %s"NameAttacker); 

        
ColorMessage(attacker"You have normal killed %s"NameVictim);     
    } 
}  

/*You can add some colors to the chat messages
^4 - green color
^3 - team color
^1 - normal chat color
Example: ^3You have been ^4headshoted ^3by ^4%s!*/

stock ColorMessage(const id, const input[], any:...){
            new 
count 1players[32];
            static 
msg191 ];
            
vformat(msg190input3);
            if (
idplayers[0] = id; else get_players(players count "ch"); {
                for (new 
0counti++){
                    if (
is_user_connected(players[i])){
                        
message_begin(MSG_ONE_UNRELIABLE get_user_msgid("SayText"), _players[i]);
                        
write_byte(players[i]);
                        
write_string(msg);
                        
message_end();}}}
        } 
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 17:53.


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