Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include < amxmodx >
- #include < amxmisc >
- #define PLUGIN "Killed by"
- #define VERSION "1.0"
- #define AUTHOR "LondoN eXtream"
- #define CHAT_TAG "^x04[CSO Furien]"
- new g_msgSayText;
- public plugin_init()
- {
- register_plugin(PLUGIN, VERSION, AUTHOR);
- register_event("DeathMsg", "EventWeaponKill", "a");
- g_msgSayText = get_user_msgid("SayText");
- }
- public EventWeaponKill()
- {
- new Attacker = read_data(1), Victim = read_data(2), HS = read_data(3);
- if(!Attacker || Attacker == Victim)
- return;
- new Name[32], WeaponName[32];
- get_user_name(Attacker, Name, charsmax(Name));
- get_weapon_name(Attacker, WeaponName, charsmax(WeaponName));
- print_color(Victim, "^x01Ai fost omorat de^x03 %s^x01 cu^x04 %s^x01 (^x03 %s^x01 )", Name, WeaponName, HS ? "HEAD - SHOOT" : "");
- }
- stock get_weapon_name(Player, WeaponName[], Len)
- {
- get_weaponname(get_user_weapon(Player), WeaponName, Len);
- replace(WeaponName, Len, "weapon_", "");
- ucfirst(WeaponName);
- }
- stock print_color(const id, const input[], any:...) {
- new count = 1, players[32];
- static msg[191];
- vformat(msg, 190, input, 3);
- new final[191];
- formatex(final, charsmax(final), "%s %s", CHAT_TAG, msg);
- if(id) players[0] = id;
- else get_players(players, count, "ch"); {
- for(new i = 0; i < count; i++) {
- if(is_user_connected(players[i])) {
- message_begin(MSG_ONE_UNRELIABLE, g_msgSayText, _, players[i]);
- write_byte(players[i]);
- write_string(final);
- message_end();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement