Guest User

server

a guest
Mar 12th, 2014
4
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. AddCSLuaFile("autorun/client/cl_killmsg.lua")
  2. print("Kill message script loaded!, continuing happily!")
  3.  
  4. function PrintKillMsgOnDeath(victim, wep, attacker)
  5.     if GetRoundState() == ROUND_ACTIVE then
  6.         if (attacker:IsPlayer()) and (attacker ~= victim) and attacker:IsTraitor() then
  7.             umsg.Start("KillMsg", victim)
  8.                 umsg.String(attacker:Nick())
  9.                 umsg.Char(2)
  10.             umsg.End()
  11.         end
  12.         if (attacker:IsPlayer()) and (attacker ~= victim) and attacker:IsDetective() then
  13.             umsg.Start("KillMsg", victim)
  14.                 umsg.String(attacker:Nick())
  15.                 umsg.Char(3)
  16.             umsg.End()
  17.         end
  18.         if (attacker:IsPlayer()) and (attacker ~= victim) and !attacker:IsDetective() and !attacker:IsTraitor() then
  19.             umsg.Start("KillMsg", victim)
  20.                 umsg.String(attacker:Nick())
  21.                 umsg.Char(1)
  22.             umsg.End()
  23.         end
  24.     end
  25. end
  26.  
  27. hook.Add("PlayerDeath", "ChatKillMsg", PrintKillMsgOnDeath)
RAW Paste Data