Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local JRS_Menu_Player_List = vgui.Create( "DListView", JRS_Menu_Frame )
- JRS_Menu_Player_List:SetPos( 50, 65 )
- JRS_Menu_Player_List:SetSize( JRS_Menu_Frame:GetWide()-100, JRS_Menu_Frame:GetTall()-100 )
- JRS_Menu_Player_List:SetMultiSelect( false )
- for _, v in pairs ( player.GetAll() ) do
- JRS_Menu_Player_List:AddColumn( "Name" ):SetFixedWidth(400)
- JRS_Menu_Player_List:AddColumn( "Rank" ):SetFixedWidth(400)
- JRS_Menu_Player_List:AddLine( v:Name(), v:GetJobRankName() )
- end
- JRS_Menu_Player_List.OnRowSelected = function()
- surface.PlaySound( "UI/buttonclickrelease.wav" )
- local JRS_Menu_Menu_Actions = vgui.Create( "DMenu", JRS_Menu_Frame )
- local promote = JRS_Menu_Menu_Actions:AddOption( "Promote", function()
- surface.PlaySound( "buttons/button14.wav" )
- JRS_Menu_Frame:Close()
- JRS_Menu_Frame:Close()
- RunConsoleCommand( "say !promote" ..v:Name() ..v:GetJobRankName()+1 .."Promoted." )
- RunConsoleCommand( "jrs_menu" )
- end )
- promote:SetIcon( "icon16/add.png" )
- JRS_Menu_Menu_Actions:AddSpacer()
- local demote = JRS_Menu_Menu_Actions:AddOption( "Demote", function()
- surface.PlaySound( "buttons/button14.wav" )
- JRS_Menu_Frame:Close()
- JRS_Menu_Frame:Close()
- RunConsoleCommand( "say !rdemote" ..v:Name() ..v:GetJobRankName()-1 .."Demoted." )
- RunConsoleCommand( "jrs_menu" )
- end )
- demote:SetIcon( "icon16/delete.png" )
- JRS_Menu_Menu_Actions:Open()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement