Advertisement
Guest User

Untitled

a guest
Apr 25th, 2018
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.86 KB | None | 0 0
  1. local JRS_Menu_Player_List = vgui.Create( "DListView", JRS_Menu_Frame )
  2. JRS_Menu_Player_List:SetPos( 50, 65 )
  3. JRS_Menu_Player_List:SetSize( JRS_Menu_Frame:GetWide()-100, JRS_Menu_Frame:GetTall()-100 )
  4. JRS_Menu_Player_List:SetMultiSelect( false )
  5. for _, v in pairs ( player.GetAll() ) do
  6.  
  7. JRS_Menu_Player_List:AddColumn( "Name" ):SetFixedWidth(400)
  8. JRS_Menu_Player_List:AddColumn( "Rank" ):SetFixedWidth(400)
  9.  
  10. JRS_Menu_Player_List:AddLine( v:Name(), v:GetJobRankName() )
  11.  
  12. end
  13. JRS_Menu_Player_List.OnRowSelected = function()
  14. surface.PlaySound( "UI/buttonclickrelease.wav" )
  15.  
  16. local JRS_Menu_Menu_Actions = vgui.Create( "DMenu", JRS_Menu_Frame )
  17.  
  18. local promote = JRS_Menu_Menu_Actions:AddOption( "Promote", function()
  19. surface.PlaySound( "buttons/button14.wav" )
  20. JRS_Menu_Frame:Close()
  21. JRS_Menu_Frame:Close()
  22. RunConsoleCommand( "say !promote" ..v:Name() ..v:GetJobRankName()+1 .."Promoted." )
  23. RunConsoleCommand( "jrs_menu" )
  24. end )
  25. promote:SetIcon( "icon16/add.png" )
  26.  
  27. JRS_Menu_Menu_Actions:AddSpacer()
  28.  
  29. local demote = JRS_Menu_Menu_Actions:AddOption( "Demote", function()
  30. surface.PlaySound( "buttons/button14.wav" )
  31. JRS_Menu_Frame:Close()
  32. JRS_Menu_Frame:Close()
  33. RunConsoleCommand( "say !rdemote" ..v:Name() ..v:GetJobRankName()-1 .."Demoted." )
  34. RunConsoleCommand( "jrs_menu" )
  35. end )
  36. demote:SetIcon( "icon16/delete.png" )
  37.  
  38. JRS_Menu_Menu_Actions:Open()
  39.  
  40. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement