Liverus

death_print

Jan 12th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.61 KB | None | 0 0
  1.    
  2.  
  3. function playerDeath( victim, weapon, killer )
  4.  
  5.    if( killer ~= victim and killer:IsPlayer( ) ) then
  6.  
  7.    Role       = { }
  8.    Role [ 0 ] = "Innocent"
  9.    Role [ 1 ] = "Traître"
  10.    Role [ 2 ] = "Détective"
  11.  
  12.    victim:SendLua( " chat.AddText( Color( 255, 150, 0 ), 'Vous avez été tué par: ', Color( "..255*(killer:GetRole() == ROLE_TRAITOR and 1 or 0)..", "..255*(killer:GetRole() == ROLE_INNOCENT and 1 or 0)..", "..255*(killer:GetRole() == ROLE_DETECTIVE and 1 or 0).." ), '"..killer:GetName().." ("..Role[killer:GetRole()]..")' )" )
  13.  
  14.    end
  15.  
  16. end
  17.  
  18. hook.Add( "PlayerDeath", "OnPlayerDeath", playerDeath )
Advertisement
Add Comment
Please, Sign In to add comment