Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -----------------------------------------------------
- local category = "Jobs"
- function OpenF4()
- local JobV
- local Desc = "Выберите профессию"
- if F4Frame and ValidPanel( F4Frame ) then
- CloseF4()
- else
- F4Frame = vgui.Create( "DFrame" )
- F4Frame:SetSize( 900, 600 )
- F4Frame:Center()
- F4Frame:SetTitle( "\tМеню Сервера" )
- F4Frame:SetDraggable( false )
- F4Frame:MakePopup()
- F4Frame:ShowCloseButton( true )
- end
- F4Frame.Paint = function( self, w, h )
- draw.RoundedBox( 0, 0, 0, w, h, Color( 64, 64, 64, 200 ) )
- draw.RoundedBox( 0, 0, 0, w, 30, Color( 64, 0, 0, 240 ) )
- draw.RoundedBox( 0, 0, 20, w, 10, Color( 41, 0, 0, 240 ) )
- draw.RoundedBox( 0, 0, 30, 150, h - 30, Color( 64, 64, 64, 200 ) )
- draw.RoundedBox( 0, 600, 310, w - 600, h - 310, Color( 10, 10, 10, 200 ) )
- end
- local pos = 0
- local DScrollPanel = vgui.Create( "DScrollPanel",F4Frame )
- DScrollPanel:SetSize( 500, 565 )
- DScrollPanel:SetPos( 100, 35 )
- local DScrollPanel2 = vgui.Create( "DScrollPanel",F4Frame )
- DScrollPanel2:SetSize( 300, 250 )
- DScrollPanel2:SetPos( 600, 310 )
- local CategoryJobs = vgui.Create( "DButton", F4Frame )
- CategoryJobs:SetText( "Работы" )
- CategoryJobs:SetTextColor( Color( 255, 255, 255 ) )
- CategoryJobs:SetPos( 0, 35 )
- CategoryJobs:SetSize( 150, 30 )
- CategoryJobs:SetFont( "Trebuchet18" )
- CategoryJobs.DoClick = function()
- surface.PlaySound( "buttons/button9.wav" )
- category = "Jobs"
- RefreshUI()
- end
- CategoryJobs.Paint = function( self, w, h )
- draw.RoundedBox( 0, 0, 0, w, h, Color( 64, 0, 0, 200 ) )
- end
- local CategoryEntity = vgui.Create( "DButton", F4Frame )
- CategoryEntity:SetText( "Обьекты" )
- CategoryEntity:SetTextColor( Color( 255, 255, 255 ) )
- CategoryEntity:SetPos( 0, 70 )
- CategoryEntity:SetSize( 150, 30 )
- CategoryEntity:SetFont( "Trebuchet18" )
- CategoryEntity.DoClick = function()
- surface.PlaySound( "buttons/button9.wav" )
- category = "Entity"
- RefreshUI()
- end
- CategoryEntity.Paint = function( self, w, h )
- draw.RoundedBox( 0, 0, 0, w, h, Color( 64, 0, 0, 200 ) )
- end
- local CategoryWeapons = vgui.Create( "DButton", F4Frame )
- CategoryWeapons:SetText( "Оружие" )
- CategoryWeapons:SetTextColor( Color( 255, 255, 255 ) )
- CategoryWeapons:SetPos( 0, 105 )
- CategoryWeapons:SetSize( 150, 30 )
- CategoryWeapons:SetFont( "Trebuchet18" )
- CategoryWeapons.DoClick = function()
- pos = 0
- surface.PlaySound( "buttons/button9.wav" )
- category = "Weapons"
- RefreshUI()
- end
- CategoryWeapons.Paint = function( self, w, h )
- draw.RoundedBox( 0, 0, 0, w, h, Color( 64, 0, 0, 200 ) )
- end
- local CategoryAmmo = vgui.Create( "DButton", F4Frame )
- CategoryAmmo:SetText( "Патроны" )
- CategoryAmmo:SetTextColor( Color( 255, 255, 255 ) )
- CategoryAmmo:SetPos( 0, 140 )
- CategoryAmmo:SetSize( 150, 30 )
- CategoryAmmo:SetFont( "Trebuchet18" )
- CategoryAmmo.DoClick = function()
- surface.PlaySound( "buttons/button9.wav" )
- category = "Ammo"
- RefreshUI()
- end
- CategoryAmmo.Paint = function( self, w, h )
- draw.RoundedBox( 0, 0, 0, w, h, Color( 64, 0, 0, 200 ) )
- end
- local CategoryCom = vgui.Create( "DButton", F4Frame )
- CategoryCom:SetText( "Команды" )
- CategoryCom:SetTextColor( Color( 255, 255, 255 ) )
- CategoryCom:SetPos( 0, 175 )
- CategoryCom:SetSize( 150, 30 )
- CategoryCom:SetFont( "Trebuchet18" )
- CategoryCom.DoClick = function()
- surface.PlaySound( "buttons/button9.wav" )
- category = "Com"
- RefreshUI()
- end
- CategoryCom.Paint = function( self, w, h )
- draw.RoundedBox( 0, 0, 0, w, h, Color( 64, 0, 0, 200 ) )
- end
- local ModelIcon = vgui.Create( "DModelPanel", F4Frame )
- ModelIcon:SetSize( 300, 300 )
- ModelIcon:SetPos(600,30)
- ModelIcon:SetModel( LocalPlayer():GetModel() )
- local MakeMeJob = vgui.Create( "DButton", F4Frame )
- MakeMeJob:SetText( "Стать" )
- MakeMeJob:SetTextColor( Color( 255, 255, 255 ) )
- MakeMeJob:SetPos( 675, 565 )
- MakeMeJob:SetSize( 150, 30 )
- MakeMeJob:SetFont( "Trebuchet18" )
- MakeMeJob.DoClick = function()
- surface.PlaySound( "buttons/button9.wav" )
- if(JobV != nil)then
- if(JobV.vote != true)then
- RunConsoleCommand("darkrp", JobV.command)
- else
- RunConsoleCommand("darkrp", "vote" .. JobV.command)
- end
- end
- end
- MakeMeJob.Paint = function( self, w, h )
- draw.RoundedBox( 0, 0, 0, w, h, Color( 64, 0, 0, 200 ) )
- end
- local DLabel = vgui.Create( "DLabel", DScrollPanel2 )
- DLabel:SetText( Desc )
- DLabel:SetPos( 0, 0 )
- DLabel:SetSize(300,1000)
- DLabel:SetFont( "Trebuchet24" )
- DLabel:SetAutoStretchVertical( true )
- DLabel:SetWrap(true)
- if(category == "Jobs") then
- for i, item in ipairs(RPExtraTeams) do
- local SI = true
- if SI == true then
- pos = pos + 35
- local Text = item.name
- if(item.status == "User")then
- Text = item.name
- else
- Text = item.name .. " (Только для " .. item.status .. ")"
- end
- local Button = vgui.Create( "DButton", DScrollPanel )
- Button:SetText( Text )
- Button:SetTextColor( Color( 255, 255, 255 ) )
- Button:SetPos( 55, pos - 35)
- Button:SetSize( 425, 30 )
- Button:SetFont( "Trebuchet18" )
- Button.DoClick = function()
- JobV = item
- if istable( item['model'] ) then ModelIcon:SetModel( item['model'][1] ) else ModelIcon:SetModel( item['model'] ) end
- Desc = item.description
- DLabel:SetText( Desc )
- surface.PlaySound( "buttons/button9.wav" )
- end
- Button.Paint = function( self, w, h )
- draw.RoundedBox( 0, 0, 0, w, h, Color( 64, 0, 0, 200 ) )
- end
- local Icon = vgui.Create( "SpawnIcon", Button )
- Icon:SetSize( 30, 30 )
- Icon:SetPos( 0, 0 )
- if istable( item['model'] ) then Icon:SetModel( item['model'][1] ) else Icon:SetModel( item['model'] ) end
- end
- end
- end
- if(category == "Entity") then
- for i, item in ipairs(DarkRPEntities) do
- local SI = true
- if istable(item.allowed) and not table.HasValue( item.allowed, LocalPlayer():Team() )then
- SI = false
- end
- if SI == true then
- pos = pos + 35
- local Button = vgui.Create( "DButton", DScrollPanel )
- Button:SetText( item.name .. ", " .. item.price .. "₽" )
- Button:SetTextColor( Color( 255, 255, 255 ) )
- Button:SetPos( 55, pos - 35)
- Button:SetSize( 425, 30 )
- Button:SetFont( "Trebuchet18" )
- Button.DoClick = function()
- RunConsoleCommand("DarkRP", item.cmd)
- surface.PlaySound( "buttons/button9.wav" )
- F4Frame:Close()
- end
- Button.Paint = function( self, w, h )
- draw.RoundedBox( 0, 0, 0, w, h, Color( 64, 0, 0, 200 ) )
- end
- local Icon = vgui.Create( "SpawnIcon", Button )
- Icon:SetSize( 30, 30 )
- Icon:SetPos( 0, 0 )
- Icon:SetModel( item.model )
- end
- end
- end
- if(category == "Weapons") then
- for i, item in ipairs(CustomShipments) do
- local SI = false
- if table.HasValue(item.allowed, LocalPlayer():Team())then
- pos = pos + 35
- local Button1 = vgui.Create( "DButton", DScrollPanel )
- Button1:SetText( item.name .. ", " .. item.price .. "₽, " .. item.amount .. " штук")
- Button1:SetTextColor( Color( 255, 255, 255 ) )
- Button1:SetPos( 55, pos - 35)
- Button1:SetSize( 425, 30 )
- Button1:SetFont( "Trebuchet18" )
- Button1.DoClick = function()
- RunConsoleCommand("DarkRP", "buyshipment", item.name)
- surface.PlaySound( "buttons/button9.wav" )
- F4Frame:Close()
- end
- Button1.Paint = function( self, w, h )
- draw.RoundedBox( 0, 0, 0, w, h, Color( 64, 0, 0, 200 ) )
- end
- local Icon = vgui.Create( "SpawnIcon", Button1 )
- Icon:SetSize( 30, 30 )
- Icon:SetPos( 0, 0 )
- Icon:SetModel( item.model )
- end
- end
- end
- if(category == "Ammo") then
- for i, item in ipairs(GAMEMODE.AmmoTypes) do
- local SI = true
- if istable(item.allowed) and table.Count(item.allowed) >= 1 and not table.HasValue( item.allowed, LocalPlayer():Team() ) then SI = false end
- if SI == true then
- pos = pos + 35
- local Button1 = vgui.Create( "DButton", DScrollPanel )
- Button1:SetText( item.name .. ", " .. item.price .. "₽" )
- Button1:SetTextColor( Color( 255, 255, 255 ) )
- Button1:SetPos( 55, pos - 35)
- Button1:SetSize( 425, 30 )
- Button1:SetFont( "Trebuchet18" )
- Button1.DoClick = function()
- RunConsoleCommand("DarkRP", "buyammo", item.ammoType)
- surface.PlaySound( "buttons/button9.wav" )
- F4Frame:Close()
- end
- Button1.Paint = function( self, w, h )
- draw.RoundedBox( 0, 0, 0, w, h, Color( 64, 0, 0, 200 ) )
- end
- local Icon = vgui.Create( "SpawnIcon", Button1 )
- Icon:SetSize( 30, 30 )
- Icon:SetPos( 0, 0 )
- Icon:SetModel( item.model )
- end
- end
- end
- if(category == "Com") then
- print("Commands")
- local DNum1 = vgui.Create( "DNumberWang", DScrollPanel )
- DNum1:SetValue("100")
- DNum1:SetPos( 405, 0)
- DNum1:SetSize( 75, 30 )
- DNum1:SetFont( "Trebuchet18" )
- local DNum2 = vgui.Create( "DNumberWang", DScrollPanel )
- DNum2:SetValue("100")
- DNum2:SetPos( 405, 35)
- DNum2:SetSize( 75, 30 )
- DNum2:SetFont( "Trebuchet18" )
- local Button1 = vgui.Create( "DButton", DScrollPanel )
- Button1:SetText("Выбросить деньги")
- Button1:SetTextColor( Color( 255, 255, 255 ) )
- Button1:SetPos( 55, 0)
- Button1:SetSize( 350, 30 )
- Button1:SetFont( "Trebuchet18" )
- Button1.DoClick = function()
- RunConsoleCommand("DarkRP", "dropmoney", DNum1:GetValue())
- surface.PlaySound( "buttons/button9.wav" )
- F4Frame:Close()
- end
- Button1.Paint = function( self, w, h )
- draw.RoundedBox( 0, 0, 0, w, h, Color( 64, 0, 0, 200 ) )
- end
- local Button2 = vgui.Create( "DButton", DScrollPanel )
- Button2:SetText("Передать деньги")
- Button2:SetTextColor( Color( 255, 255, 255 ) )
- Button2:SetPos( 55, 35)
- Button2:SetSize( 350, 30 )
- Button2:SetFont( "Trebuchet18" )
- Button2.DoClick = function()
- RunConsoleCommand("DarkRP", "give", DNum2:GetValue())
- surface.PlaySound( "buttons/button9.wav" )
- F4Frame:Close()
- end
- Button2.Paint = function( self, w, h )
- draw.RoundedBox( 0, 0, 0, w, h, Color( 64, 0, 0, 200 ) )
- end
- local Button3 = vgui.Create( "DButton", DScrollPanel )
- Button3:SetText("Запросить лицензию")
- Button3:SetTextColor( Color( 255, 255, 255 ) )
- Button3:SetPos( 55, 70)
- Button3:SetSize( 425, 30 )
- Button3:SetFont( "Trebuchet18" )
- Button3.DoClick = function()
- RunConsoleCommand("DarkRP", "requestlicense")
- surface.PlaySound( "buttons/button9.wav" )
- F4Frame:Close()
- end
- Button3.Paint = function( self, w, h )
- draw.RoundedBox( 0, 0, 0, w, h, Color( 64, 0, 0, 200 ) )
- end
- local Button4 = vgui.Create( "DButton", DScrollPanel )
- Button4:SetText("Обьявить Ком.Час")
- Button4:SetTextColor( Color( 255, 255, 255 ) )
- Button4:SetPos( 55, 105)
- Button4:SetSize( 425, 30 )
- Button4:SetFont( "Trebuchet18" )
- Button4.DoClick = function()
- RunConsoleCommand("DarkRP", "lockdown")
- surface.PlaySound( "buttons/button9.wav" )
- F4Frame:Close()
- end
- Button4.Paint = function( self, w, h )
- draw.RoundedBox( 0, 0, 0, w, h, Color( 64, 0, 0, 200 ) )
- end
- local Button5 = vgui.Create( "DButton", DScrollPanel )
- Button5:SetText("Выбросить оружие")
- Button5:SetTextColor( Color( 255, 255, 255 ) )
- Button5:SetPos( 55, 140)
- Button5:SetSize( 425, 30 )
- Button5:SetFont( "Trebuchet18" )
- Button5.DoClick = function()
- RunConsoleCommand("DarkRP", "drop")
- surface.PlaySound( "buttons/button9.wav" )
- F4Frame:Close()
- end
- Button5.Paint = function( self, w, h )
- draw.RoundedBox( 0, 0, 0, w, h, Color( 64, 0, 0, 200 ) )
- end
- local Button6 = vgui.Create( "DButton", DScrollPanel )
- Button6:SetText("Завершить Ком.Час")
- Button6:SetTextColor( Color( 255, 255, 255 ) )
- Button6:SetPos( 55, 175)
- Button6:SetSize( 425, 30 )
- Button6:SetFont( "Trebuchet18" )
- Button6.DoClick = function()
- RunConsoleCommand("DarkRP", "unlockdown")
- surface.PlaySound( "buttons/button9.wav" )
- F4Frame:Close()
- end
- Button6.Paint = function( self, w, h )
- draw.RoundedBox( 0, 0, 0, w, h, Color( 64, 0, 0, 200 ) )
- end
- local TextEntry = vgui.Create( "DTextEntry", DScrollPanel ) -- create the form as a child of frame
- TextEntry:SetPos( 380, 210 )
- TextEntry:SetSize( 100, 30 )
- TextEntry:SetText( "Текст рекламы" )
- local Button7 = vgui.Create( "DButton", DScrollPanel )
- Button7:SetText("Реклама")
- Button7:SetTextColor( Color( 255, 255, 255 ) )
- Button7:SetPos( 55, 210)
- Button7:SetSize( 325, 30 )
- Button7:SetFont( "Trebuchet18" )
- Button7.DoClick = function()
- RunConsoleCommand("say", "/ad " .. TextEntry:GetValue())
- surface.PlaySound( "buttons/button9.wav" )
- F4Frame:Close()
- end
- Button7.Paint = function( self, w, h )
- draw.RoundedBox( 0, 0, 0, w, h, Color( 64, 0, 0, 200 ) )
- end
- local Button9 = vgui.Create( "DButton", DScrollPanel )
- Button9:SetText("Продать все двери")
- Button9:SetTextColor( Color( 255, 255, 255 ) )
- Button9:SetPos( 55, 245)
- Button9:SetSize( 425, 30 )
- Button9:SetFont( "Trebuchet18" )
- Button9.DoClick = function()
- RunConsoleCommand("darkrp", "sellalldoors")
- surface.PlaySound( "buttons/button9.wav" )
- F4Frame:Close()
- end
- Button9.Paint = function( self, w, h )
- draw.RoundedBox( 0, 0, 0, w, h, Color( 64, 0, 0, 200 ) )
- end
- local NickEntry = vgui.Create( "DTextEntry", DScrollPanel ) -- create the form as a child of frame
- NickEntry:SetPos( 280, 280 )
- NickEntry:SetSize( 100, 30 )
- NickEntry:SetText( "Ник" )
- local DemoteEntry = vgui.Create( "DTextEntry", DScrollPanel ) -- create the form as a child of frame
- DemoteEntry:SetPos( 380, 280 )
- DemoteEntry:SetSize( 100, 30 )
- DemoteEntry:SetText( "Причина" )
- local Button10 = vgui.Create( "DButton", DScrollPanel )
- Button10:SetText("Уволить")
- Button10:SetTextColor( Color( 255, 255, 255 ) )
- Button10:SetPos( 55, 280)
- Button10:SetSize( 225, 30 )
- Button10:SetFont( "Trebuchet18" )
- Button10.DoClick = function()
- RunConsoleCommand("darkrp", "demote " .. NickEntry:GetValue() .. " " .. DemoteEntry:GetValue())
- surface.PlaySound( "buttons/button9.wav" )
- F4Frame:Close()
- end
- Button10.Paint = function( self, w, h )
- draw.RoundedBox( 0, 0, 0, w, h, Color( 64, 0, 0, 200 ) )
- end
- local ONickEntry = vgui.Create( "DTextEntry", DScrollPanel ) -- create the form as a child of frame
- ONickEntry:SetPos( 280, 315 )
- ONickEntry:SetSize( 100, 30 )
- ONickEntry:SetText( "Ник" )
- local ODemoteEntry = vgui.Create( "DTextEntry", DScrollPanel ) -- create the form as a child of frame
- ODemoteEntry:SetPos( 380, 315 )
- ODemoteEntry:SetSize( 100, 30 )
- ODemoteEntry:SetText( "Причина" )
- local Button10 = vgui.Create( "DButton", DScrollPanel )
- Button10:SetText("Розыск")
- Button10:SetTextColor( Color( 255, 255, 255 ) )
- Button10:SetPos( 55, 315)
- Button10:SetSize( 225, 30 )
- Button10:SetFont( "Trebuchet18" )
- Button10.DoClick = function()
- RunConsoleCommand("say", "/wanted " .. ONickEntry:GetValue() .. " " .. ODemoteEntry:GetValue())
- surface.PlaySound( "buttons/button9.wav" )
- F4Frame:Close()
- end
- Button10.Paint = function( self, w, h )
- draw.RoundedBox( 0, 0, 0, w, h, Color( 64, 0, 0, 200 ) )
- end
- local O2NickEntry = vgui.Create( "DTextEntry", DScrollPanel ) -- create the form as a child of frame
- O2NickEntry:SetPos( 280, 350 )
- O2NickEntry:SetSize( 200, 30 )
- O2NickEntry:SetText( "Ник" )
- local Button11 = vgui.Create( "DButton", DScrollPanel )
- Button11:SetText("Убрать Розыск")
- Button11:SetTextColor( Color( 255, 255, 255 ) )
- Button11:SetPos( 55, 350)
- Button11:SetSize( 225, 30 )
- Button11:SetFont( "Trebuchet18" )
- Button11.DoClick = function()
- RunConsoleCommand("say", "/unWanted " .. O2NickEntry:GetValue())
- surface.PlaySound( "buttons/button9.wav" )
- F4Frame:Close()
- end
- Button11.Paint = function( self, w, h )
- draw.RoundedBox( 0, 0, 0, w, h, Color( 64, 0, 0, 200 ) )
- end
- end
- end
- function CloseF4()
- F4Frame:Close()
- end
- function RefreshUI()
- CloseF4()
- OpenF4()
- end
- function GrabKey()
- if F4Frame and ValidPanel( F4Frame ) then
- CloseF4()
- else
- OpenF4()
- end
- end
- hook.Add("ShowSpare2", "OpenF4Menu", GrabKey)
Advertisement
Add Comment
Please, Sign In to add comment