Guest User

Untitled

a guest
Jun 22nd, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. /*-------------------------------------------------------------------------------------------------------------------------
  2. Kill a player
  3. -------------------------------------------------------------------------------------------------------------------------*/
  4.  
  5. local PLUGIN = {}
  6. PLUGIN.Title = "Slay"
  7. PLUGIN.Description = "Kill a player."
  8. PLUGIN.Author = "Overv"
  9. PLUGIN.ChatCommand = "slay"
  10. PLUGIN.Usage = "[players]"
  11. PLUGIN.Privileges = { "Slay" }
  12.  
  13. function PLUGIN:Call( ply, args )
  14. if ( ply:EV_HasPrivilege( "Slay" ) ) then
  15. local players = evolve:FindPlayer( args, ply )
  16.  
  17. for _, pl in ipairs( players ) do
  18. pl:Kill()
  19. pl:SetFrags( pl:Frags() + 1 )
  20. end
  21.  
  22. if ( #pl > 0 ) then
  23. evolve:Notify( evolve.colors.blue, ply:Nick(), evolve.colors.white, " has slayed ", evolve.colors.red, evolve:CreatePlayerList( players ), evolve.colors.white, "." )
  24.  
  25. elseif ( #pl == 1 ) then
  26. if ( #args > 1 ) then
  27. filex.Append( "ev_slay.txt", "[" .. os.date() .. "]" )
  28. end
  29.  
  30.  
  31. else
  32. evolve:Notify( ply, evolve.colors.red, evolve.constants.noplayers )
  33. end
  34. else
  35. evolve:Notify( ply, evolve.colors.red, evolve.constants.notallowed )
  36. end
  37. end
  38.  
  39. function PLUGIN:Menu( arg, players )
  40. if ( arg ) then
  41. RunConsoleCommand( "ev", "slay", unpack( players ) )
  42. else
  43. return "Slay", evolve.category.punishment
  44. end
  45. end
  46.  
  47. evolve:RegisterPlugin( PLUGIN )
Add Comment
Please, Sign In to add comment