Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- AddCSLuaFile()
- CreateClientConVar( "agc_key_vehicle", 12 )
- CreateClientConVar( "agc_auth_skip", 0 )
- local hasGhomes = file.Exists("autorun/sh_exproperties.lua","LUA") -- dirty
- --[[-------------------------------------------------------------------------
- Material stuff
- ---------------------------------------------------------------------------]]
- local mat_logo = Material("agc/nsa_logo.png", "alphatest smooth")
- local mat_user = Material("icon16/user_suit.png")
- local mat_lock = Material("icon16/lock.png")
- local mat_terminal = Material("icon16/application_xp_terminal.png")
- local mat_exclam = Material("icon16/exclamation.png")
- local mat_ano = Material("agc/ano.png", "alphatest smooth")
- local mat_cross = Material("icon16/cross.png")
- local mat_refresh = Material("icon16/arrow_refresh.png")
- local mat_tick = Material("icon16/tick.png")
- --[[-------------------------------------------------------------------------
- Icon stuff
- ---------------------------------------------------------------------------]]
- local Icon_Base = {
- {Title = "Жалобы",Icon = "agc/license.png",Action = "2",},
- {Title = "Розыск",Icon = "agc/wanted.png",Action = "3",},
- {Title = "Аресты",Icon = "agc/arrested.png",Action = "4",},
- {Title = "База",Icon = "agc/browser.png",Action = "5",},
- {Title = "Логи",Icon = "agc/complaint.png",Action = "1",},
- {Title = "Настройки",Icon = "agc/settings.png",Action = "6",},
- }
- if hasGhomes then
- table.insert(Icon_Base, {Title = "Имущество",Icon = "agc/complaint.png",Action = "7"})
- end
- --[[-------------------------------------------------------------------------
- VGUI Stuff
- ---------------------------------------------------------------------------]]
- local function ErrorFrame( error_message, x, px, py )
- if IsValid(ErrorB) then ErrorB:Remove() end
- ErrorB = vgui.Create( "DFrame" )
- ErrorB:SetSize(x, 30)
- ErrorB:SetPos(px,py)
- ErrorB.Paint = function(self,w,h)
- draw.RoundedBox(8, 0, 0, w, h, Color(15, 15, 15, 200))
- draw.SimpleText( error_message, "AGC_La_22", w / 2, h / 2, color_white, 1, 1 )
- surface.SetDrawColor(color_white)
- surface.SetMaterial(mat_exclam)
- surface.DrawTexturedRect( 7.5, 10, 16, 16)
- surface.SetMaterial(mat_exclam)
- surface.DrawTexturedRect( w - 22.5, 10, 16, 16)
- end
- ErrorB:SetTitle("")
- ErrorB:MakePopup()
- ErrorB:SetDraggable( false )
- ErrorB:ShowCloseButton( false )
- timer.Simple(1.25, function() if IsValid(ErrorB) then ErrorB:Remove() end end)
- end
- local function niceScrollbar(panel)
- panel.VBar.btnUp.Paint = function(self,w,h)
- draw.RoundedBox(0, w * .5-(w / 3.5 / 2) + 5, 0, w / 3.5, h, Color(100, 100, 100))
- end
- panel.VBar.btnDown.Paint = function(self,w,h)
- draw.RoundedBox(0, w * .5-(w / 3.5 / 2) + 5, 0, w / 3.5, h, Color(100, 100, 100))
- end
- panel.VBar.btnGrip.Paint = function(self,w,h)
- draw.RoundedBox(0, w * .5-(w / 3.5 / 2) + 5, 0, w / 3.5, h, Color(180, 180, 180))
- end
- panel.VBar.Paint = function(self,w,h)
- draw.RoundedBox(0, w * .5-( w / 3.5 / 2) + 5, 16, w / 3.5, h-32, Color(120, 120, 120))
- end
- end
- local function AuthFrame(entity_agc)
- local agc_ent = net.ReadEntity() or entity_agc
- if (LocalPlayer():isCP() and GetConVar("agc_auth_skip"):GetInt()) or (isNearAHackedComputer(LocalPlayer()) and not LocalPlayer():isCP()) then
- BaseComputer(agc_ent)
- return
- end
- local passwdenter = false
- local lang_agc = AGC.Language[AGC.MainLanguage]
- local BaseAuth = vgui.Create( "DFrame" )
- BaseAuth:SetSize( 600, 600 )
- BaseAuth:SetTitle("")
- BaseAuth:Center()
- BaseAuth:SetDraggable( false )
- BaseAuth:MakePopup()
- BaseAuth:ShowCloseButton( false )
- BaseAuth.Paint = function( self, w, h)
- draw.RoundedBox(4, 1, 1, w - 2, h - 2, Color(80, 80, 80, 255))
- draw.RoundedBox(4, 9, 9, w - 18, h - 18, color_black )
- draw.RoundedBox(4, 10, 10, w - 20, h - 20, Color(150, 150, 150, 255) )
- draw.RoundedBox(2, 260, 115, 330, 75, Color(18, 68, 113, 255) )
- draw.RoundedBox(2, 250, 200, 340, 25, Color(18, 68, 113, 255) )
- draw.SimpleText(lang_agc.Auth_NSA, "AGC_Ge_75", 425, 152, color_white, 1, 1)
- draw.SimpleText(lang_agc.Auth_Desc, "AGC_Ge_15", 425, 210, color_white, 1, 1)
- draw.RoundedBox(6, 125, 300, 350, 240, Color(210, 210, 210, 255))
- surface.SetDrawColor(color_white)
- surface.SetMaterial(mat_logo)
- surface.DrawTexturedRect( 20, 20, 256, 256)
- surface.SetMaterial(mat_user)
- surface.DrawTexturedRect( 385, 365, 20, 20)
- surface.SetMaterial(mat_lock)
- surface.DrawTexturedRect( 385, 430, 20, 20)
- draw.SimpleText(lang_agc.Auth_Login, "AGC_Ge_30", 300, 330, color_black, 1, 1)
- end
- local TextName = vgui.Create( "DLabel", BaseAuth )
- TextName:SetPos( 225, 360 )
- TextName:SetSize( 150, 35 )
- TextName:SetText( "" )
- TextName.Paint = function( self, w, h)
- draw.RoundedBox(4, 0, 0, w, h, color_white )
- draw.SimpleText(LocalPlayer():Name(), "AGC_Ge_20", w / 2, h / 2, color_black, 1, 1)
- end
- local EntryPassw = vgui.Create( "DTextEntry", BaseAuth )
- EntryPassw:SetPos( 225, 425 )
- EntryPassw:SetSize( 150, 35 )
- EntryPassw:SetText( "" )
- EntryPassw.Paint = function( self, w, h)
- draw.RoundedBox(4, 0, 0, w, h, color_white )
- local oldvalue = self:GetValue()
- local value = string.gsub( oldvalue, ".", "*" )
- draw.SimpleText(value, "AGC_Ge_20", w / 2, h / 2, color_black, 1, 1)
- end
- EntryPassw.OnTextChanged = function()
- passwdenter = true
- end
- local BaseExit = vgui.Create( "DButton", BaseAuth )
- BaseExit:SetSize( 150, 35 )
- BaseExit:SetPos( 315, 495 )
- BaseExit:SetText("")
- BaseExit.Paint = function( self, w, h)
- if self.on_cursor_entered then
- draw.RoundedBox(4, 0, 0, w, h, Color(180, 0, 0, 235))
- draw.SimpleText(">> " .. lang_agc.Button_Disconnect .. " <<", "AGC_Ge_15", w / 2, h / 2, color_white, 1, 1)
- else
- draw.RoundedBox(4, 0, 0, w, h, Color(180, 0, 0, 200))
- draw.SimpleText(lang_agc.Button_Disconnect, "AGC_Ge_15", w / 2, h / 2, color_white, 1, 1)
- end
- end
- BaseExit.DoClick = function()
- if IsValid(BaseAuth) then BaseAuth:Remove() end
- if IsValid(ErrorB) then ErrorB:Remove() end
- end
- local BaseCome = vgui.Create( "DButton", BaseAuth )
- BaseCome:SetSize( 150, 35 )
- BaseCome:SetPos( 135, 495 )
- BaseCome:SetText("")
- BaseCome.Paint = function( self, w, h)
- if self.on_cursor_entered then
- draw.RoundedBox(4, 0, 0, w, h, Color(45, 136, 45, 235))
- draw.SimpleText(">> " .. lang_agc.Button_Connect .. " <<", "AGC_Ge_15", w / 2, h / 2, color_white, 1, 1)
- else
- draw.RoundedBox(4, 0, 0, w, h, Color(45, 136, 45, 200))
- draw.SimpleText(lang_agc.Button_Connect, "AGC_Ge_15", w / 2, h / 2, color_white, 1, 1)
- end
- end
- BaseCome.DoClick = function()
- if IsValid(ErrorB) then ErrorB:Remove() end
- if LocalPlayer():isCP() and passwdenter then
- if IsValid(BaseAuth) then BaseAuth:Remove() end
- if IsValid(ErrorB) then ErrorB:Remove() end
- BaseComputer(agc_ent)
- return
- end
- ErrorFrame(lang_agc.Auth_Error, 350, ScrW() / 2 - 175, ScrH() / 2 + 250 )
- end
- local ButtonHack = vgui.Create( "DButton", BaseAuth )
- ButtonHack:SetSize( 140, 25 )
- ButtonHack:SetPos( 230, 265 )
- ButtonHack:SetText("")
- if (LocalPlayer():isCP() or (AGC.Hacker_Job and not table.HasValue(AGC.Hacker_Jobname, team.GetName(LocalPlayer():Team()))) or isNearAHackedComputer(LocalPlayer()) or agc_ent:IsVehicle()) then
- ButtonHack:SetVisible(false)
- end
- ButtonHack.Paint = function( self, w, h)
- draw.RoundedBox(4, 0, 0, w, h, self.on_cursor_entered and color_black or Color(0, 0, 0, 235))
- draw.SimpleText(lang_agc.Attempt_Text, "AGC_Ge_15", w / 2 + 10, h / 2, color_white, 1, 1)
- surface.SetDrawColor(color_white)
- surface.SetMaterial(mat_terminal)
- surface.DrawTexturedRect( 7.5, 5, 16, 16)
- end
- ButtonHack.DoClick = function()
- if IsValid(BaseAuth) then BaseAuth:Remove() end if IsValid(BaseDesktop) then BaseDesktop:Remove() end if IsValid(ErrorB) then ErrorB:Remove() end
- if IsValid(agc_ent) and agc_ent:GetClass() == "apc_computer" then
- net.Start("AGC_Hack")
- net.WriteEntity(agc_ent)
- net.SendToServer()
- end
- end
- local CheckB = vgui.Create( "DCheckBoxLabel", BaseAuth )
- CheckB:SetPos( 245, 470 )
- CheckB:SetText( lang_agc.Remember_Log )
- CheckB:SetTextColor( color_black )
- CheckB:SetConVar( "agc_auth_skip" )
- local key_value = GetConVar("agc_auth_skip"):GetInt()
- CheckB:SetValue( key_value )
- CheckB:SizeToContents()
- for k,v in pairs(BaseAuth:GetChildren()) do
- if v:GetName() == "DButton" then
- v.OnCursorEntered = function(self)
- self.on_cursor_entered = true
- end
- v.OnCursorExited = function(self)
- self.on_cursor_entered = false
- end
- end
- end
- end
- net.Receive("AuthFrameMenu", AuthFrame)
- local function AGCLogsFrame(ent)
- local lang_agc = AGC.Language[AGC.MainLanguage]
- local isHacked = isNearAHackedComputer(LocalPlayer())
- local BaseL = vgui.Create( "DFrame" )
- BaseL:SetSize( 700, 675 )
- BaseL:SetTitle("")
- BaseL:Center()
- BaseL:SetDraggable( false )
- BaseL:MakePopup()
- BaseL:ShowCloseButton( false )
- BaseL.Paint = function( self, w, h)
- draw.RoundedBox(4, 0, 0, w, h, Color(80, 80, 80, 240))
- draw.SimpleText(lang_agc.LogsTitle, "AGC_Ta_17", 15, 15, color_white, 0, 1)
- draw.SimpleText(lang_agc.LogsDesc, "AGC_Ta_16", 15, 32.5, color_white, 0, 1)
- draw.SimpleText(lang_agc.ArrestInfo, "AGC_Hack_25", 15, 60, color_white, 0, 1)
- draw.SimpleText(lang_agc.Unarrest, "AGC_Hack_25", 360, 60, color_white, 0, 1)
- draw.SimpleText(lang_agc.WantedInfo, "AGC_Hack_25", 15, 275, color_white, 0, 1)
- draw.SimpleText(lang_agc.Unwanted, "AGC_Hack_25", 360, 275, color_white, 0, 1)
- draw.SimpleText(lang_agc.LastWarrants, "AGC_Hack_25", 15, 490, color_white, 0, 1)
- draw.RoundedBox(2, 10, 75, w / 2 - 20, 2, Color(200, 0, 0, 240))
- draw.RoundedBox(2, w / 2 + 10, 75, w / 2 - 20, 2, Color(0, 180, 0, 240))
- draw.RoundedBox(2, 10, 290, w / 2 - 20, 2, Color(200, 0, 0, 240))
- draw.RoundedBox(2, w / 2 + 10, 290, w / 2 - 20, 2, Color(0, 180, 0, 240))
- draw.RoundedBox(2, 10, 505, w - 20, 2, Color(50, 50, 200, 240))
- end
- local ExitB = vgui.Create( "DButton", BaseL )
- ExitB:SetPos( 663, 10 )
- ExitB:SetText( "" )
- ExitB:SetSize( 26, 26 )
- ExitB.Paint = function( self, w, h )
- draw.RoundedBox(6, 0, 0, w, h, color_white)
- surface.SetDrawColor(color_white)
- surface.SetMaterial(mat_cross)
- surface.DrawTexturedRect( 5, 5, 16, 16)
- if self.on_cursor_entered then
- draw.RoundedBox(6, 0, 0, w, h, Color(50, 150, 255, 75))
- end
- end
- ExitB.DoClick = function()
- if IsValid(BaseL) then BaseL:Remove() end
- if IsValid(BaseDesktop) then BaseDesktop:SetMouseInputEnabled( true ) end
- end
- local ArrestList = vgui.Create( "DListView", BaseL)
- ArrestList:SetPos( 10, 85)
- ArrestList:SetSize( 330, 175)
- ArrestList:AddColumn( lang_agc.Criminal ):SetFixedWidth( 120 )
- ArrestList:AddColumn( lang_agc.Time ):SetFixedWidth( 90 )
- ArrestList:AddColumn( lang_agc.PoliceOfficer ):SetFixedWidth( 120 )
- ArrestList:SetTooltip(lang_agc.ArrestInfoTip)
- local UnArrestList = vgui.Create( "DListView", BaseL)
- UnArrestList:SetPos( 360, 85)
- UnArrestList:SetSize( 330, 175)
- UnArrestList:AddColumn( lang_agc.Criminal ):SetFixedWidth( 220 )
- UnArrestList:AddColumn( lang_agc.UnarrestDate ):SetFixedWidth( 110 )
- UnArrestList:SetTooltip(lang_agc.UnArrestInfo)
- local WantedList = vgui.Create( "DListView", BaseL)
- WantedList:SetPos( 10, 300)
- WantedList:SetSize( 330, 175)
- WantedList:AddColumn( lang_agc.Criminal ):SetFixedWidth( 110 )
- WantedList:AddColumn( lang_agc.PoliceOfficer ):SetFixedWidth( 110 )
- WantedList:AddColumn( lang_agc.Case_Entry ):SetFixedWidth( 110 )
- WantedList:SetTooltip(lang_agc.WantedToolTip)
- local UnWantedList = vgui.Create( "DListView", BaseL)
- UnWantedList:SetPos( 360, 300)
- UnWantedList:SetSize( 330, 175)
- UnWantedList:AddColumn( lang_agc.Criminal ):SetFixedWidth( 120 )
- UnWantedList:AddColumn( lang_agc.UnwantedDate ):SetFixedWidth( 90 )
- UnWantedList:AddColumn( lang_agc.PoliceOfficer ):SetFixedWidth( 120 )
- UnWantedList:SetTooltip(lang_agc.UnWantedInfo)
- local WarrantList = vgui.Create( "DListView", BaseL)
- WarrantList:SetPos( 10, 515)
- WarrantList:SetSize( 680, 150)
- WarrantList:AddColumn( lang_agc.Criminal ):SetFixedWidth( 150 )
- WarrantList:AddColumn( lang_agc.Case_Entry ):SetFixedWidth( 300 )
- WarrantList:AddColumn( lang_agc.PoliceOfficer ):SetFixedWidth( 150 )
- WarrantList:AddColumn( lang_agc.Case_Date ):SetFixedWidth( 80 )
- WarrantList:SetTooltip(lang_agc.WarrantInfo)
- local tt = {["arrest"] = ArrestList, ["unarrested"] = UnArrestList, ["wanted"] = WantedList, ["unwanted"] = UnWantedList, ["warrant"] = WarrantList }
- local data = {}
- net.Start( "AGCLogsGet" )
- net.WriteString("")
- net.SendToServer()
- net.Receive( "AGCLogsSend", function()
- local arrI = net.ReadTable()
- data = arrI
- for _, l in pairs(arrI.arrest) do
- for k, b in pairs(l) do ArrestList:AddLine( b[1], b[3] .. " " .. lang_agc.Hack_Seconds, b[2], k, _) end
- end
- for _, l in pairs(arrI.unarrested) do
- for k, b in pairs(l) do UnArrestList:AddLine( b[1], os.date("%d/%m - %H:%M", b[2]), k, _) end
- end
- for _, l in pairs(arrI.unwanted) do
- for k, b in pairs(l) do UnWantedList:AddLine( b[1], os.date("%d/%m - %H:%M", b[3]), b[2], k, _) end
- end
- for _, l in pairs(arrI.wanted) do
- for k, b in pairs(l) do WantedList:AddLine( b[1], b[2], b[3], k, _) end
- end
- for _, l in pairs(arrI.warrant) do
- for k, b in pairs(l) do WarrantList:AddLine( b[1], b[3], b[2], os.date("%d/%m - %H:%M", b[4]), k, _) end
- end
- end)
- for k,v in pairs(tt) do
- v:SetMultiSelect( false )
- niceScrollbar(v)
- v.OnRowRightClick = function(self, row)
- local selectact = DermaMenu()
- selectact:AddOption( lang_agc.delete_entry, function()
- if IsValid(ErrorB) then ErrorB:Remove() end
- if not table.HasValue(AGC.DeleteLogs, team.GetName(LocalPlayer():Team())) and not isHacked then
- ErrorFrame(lang_agc.not_allowed, 390, ScrW() / 2 - 175, 125)
- return
- end
- local sid, id = v:GetLine(row):GetValue(table.Count(v:GetLine(row).Columns)), v:GetLine(row):GetValue(table.Count(v:GetLine(row).Columns) - 1)
- net.Start("DeleteLogs")
- net.WriteTable({k, sid, data[k][sid][id]})
- net.SendToServer()
- self:RemoveLine(row)
- ErrorFrame(lang_agc.delete_success, 350, ScrW() / 2 - 175, 125)
- end)
- :SetIcon("icon16/database_delete.png")
- selectact:Open()
- end
- end
- local RefreshB = vgui.Create( "DButton", BaseL )
- RefreshB:SetPos( 630, 10 )
- RefreshB:SetText( "" )
- RefreshB:SetSize( 26, 26 )
- RefreshB.Paint = function( self, w, h )
- draw.RoundedBox(6, 0, 0, w, h, color_white)
- surface.SetDrawColor(color_white)
- surface.SetMaterial(mat_refresh)
- surface.DrawTexturedRect( 5, 5, 16, 16)
- if self.on_cursor_entered then
- draw.RoundedBox(6, 0, 0, w, h, Color(50, 150, 255, 75))
- end
- end
- RefreshB.DoClick = function()
- for _,v in pairs(tt) do
- v:Clear()
- end
- net.Start( "AGCLogsGet" )
- net.WriteString("")
- net.SendToServer()
- net.Receive( "AGCLogsSend", function()
- local arrI = net.ReadTable()
- data = arrI
- for _, l in pairs(arrI.arrest) do
- for k, b in pairs(l) do ArrestList:AddLine( b[1], b[3] .. " " .. lang_agc.Hack_Seconds, b[2], k, _) end
- end
- for _, l in pairs(arrI.unarrested) do
- for k, b in pairs(l) do UnArrestList:AddLine( b[1], os.date("%d/%m - %H:%M", b[2]), k, _) end
- end
- for _, l in pairs(arrI.unwanted) do
- for k, b in pairs(l) do UnWantedList:AddLine( b[1], os.date("%d/%m - %H:%M", b[3]), b[2], k, _) end
- end
- for _, l in pairs(arrI.wanted) do
- for k, b in pairs(l) do WantedList:AddLine( b[1], b[2], b[3], k, _) end
- end
- for _, l in pairs(arrI.warrant) do
- for k, b in pairs(l) do WarrantList:AddLine( b[1], b[3], b[2], os.date("%d/%m - %H:%M", b[4]), k, _) end
- end
- end)
- end
- for k,v in pairs(BaseL:GetChildren()) do
- if v:GetName() == "DButton" then
- v.OnCursorEntered = function(self)
- self.on_cursor_entered = true
- end
- v.OnCursorExited = function(self)
- self.on_cursor_entered = false
- end
- end
- end
- end
- local function CmdMenu( title, desc, cmd, plyc, type)
- local lang_agc = AGC.Language[AGC.MainLanguage]
- local BaseCmd = vgui.Create( "DFrame" )
- BaseCmd:SetSize( 390 , 190)
- BaseCmd:SetTitle("")
- BaseCmd:Center()
- BaseCmd:SetDraggable( false )
- BaseCmd:MakePopup()
- BaseCmd:ShowCloseButton( false )
- BaseCmd.Paint = function( self, w, h)
- draw.RoundedBox(4, 0, 0, w, h, color_black )
- draw.RoundedBox(4, 1, 1, w - 2, h - 2, Color(50, 50, 50, 255) )
- draw.RoundedBox(4, 9, 9, w - 18, h - 18, color_black)
- draw.RoundedBox(4, 10, 10, w - 20, h - 20, Color(20, 20, 20, 255))
- draw.SimpleText( title, "AGC_Bu_20", w / 2, 30, color_white, 1, 1)
- draw.SimpleText( desc, "AGC_Bu_17", 200, 50, color_white, 1, 1)
- draw.SimpleText("C:/Police/>", "BudgetLabel", 10, 10, Color(255, 255, 255, 10))
- end
- local ExitB = vgui.Create( "DButton", BaseCmd )
- ExitB:SetSize( 100, 35 )
- ExitB:SetPos( 250, 125 )
- ExitB:SetText("")
- ExitB.Paint = function( self, w, h)
- draw.RoundedBox(2, 0, 0, w, h, Color(180, 0, 0, 225))
- draw.SimpleText(lang_agc.Button_Cancel, "BudgetLabel", w / 2, h / 2, color_white, 1, 1)
- end
- ExitB.DoClick = function()
- if IsValid(BaseCmd) then BaseCmd:Remove() end
- if IsValid(BaseDesktop) then BaseDesktop:SetMouseInputEnabled( true ) end
- end
- local select_plyc = vgui.Create( "DComboBox", BaseCmd )
- select_plyc:SetPos(237.5, 80)
- select_plyc:SetSize(125, 20)
- for _,v in pairs( player.GetAll() ) do
- if type == "1" then
- if v:isWanted() then
- select_plyc:AddChoice( v:Name())
- end
- elseif type == "2" then
- if not v:isWanted() then
- select_plyc:AddChoice( v:Name())
- end
- else
- select_plyc:AddChoice( v:Name())
- end
- end
- select_plyc.OnSelect = function( panel, index, value, data)
- choice = string.Explode( " ", value)[1]
- end
- local EntryArg = vgui.Create( "DTextEntry", BaseCmd )
- EntryArg:SetPos( 40, 75 )
- EntryArg:SetText( "" )
- EntryArg:SetSize( 175, 30 )
- EntryArg.Paint = function( self, w, h)
- draw.RoundedBox(4, 0, 0, w, h, color_white)
- draw.SimpleText(self:GetValue(), "AGC_Bu_17", w / 2, h / 2, color_black, 1, 1)
- self:DrawTextEntryText(color_black, self.m_colHighlight, color_black)
- end
- if plyc == "1" then
- EntryArg:SetSize( 185, 30 )
- elseif plyc == "2" then
- EntryArg:SetSize( 185, 30 )
- else
- if IsValid(select_plyc) then select_plyc:Remove() end
- EntryArg:SetSize( 310, 30 )
- end
- local SendB = vgui.Create( "DButton", BaseCmd )
- SendB:SetSize( 100, 35 )
- SendB:SetPos( 40, 125 )
- SendB:SetText("")
- SendB.Paint = function( self, w, h)
- draw.RoundedBox(2, 0, 0, w, h, Color(0, 80, 0, 225))
- draw.SimpleText(lang_agc.Button_Send, "BudgetLabel", w / 2, h / 2, color_white, 1, 1)
- end
- SendB.DoClick = function()
- local value = EntryArg:GetValue()
- if value or choice then
- if plyc == "1" and choice and value then
- net.Start(cmd)
- net.WriteString(choice)
- net.WriteString(value)
- net.SendToServer()
- elseif plyc == "2" and choice then
- net.Start(cmd)
- net.WriteString(choice)
- net.SendToServer()
- elseif value then
- LocalPlayer():ConCommand("say " .. cmd .. " " .. value)
- end
- end
- if IsValid(BaseCmd) then BaseCmd:Remove() end
- if IsValid(BaseDesktop) then BaseDesktop:SetMouseInputEnabled( true ) end
- end
- end
- local function ArrWanFrame(mode)
- local lang_agc = AGC.Language[AGC.MainLanguage]
- local title = mode and lang_agc.Wanted_Title or lang_agc.Arrest_Title
- local desc = mode and lang_agc.Wanted_Desc or lang_agc.Arrest_Desc
- local info = mode and lang_agc.Info_NWanted or lang_agc.Info_NArrested
- local BaseWF = vgui.Create( "DFrame" )
- BaseWF:SetSize( 540, 475 )
- BaseWF:SetTitle("")
- BaseWF:Center()
- BaseWF:SetDraggable( false )
- BaseWF:MakePopup()
- BaseWF:ShowCloseButton( false )
- BaseWF.Paint = function( self, w, h)
- draw.RoundedBox(4, 0, 0, w, h, Color(80, 80, 80, 240))
- draw.SimpleText(title, "AGC_Ta_17", 15, 15, color_white, 0, 1)
- draw.SimpleText(desc, "AGC_Ta_16", 15, 32.5, color_white, 0, 1)
- end
- local vide = true
- local BaseWanted = vgui.Create( "DPanelList", BaseWF )
- BaseWanted:SetPos(10, 60)
- BaseWanted:SetSize( 520 , 405)
- BaseWanted:EnableVerticalScrollbar( true )
- BaseWanted.Paint = function(self, w, h)
- draw.RoundedBox(6, 0, 0, w, h, Color(255, 255, 255, 150))
- if vide then
- draw.SimpleText(info, "AGC_Ge_30", w / 2, 40, color_black, 1, 1)
- end
- end
- local infoo, random_v = mode and lang_agc.WantedInfo or lang_agc.ArrestInfo, math.random(100, 300)
- for k,v in pairs( player.GetAll() ) do
- if mode and v:isWanted() or v:isArrested() then
- local BaseDrawWan = vgui.Create( "DPanel", BaseWanted )
- BaseDrawWan:SetSize( 340 , 74)
- BaseDrawWan:SetPos( 0, 0 )
- BaseDrawWan:SetTooltip( v:isWanted() and v.DarkRPVars.wantedReason or "" )
- BaseDrawWan.Paint = function(self, w, h)
- draw.RoundedBox(0, 0, 0, w, h, Color(180, 180, 180, 225))
- draw.RoundedBox(0, 5, 5, w - 10, h - 10, Color(255, 180, 100, 100))
- surface.SetDrawColor( color_black )
- surface.DrawOutlinedRect( 0, 0, w, h )
- surface.SetDrawColor( color_black ) -- {{ user_id }
- surface.DrawOutlinedRect( 5, 5, w - 10, h - 10 )
- draw.SimpleText(v:Name(), "AGC_Ge_30", 80, 25, Color(0, 0 ,0), 0, 1)
- draw.SimpleText(v.DarkRPVars.job, "AGC_Ge_20", 80, 45, Color(0, 0 ,0), 0, 1)
- draw.SimpleText(infoo .. " #2" .. random_v .. k, "HudSelectionText", w - 10, 15, Color(0, 0 ,0), 2, 1)
- end
- local SpawnI = vgui.Create( "SpawnIcon" , BaseDrawWan )
- SpawnI:SetPos( 5, 5 )
- SpawnI:SetSize( 64, 64 )
- SpawnI:SetModel( v:GetModel() )
- SpawnI:SetTooltip( v:isWanted() and v.DarkRPVars.wantedReason or "" )
- if mode then
- local IconExit = vgui.Create( "DButton", BaseDrawWan )
- IconExit:SetSize( 50, 25 )
- IconExit:SetPos( 445, 30 )
- IconExit:SetText("")
- IconExit:SetTooltip( "Unwanted" )
- IconExit.Paint = function( self, w, h)
- if self.on_cursor_entered then
- draw.RoundedBox(4, 0, 0, w, h, Color(110, 0, 0, 255))
- else
- draw.RoundedBox(4, 0, 0, w, h, Color(110, 0, 0, 225))
- end
- draw.SimpleText("Удалить", "AGC_Ta_16", w / 2, h / 2, color_white, 1, 1)
- end
- IconExit.DoClick = function()
- if IsValid(ErrorB) then ErrorB:Remove() end
- net.Start("AGC_Unwanted")
- net.WriteString(v:Name())
- net.SendToServer()
- ErrorFrame( v:Name() .. " " .. lang_agc.Wanted_Unwanted, 475, ScrW() / 2 - 235, ScrH() / 2 - 275 )
- if IsValid(BaseWF) then BaseWF:Remove() end
- timer.Simple(0.1, function() ArrWanFrame() end)
- end
- IconExit.OnCursorEntered = function( self )
- self.on_cursor_entered = true
- end
- IconExit.OnCursorExited = function( self )
- self.on_cursor_entered = false
- end
- end
- BaseWanted:AddItem( BaseDrawWan )
- vide = false
- end
- end
- local RefreshB = vgui.Create( "DButton", BaseWF )
- RefreshB:SetPos( 467, 10 )
- RefreshB:SetText( "" )
- RefreshB:SetSize( 26, 26 )
- RefreshB.Paint = function( self, w, h ) -- {{ user_id }
- draw.RoundedBox(6, 0, 0, w, h, color_white)
- surface.SetDrawColor(color_white)
- surface.SetMaterial(mat_refresh)
- surface.DrawTexturedRect( 5, 5, 16, 16)
- if self.on_cursor_entered then
- draw.RoundedBox(6, 0, 0, w, h, Color(50, 150, 255, 75))
- end
- end
- RefreshB.DoClick = function()
- if IsValid(BaseWF) then BaseWF:Remove() end
- timer.Simple(0.1, function() ArrWanFrame() end)
- end
- local ExitB = vgui.Create( "DButton", BaseWF )
- ExitB:SetPos( 500, 10 )
- ExitB:SetText( "" )
- ExitB:SetSize( 26, 26 )
- ExitB.Paint = function( self, w, h )
- draw.RoundedBox(6, 0, 0, w, h, color_white)
- surface.SetDrawColor(color_white)
- surface.SetMaterial(mat_cross)
- surface.DrawTexturedRect( 5, 5, 16, 16)
- if self.on_cursor_entered then
- draw.RoundedBox(6, 0, 0, w, h, Color(50, 150, 255, 75))
- end
- end
- ExitB.DoClick = function()
- if IsValid(BaseWF) then BaseWF:Remove() end
- if IsValid(BaseDesktop) then BaseDesktop:SetMouseInputEnabled( true ) end
- end
- for k,v in pairs(BaseWF:GetChildren()) do
- if v:GetName() == "DButton" then
- v.OnCursorEntered = function(self)
- self.on_cursor_entered = true
- end
- v.OnCursorExited = function(self)
- self.on_cursor_entered = false
- end
- end
- end
- end
- local function SettingsFrame(ent)
- local lang_agc = AGC.Language[AGC.MainLanguage]
- local BaseSe = vgui.Create( "DFrame" )
- BaseSe:SetSize( 425, 80 )
- BaseSe:SetTitle("")
- BaseSe:SetPos(ScrW() * .5 - (BaseSe:GetWide() / 2), ScrH() * .25)
- BaseSe:SetDraggable( false )
- BaseSe:MakePopup()
- BaseSe:ShowCloseButton( false )
- BaseSe.Paint = function( self, w, h)
- draw.RoundedBox(4, 0, 0, w, h, Color(80, 80, 80, 240))
- draw.SimpleText(lang_agc.Settings_Title, "AGC_Ta_17", 15, 15, color_white, 0, 1)
- draw.SimpleText(lang_agc.Settings_Desc, "AGC_Ta_16", 15, 32.5, color_white, 0, 1)
- draw.SimpleText(lang_agc.Settings_Wall, "AGC_Ta_16", 120, 60, color_white, 0, 1)
- draw.SimpleText("Remember my login", "AGC_Ta_16", 260, 60, color_white, 0, 1)
- end
- local files = file.Find( "backgrounds/*.jpg", "GAME" )
- local ChooseBG = vgui.Create( "DComboBox", BaseSe )
- ChooseBG:SetPos( 15, 50 )
- ChooseBG:SetSize( 100, 20 )
- ChooseBG:SetValue( ent:GetClass() == "apc_computer" and ent:GetWallpaper() or "georgeebizzle_welcome_to_city17_its_safer_here" )
- for k,v in pairs(files) do
- ChooseBG:AddChoice(string.gsub(tostring(v), ".jpg", "") )
- end
- ChooseBG.OnSelect = function( panel, index, value )
- value = value .. ".jpg"
- if IsValid(ent) then
- if ent:GetClass() == "apc_computer" then ent:SetWallpaper(value) end
- if IsValid(BaseDesktop) then
- BaseDesktop.mat_wallpaper = Material("backgrounds/" .. (ent:GetClass() == "apc_computer" and ent:GetWallpaper() or value))
- end
- end
- end
- local ExitB = vgui.Create( "DButton", BaseSe )
- ExitB:SetPos( 390, 10 )
- ExitB:SetText( "" )
- ExitB:SetSize( 26, 26 )
- ExitB.Paint = function( self, w, h )
- draw.RoundedBox(6, 0, 0, w, h, color_white)
- surface.SetDrawColor(color_white)
- surface.SetMaterial(mat_cross)
- surface.DrawTexturedRect( 5, 5, 16, 16)
- if self.on_cursor_entered then
- draw.RoundedBox(6, 0, 0, w, h, Color(50, 150, 255, 75))
- end
- end
- ExitB.DoClick = function()
- if IsValid(BaseSe) then BaseSe:Remove() end
- if IsValid(BaseDesktop) then BaseDesktop:SetMouseInputEnabled( true ) end
- end
- ExitB.OnCursorEntered = function( self )
- self.on_cursor_entered = true
- end
- ExitB.OnCursorExited = function( self )
- self.on_cursor_entered = false
- end
- local CheckB = vgui.Create( "DCheckBox", BaseSe )
- CheckB:SetPos( 240, 52.5 )
- CheckB:SetConVar( "agc_auth_skip" )
- local key_value = GetConVar("agc_auth_skip"):GetInt()
- CheckB:SetValue( key_value )
- end
- local function _ghomes_lister()
- local coowner = "Сожитель"
- local owner = "Владелец"
- local BaseC = vgui.Create( "DFrame" )
- BaseC:SetSize( 600, 515 )
- BaseC:SetTitle("")
- BaseC:Center()
- BaseC:SetDraggable( false )
- BaseC:MakePopup()
- BaseC:ShowCloseButton( false )
- BaseC.Paint = function( self, w, h)
- draw.RoundedBox(4, 0, 0, w, h, Color(80, 80, 80, 240))
- draw.SimpleText("Имущество жителей Los Angeles ", "AGC_Ta_17", 15, 15, color_white, 0, 1)
- draw.SimpleText("Список недвижимости", "AGC_Ta_16", 15, 32.5, color_white, 0, 1)
- end
- local CaseList = vgui.Create( "DListView", BaseC )
- CaseList:SetPos( 10, 100)
- CaseList:SetSize( BaseC:GetWide()-20, 405)
- CaseList:SetMultiSelect( false )
- CaseList:AddColumn("Имя"):SetFixedWidth( 300 )
- CaseList:AddColumn("Статус"):SetFixedWidth( 150 )
- CaseList:AddColumn("Онлайн"):SetFixedWidth( 130 )
- local dcomboHomesList = vgui.Create( "DComboBox", BaseC )
- dcomboHomesList:SetPos( 10, 50 )
- dcomboHomesList:SetSize( 100, 20 )
- dcomboHomesList:SetValue( "Выберите дом" )
- for k, v in pairs (ghomes.list) do
- if not v.isrented then continue end
- dcomboHomesList:AddChoice( v.name, k )
- end
- dcomboHomesList.OnSelect = function( panel, index, value, data )
- CaseList:Clear()
- LocalPlayer():ChatPrint("reee")
- if not ghomes.list[data] then return end
- local house = ghomes.list[data]
- LocalPlayer():ChatPrint("reee2")
- CaseList:AddLine(house.ownername, owner, house.owner and "true" or "false")
- LocalPlayer():ChatPrint("reee3")
- for k, v in pairs(house.friendsname) do
- local ply = player.GetBySteamID( house.friends[k] )
- CaseList:AddLine(v, coowner, ply and "true" or "false")
- end
- end
- local ExitB = vgui.Create( "DButton", BaseC )
- ExitB:SetPos( BaseC:GetWide()-37, 10 )
- ExitB:SetText( "" )
- ExitB:SetSize( 26, 26 )
- ExitB.Paint = function( self, w, h )
- draw.RoundedBox(6, 0, 0, w, h, color_white)
- surface.SetDrawColor(color_white)
- surface.SetMaterial(mat_cross)
- surface.DrawTexturedRect( 5, 5, 16, 16)
- if self.on_cursor_entered then
- draw.RoundedBox(6, 0, 0, w, h, Color(50, 150, 255, 75))
- end
- end
- ExitB.DoClick = function()
- if IsValid(BaseC) then BaseC:Remove() end
- if IsValid(BaseDesktop) then BaseDesktop:SetMouseInputEnabled( true ) end
- end
- end
- surface.CreateFont( "AGC_CaseFA", { font = "Lato", size = 20, weight = 500, } )
- surface.CreateFont( "AGC_CaseFB", { font = "Lato", size = 15, weight = 500, } )
- surface.CreateFont( "AGC_CaseFC", { font = "Lato", size = 35, weight = 500, } )
- surface.CreateFont( "AGC_CaseFD", { font = "Roboto", size = 20, weight = 500, } )
- local function caseFrame(v)
- if not IsValid(v) or not v:IsPlayer() then
- if IsValid(BaseDesktop) then BaseDesktop:SetMouseInputEnabled( true ) end
- return
- end
- local lang_agc = AGC.Language[AGC.MainLanguage]
- local BaseC = vgui.Create("DFrame")
- BaseC:SetSize(570, 270)
- BaseC:SetTitle("")
- BaseC:Center()
- BaseC:SetDraggable(false)
- BaseC:MakePopup()
- BaseC:ShowCloseButton(false)
- BaseC.Paint = function( self, w, h)
- if not IsValid(v) or not IsValid(BaseC) then BaseC:Remove() return end
- draw.RoundedBox(0, 0, 44, w, h - 44, Color(40, 50, 60, 255))
- draw.RoundedBox(0, 0, 0, w, 44, Color(0, 0, 0, 200))
- surface.SetDrawColor( color_black )
- surface.DrawOutlinedRect( 0, 0, w, 44 )
- draw.SimpleText( v:Name() or "Unknown", "AGC_CaseFB", 40, 15, color_white, 0, 1 )
- draw.SimpleText( v.DarkRPVars.job or "Unknown", "AGC_CaseFB", 40, 30, color_white, 0, 1 )
- draw.RoundedBox( 0, 15, 60, w / 2 - 45, 85, color_white)
- surface.SetDrawColor( Color( 120, 120, 120, 255 ) )
- surface.DrawOutlinedRect( 15, 60, w / 2 - 44, 85 )
- draw.SimpleText( lang_agc.driver_li .. ":", "AGC_CaseFD", 20, 72, color_black, 0, 1 )
- local bl = AGC.DriverLicenseEnabled and AGC.DriverLicenseFunction(v) or false
- draw.SimpleText( AGC.DriverLicenseEnabled and (bl and "V" or "X") or lang_agc.Unknown, "AGC_CaseFD", 175, 72, bl and Color(0,160,0) or Color(200,0,0), 0, 1 )
- draw.SimpleText( lang_agc.gun_li .. ":", "AGC_CaseFD", 20, 92, color_black, 0, 1 )
- bl = v:getDarkRPVar("HasGunlicense")
- draw.SimpleText( bl and "V" or "X", "AGC_CaseFD", 175, 92, bl and Color(0,160,0) or Color(200,0,0), 0, 1 )
- bl = v:isWanted()
- draw.SimpleText( "Wanted:", "AGC_CaseFD", 20, 112, color_black, 0, 1 )
- draw.SimpleText( bl and "V" or "X", "AGC_CaseFD", 175, 112, bl and Color(0,160,0) or Color(200,0,0), 0, 1 )
- bl = v:isArrested()
- draw.SimpleText( "Arrested:", "AGC_CaseFD", 20, 132, color_black, 0, 1 )
- draw.SimpleText( bl and "V" or "X", "AGC_CaseFD", 175, 132, bl and Color(0,160,0) or Color(200,0,0), 0, 1 )
- end
- local plyIcon = vgui.Create( "SpawnIcon" , BaseC )
- plyIcon:SetSize( 42, 42 )
- plyIcon:SetPos( 0, 1 )
- plyIcon:SetModel( v:GetModel() )
- plyIcon:SetTooltip( v:Name() or "Unknown" )
- local ArrestList = vgui.Create( "DListView", BaseC )
- ArrestList:SetSize( 275, 85 )
- ArrestList:SetPos( 280, 60 )
- ArrestList:AddColumn( lang_agc.PoliceOfficer ):SetFixedWidth( 100 )
- ArrestList:AddColumn( lang_agc.Time ):SetFixedWidth( 75 )
- ArrestList:AddColumn( "Date" ):SetFixedWidth( 100 )
- local WantedList = vgui.Create( "DListView", BaseC )
- WantedList:SetSize( 540, 100 )
- WantedList:SetPos( 15, 155 )
- WantedList:SetMultiSelect( false )
- WantedList:AddColumn( "Type" ):SetFixedWidth(75)
- WantedList:AddColumn( lang_agc.PoliceOfficer ):SetFixedWidth(125)
- WantedList:AddColumn( lang_agc.Case_Entry )
- for _,l in pairs({ArrestList, WantedList}) do
- l:SetMultiSelect( false )
- niceScrollbar(l)
- end
- net.Start( "AGCLogsGet" )
- net.WriteString(v:SteamID64() or "90071996842377216")
- net.SendToServer()
- net.Receive( "AGCLogsSend", function()
- if IsValid(v) then
- local arrI = net.ReadTable()
- for __, arr in pairs(arrI.a) do
- ArrestList:AddLine( arr[2], arr[3] .. " " .. lang_agc.Hack_Seconds, os.date("%d/%m", arr[4]))
- end
- for __, arr in pairs(arrI.b) do
- WantedList:AddLine(lang_agc.WantedInfo, arr[2], arr[3])
- end
- for __, arr in pairs(arrI.c) do
- WantedList:AddLine(lang_agc.Warrant, arr[2], arr[3])
- end
- end
- end)
- local WantedB = vgui.Create( "DButton", BaseC )
- WantedB:SetSize( 130, 25 )
- WantedB:SetPos( 170, 10 )
- WantedB:SetText("")
- WantedB.Paint = function( self, w, h)
- if not v:isWanted() then
- draw.RoundedBox(0, 0, 0, w, h, Color(120, 0, 0, 255))
- if self.on_cursor_entered then
- draw.RoundedBox(0, 0, 0, w, h, Color(100, 0, 0, 255))
- draw.SimpleText(">> " .. lang_agc.WantedInfo .. " <<", buttonFont, w / 2, h / 2, color_white, 1, 1)
- else
- draw.SimpleText(lang_agc.WantedInfo, buttonFont, w / 2, h / 2, color_white, 1, 1)
- end
- else
- draw.RoundedBox(0, 0, 0, w, h, Color(0, 80, 0, 255))
- if self.on_cursor_entered then
- draw.RoundedBox(0, 0, 0, w, h, Color(0, 60, 0, 255))
- draw.SimpleText(">> " .. lang_agc.Button_Unwanted .. " <<", buttonFont, w / 2, h / 2, color_white, 1, 1)
- else
- draw.SimpleText(lang_agc.Button_Unwanted, buttonFont, w / 2, h / 2, color_white, 1, 1)
- end
- end
- end
- WantedB.DoClick = function()
- if not v:isWanted() then
- net.Start("AGC_Wanted")
- else
- net.Start("AGC_Unwanted")
- end
- net.WriteString(v:Name())
- net.WriteString("Запрос от базы данных")
- net.SendToServer()
- if IsValid(BaseC) then BaseC:Remove() end
- caseFrame(v)
- end
- local WarrantB = vgui.Create( "DButton", BaseC )
- WarrantB:SetSize( 130, 25 )
- WarrantB:SetPos( 325, 10 )
- WarrantB:SetText("")
- WarrantB.Paint = function( self, w, h)
- draw.RoundedBox(0, 0, 0, w, h, Color(120, 0, 0, 255))
- if self.on_cursor_entered then
- draw.RoundedBox(0, 0, 0, w, h, Color(100, 0, 0, 255))
- draw.SimpleText(">> " .. lang_agc.Warrant .. " <<", buttonFont, w / 2, h / 2, color_white, 1, 1)
- else
- draw.SimpleText(lang_agc.Warrant, buttonFont, w / 2, h / 2, color_white, 1, 1)
- end
- end
- WarrantB.DoClick = function()
- net.Start("AGC_Warrant")
- net.WriteString(v:Name() or "Unknown")
- net.WriteString("Запрос от базы данных")
- net.SendToServer()
- if IsValid(BaseC) then BaseC:Remove() end
- caseFrame(v)
- end
- local RefreshB = vgui.Create( "DButton", BaseC )
- RefreshB:SetPos( 505, 10 )
- RefreshB:SetText( "" )
- RefreshB:SetSize( 26, 26 )
- RefreshB.Paint = function( self, w, h )
- draw.RoundedBox(6, 0, 0, w, h, color_white)
- surface.SetDrawColor(color_white)
- surface.SetMaterial(mat_refresh)
- surface.DrawTexturedRect( 5, 5, 16, 16)
- if self.on_cursor_entered then
- draw.RoundedBox(6, 0, 0, w, h, Color(50, 150, 255, 75))
- end
- end
- RefreshB.DoClick = function()
- if IsValid(BaseC) then BaseC:Remove() end
- caseFrame(v)
- end
- local ExitB = vgui.Create( "DButton", BaseC )
- ExitB:SetPos( 535, 10 )
- ExitB:SetText( "" )
- ExitB:SetSize( 26, 26 )
- ExitB.Paint = function( self, w, h )
- draw.RoundedBox(6, 0, 0, w, h, color_white)
- surface.SetDrawColor(color_white)
- surface.SetMaterial(mat_cross)
- surface.DrawTexturedRect( 5, 5, 16, 16)
- if self.on_cursor_entered then
- draw.RoundedBox(6, 0, 0, w, h, Color(50, 150, 255, 75))
- end
- end
- ExitB.DoClick = function()
- if IsValid(BaseC) then BaseC:Remove() end
- if IsValid(BaseDesktop) then BaseDesktop:SetMouseInputEnabled( true ) end
- end
- for k,l in pairs(BaseC:GetChildren()) do
- if l:GetName() == "DButton" then
- l.OnCursorEntered = function(self)
- self.on_cursor_entered = true
- end
- l.OnCursorExited = function(self)
- self.on_cursor_entered = false
- end
- end
- end
- end
- local function DBPolice()
- local lang_agc = AGC.Language[AGC.MainLanguage]
- FCasier = vgui.Create( "DFrame" )
- FCasier:SetSize( 455, 700 )
- FCasier:SetTitle("")
- FCasier:Center()
- FCasier:SetDraggable( false )
- FCasier:MakePopup()
- FCasier:ShowCloseButton( false )
- FCasier.Paint = function( self, w, h)
- draw.RoundedBox(0, 0, 0, w, 40, Color(20, 20, 20, 200) )
- draw.SimpleText(lang_agc.SearchSomeone,"AGC_CaseFA",10,20,Color(255,255,255,255),0,1)
- end
- local CasierPanelList = vgui.Create( "DPanelList", FCasier )
- CasierPanelList:SetSize( 500, 450 )
- CasierPanelList:SetPos( 0, 50 )
- CasierPanelList:SetSpacing(10)
- CasierPanelList:EnableVerticalScrollbar( true )
- CasierPanelList.Paint = function() end
- local RefreshB = vgui.Create( "DButton", FCasier )
- RefreshB:SetPos( 387, 7 )
- RefreshB:SetText( "" )
- RefreshB:SetSize( 26, 26 )
- RefreshB.Paint = function( self, w, h )
- draw.RoundedBox(6, 0, 0, w, h, color_white)
- surface.SetDrawColor(color_white)
- surface.SetMaterial(mat_tick)
- surface.DrawTexturedRect( 5, 5, 16, 16)
- if self.on_cursor_entered then
- draw.RoundedBox(6, 0, 0, w, h, Color(50, 150, 255, 75))
- end
- end
- RefreshB.DoClick = function()
- if IsValid(PanelCheck) then PanelCheck:Remove() end
- end
- local ExitB = vgui.Create( "DButton", FCasier )
- ExitB:SetPos( 420, 7 )
- ExitB:SetText( "" )
- ExitB:SetSize( 26, 26 )
- ExitB.Paint = function( self, w, h )
- draw.RoundedBox(6, 0, 0, w, h, color_white)
- surface.SetDrawColor(color_white)
- surface.SetMaterial(mat_cross)
- surface.DrawTexturedRect( 5, 5, 16, 16)
- if self.on_cursor_entered then
- draw.RoundedBox(6, 0, 0, w, h, Color(50, 150, 255, 75))
- end
- end
- ExitB.DoClick = function()
- if IsValid(FCasier) then FCasier:Remove() end
- if IsValid(BaseDesktop) then BaseDesktop:SetMouseInputEnabled( true ) end
- end
- local SearchEntry = vgui.Create( "DTextEntry", FCasier )
- SearchEntry:SetPos( 175, 10 )
- SearchEntry:SetSize( 200, 20 )
- SearchEntry:SetText( "" )
- SearchEntry.OnChange = function(self)
- for _,v in pairs(player.GetAll()) do
- if self:GetValue() == "" or string.len(self:GetValue()) <= 2 and v.agc_search then
- v.agc_search = false
- if IsValid(PanelCheck) then PanelCheck:Remove() end
- return
- end
- if (string.StartWith( string.lower(v:Name()), string.lower(self:GetValue())) or string.StartWith( string.reverse(string.lower(v:Name())), string.reverse(string.lower(self:GetValue())))) and not v.agc_search and string.len(self:GetValue()) >= 3 then
- PanelCheck = vgui.Create( "DPanel", CasierPanelList )
- PanelCheck:SetSize( 500, 105 )
- PanelCheck:SetPos( 0, 0 )
- PanelCheck.Paint = function() end
- local PanelButton = vgui.Create("DButton", PanelCheck)
- PanelButton:SetSize(500,105)
- PanelButton:SetPos(0,0)
- PanelButton:SetText("")
- PanelButton:SetTooltip(lang_agc.SearchInfo)
- PanelButton.Paint = function(menu, w, h)
- if menu.on_cursor_entered then
- draw.RoundedBox(0, 0, 0, w, h, Color(20, 20, 20, 235) )
- else
- draw.RoundedBox(0, 0, 0, w, h, Color(20, 20, 20, 200) )
- end
- draw.SimpleTextOutlined( v:Name(), "AGC_CaseFC", 10, 20, team.GetColor(), 0, 1, 0.75, color_black )
- draw.SimpleText(v:Name() .. " occupies the job " .. v.DarkRPVars.job .. ".","AGC_CaseFB",10,47,Color(255,255,255,255),0,1)
- draw.SimpleText(lang_agc.SearchPerm,"AGC_CaseFB",10,70,Color(255,255,255,255),0,1)
- draw.SimpleText(lang_agc.SearchInfo,"AGC_CaseFB",10,85,Color(255,255,255,255),0,1)
- end
- PanelButton.DoClick = function()
- if IsValid(FCasier) then FCasier:Remove() end
- caseFrame(v)
- end
- PanelButton.OnCursorEntered = function(menu)
- menu.on_cursor_entered = true
- end
- PanelButton.OnCursorExited = function(menu)
- menu.on_cursor_entered = false
- end
- if not v.agc_search then
- local npc_icon = vgui.Create( "DModelPanel", PanelCheck )
- npc_icon:SetPos( 340, -10 )
- npc_icon:SetSize( 125, 125 )
- npc_icon:SetModel( v:GetModel() )
- npc_icon:SetTooltip(v:GetName())
- npc_icon:SetMouseInputEnabled(false)
- npc_icon:SetKeyboardInputEnabled(false)
- npc_icon.LayoutEntity = function() return end
- npc_icon:SetFOV( 58 )
- npc_icon:SetCamPos( Vector( 25, 0, 62 ) )
- npc_icon:SetLookAt( Vector( 0, 0, 65 ) )
- v.agc_search = true
- end
- CasierPanelList:AddItem( PanelCheck )
- end
- end
- end
- for k,v in pairs(FCasier:GetChildren()) do
- if v:GetName() == "DButton" then
- v.OnCursorEntered = function(self)
- self.on_cursor_entered = true
- end
- v.OnCursorExited = function(self)
- self.on_cursor_entered = false
- end
- end
- end
- end
- local function ComplaintFrame()
- local lang_agc = AGC.Language[AGC.MainLanguage]
- local isHacked = isNearAHackedComputer(LocalPlayer())
- local BaseC = vgui.Create( "DFrame" )
- BaseC:SetSize( 700, 475 )
- BaseC:SetTitle("")
- BaseC:Center()
- BaseC:SetDraggable( false )
- BaseC:MakePopup()
- BaseC:ShowCloseButton( false )
- BaseC.Paint = function( self, w, h)
- draw.RoundedBox(4, 0, 0, w, h, Color(80, 80, 80, 240))
- draw.SimpleText(lang_agc.Complaint_Title, "AGC_Ta_17", 15, 15, color_white, 0, 1)
- draw.SimpleText(lang_agc.Complaint_Desc, "AGC_Ta_16", 15, 32.5, color_white, 0, 1)
- end
- local CaseList = vgui.Create( "DListView", BaseC )
- CaseList:SetPos( 10, 60)
- CaseList:SetSize( 680, 405)
- CaseList:SetMultiSelect( false )
- CaseList:AddColumn(lang_agc.Case_Identity):SetFixedWidth( 125 )
- CaseList:AddColumn(lang_agc.Case_Date):SetFixedWidth( 100 )
- CaseList:AddColumn(lang_agc.Case_Reporter):SetFixedWidth( 125 )
- CaseList:AddColumn(lang_agc.Case_Entry)
- net.Start( "CaseInit" )
- net.SendToServer()
- local data = {}
- net.Receive( "CaseReload", function()
- data = net.ReadTable()
- if data then
- for k,v in pairs(data) do
- CaseList:AddLine(v.target, os.date("%d/%m - %H:%M", v.date), v.reporter, v.reason, k)
- end
- end
- end)
- CaseList.OnRowRightClick = function ( self, row )
- local selectact = DermaMenu()
- selectact:AddOption( lang_agc.WantedInfo, function() CmdMenu( lang_agc.Wanted, lang_agc.Cmd_Desc, "AGC_Wanted", "1", "2" ) end )
- :SetIcon("icon16/exclamation.png")
- selectact:AddOption( lang_agc.Case_Delete, function()
- if IsValid(ErrorB) then ErrorB:Remove() end
- if AGC.DeleteComplaint and not table.HasValue( AGC.DeleteComplaint, team.GetName(LocalPlayer():Team()) ) and not isHacked then
- ErrorFrame( lang_agc.Case_CDelComp, 390, ScrW() / 2 - 200, ScrH() / 2 - 275 )
- return
- end
- local id = tonumber(CaseList:GetLine(row):GetValue(5))
- if id and data[id] then
- net.Start( "DeleteCase" )
- net.WriteTable(data[id])
- net.SendToServer()
- self:RemoveLine(row)
- ErrorFrame( lang_agc.Case_DelMsg, 350, ScrW() / 2 - 200, ScrH() / 2 - 275 )
- end
- end)
- :SetIcon("icon16/database_delete.png")
- selectact:Open()
- end
- local RefreshB = vgui.Create( "DButton", BaseC )
- RefreshB:SetPos( 630, 10 )
- RefreshB:SetText( "" )
- RefreshB:SetSize( 26, 26 )
- RefreshB.Paint = function( self, w, h )
- draw.RoundedBox(6, 0, 0, w, h, color_white)
- surface.SetDrawColor(color_white)
- surface.SetMaterial(mat_refresh)
- surface.DrawTexturedRect( 5, 5, 16, 16)
- if self.on_cursor_entered then
- draw.RoundedBox(6, 0, 0, w, h, Color(50, 150, 255, 75))
- end
- end
- RefreshB.DoClick = function()
- CaseList:Clear()
- net.Start( "CaseInit" )
- net.SendToServer()
- net.Receive( "CaseReload", function()
- data = net.ReadTable()
- if data then
- for k,v in pairs(data) do
- CaseList:AddLine(v.target, os.date("%d/%m - %H:%M", v.date), v.reporter, v.reason, k)
- end
- end
- end)
- end
- local ExitB = vgui.Create( "DButton", BaseC )
- ExitB:SetPos( 663, 10 )
- ExitB:SetText( "" )
- ExitB:SetSize( 26, 26 )
- ExitB.Paint = function( self, w, h )
- draw.RoundedBox(6, 0, 0, w, h, color_white)
- surface.SetDrawColor(color_white)
- surface.SetMaterial(mat_cross)
- surface.DrawTexturedRect( 5, 5, 16, 16)
- if self.on_cursor_entered then
- draw.RoundedBox(6, 0, 0, w, h, Color(50, 150, 255, 75))
- end
- end
- ExitB.DoClick = function()
- if IsValid(BaseC) then BaseC:Remove() end
- if IsValid(BaseDesktop) then BaseDesktop:SetMouseInputEnabled( true ) end
- end
- end
- function BaseComputer(ent)
- if ent and (ent:GetClass() == "apc_computer" and ent:GetWallpaper() == "") then ent:SetWallpaper("georgeebizzle_welcome_to_city17_its_safer_here.jpg") end
- if IsValid(BaseDesktop) then BaseDesktop:Remove() end
- local isHacked = isNearAHackedComputer(LocalPlayer())
- BaseDesktop = vgui.Create( "DFrame" )
- local buttonFont, littlescreen
- if ScrW() <= 1440 or ScrH() <= 800 then
- BaseDesktop:SetSize( ScrW() / 1.375, ScrH() / 1.35 )
- buttonFont = "AGC_Ge_10"
- littlescreen = true
- else
- BaseDesktop:SetSize( 1440, 800 )
- buttonFont = "AGC_Ge_15"
- littlescreen = false
- end
- BaseDesktop:SetTitle("")
- BaseDesktop:Center()
- BaseDesktop:SetDraggable( false )
- BaseDesktop:MakePopup()
- BaseDesktop:ShowCloseButton( false )
- BaseDesktop.mat_wallpaper = Material("backgrounds/" .. (ent:GetClass() == "apc_computer" and ent:GetWallpaper() or "georgeebizzle_welcome_to_city17_its_safer_here.jpg"))
- local x, y = BaseDesktop:GetWide(), BaseDesktop:GetTall()
- BaseDesktop.Paint = function( self, w, h)
- draw.RoundedBox(4, 0, 0, w, h, Color(80, 80, 80, 255))
- surface.SetDrawColor(color_white)
- surface.SetMaterial(self.mat_wallpaper)
- surface.DrawTexturedRect( 10, 10, w - 20, h - 20)
- draw.RoundedBox(4, 10, y - 55, w - 20, 45, Color(0, 0, 0, 200))
- draw.SimpleText( os.date( "%H:%M" , Timestamp ), "AGC_Ta_17", w - 60, h - 42.5, color_white, 1, 1 )
- draw.SimpleText( os.date( "%d/%m/%Y" , Timestamp ), "AGC_Ta_17", w - 60, h - 25, color_white, 1, 1 )
- draw.SimpleText( string.upper(GetConVar("gmod_language"):GetString()), "AGC_Ta_17", w - 120, h - 32.5, color_white, 1, 1 )
- draw.SimpleText( isHacked and "John Smith" or LocalPlayer():Name(), "AGC_Ta_17", 60, h - 40, color_white, 0, 1 )
- draw.SimpleText( isHacked and "Unknown" or LocalPlayer().DarkRPVars.job, "AGC_Ta_17", 60, h - 25, color_white, 0, 1 )
- if isHacked then
- surface.SetDrawColor( Color(255,0,0,255) )
- surface.SetMaterial(mat_ano)
- surface.DrawTexturedRect( w - 512, 50, 512, 256)
- end
- end
- local plyIcon = vgui.Create( "SpawnIcon" , BaseDesktop )
- plyIcon:SetSize( 45, 45 )
- plyIcon:SetPos( 10, y - 55 )
- plyIcon:SetModel( isHacked and "models/error.mdl" or LocalPlayer():GetModel() )
- plyIcon:SetTooltip( isHacked and "ERROR SYSTEM" or LocalPlayer():Name() )
- local lang_agc = AGC.Language[AGC.MainLanguage]
- local xbu = 0.13
- local bsize = ScrW() * 0.078125
- local ButtonExit = vgui.Create( "DButton", BaseDesktop )
- ButtonExit:SetSize( bsize, 25 )
- ButtonExit:SetPos( x * xbu, y - 45 )
- ButtonExit:SetText("")
- ButtonExit.Paint = function( self, w, h)
- draw.RoundedBox(4, 0, 0, w, h, self.on_cursor_entered and Color(180, 0, 0, 255) or Color(180, 0, 0, 200))
- draw.SimpleText(self.on_cursor_entered and ">> ".. lang_agc.Button_Disconnect .." <<" or lang_agc.Button_Disconnect, buttonFont, w / 2, h / 2, color_white, 1, 1)
- end
- ButtonExit.DoClick = function()
- if IsValid(BaseDesktop) then BaseDesktop:Remove() end
- end
- local WantedB = vgui.Create( "DButton", BaseDesktop )
- WantedB:SetSize( bsize, 25 )
- WantedB:SetPos( x * xbu * 2, y - 45 )
- WantedB:SetText("")
- WantedB.Paint = function( self, w, h)
- draw.RoundedBox(4, 0, 0, w, h, self.on_cursor_entered and Color(120, 0, 0, 255) or Color(120, 0, 0, 200))
- draw.SimpleText(self.on_cursor_entered and ">> " .. lang_agc.Wanted .. " <<" or lang_agc.Wanted, buttonFont, w / 2, h / 2, color_white, 1, 1)
- end
- WantedB.DoClick = function()
- CmdMenu( lang_agc.Wanted, lang_agc.Cmd_Desc, "AGC_Wanted", "1", "2" )
- if IsValid(BaseDesktop) then BaseDesktop:SetMouseInputEnabled( false ) end
- end
- local WarrantB = vgui.Create( "DButton", BaseDesktop )
- WarrantB:SetSize( bsize, 25 )
- WarrantB:SetPos( x * xbu * 3, y - 45 )
- WarrantB:SetText("")
- WarrantB.Paint = function( self, w, h)
- draw.RoundedBox(4, 0, 0, w, h, self.on_cursor_entered and Color(120, 0, 0, 255) or Color(120, 0, 0, 200))
- draw.SimpleText(self.on_cursor_entered and ">> " .. lang_agc.Button_Warrant .. " <<" or lang_agc.Button_Warrant, buttonFont, w / 2, h / 2, color_white, 1, 1)
- end
- WarrantB.DoClick = function()
- CmdMenu( lang_agc.Button_Warrant, lang_agc.Cmd_Desc, "AGC_Warrant", "1" )
- if IsValid(BaseDesktop) then BaseDesktop:SetMouseInputEnabled( false ) end
- end
- local UnWarrantB = vgui.Create( "DButton", BaseDesktop )
- UnWarrantB:SetSize( bsize, 25 )
- UnWarrantB:SetPos( x * xbu * 4, y - 45 )
- UnWarrantB:SetText("")
- UnWarrantB.Paint = function( self, w, h)
- draw.RoundedBox(4, 0, 0, w, h, self.on_cursor_entered and Color(0, 80, 0, 255) or Color(0, 80, 0, 200))
- draw.SimpleText(self.on_cursor_entered and ">> " .. lang_agc.Button_Unwarrant .. " <<" or lang_agc.Button_Unwarrant, buttonFont, w / 2, h / 2, color_white, 1, 1)
- end
- UnWarrantB.DoClick = function()
- CmdMenu( lang_agc.Button_Unwarrant, lang_agc.Cmd_Desc, "AGC_Unwarrant", "2" )
- if IsValid(BaseDesktop) then BaseDesktop:SetMouseInputEnabled( false ) end
- end
- local UnWantedB = vgui.Create( "DButton", BaseDesktop )
- UnWantedB:SetSize( bsize, 25 )
- UnWantedB:SetPos( x * xbu * 5, y - 45 )
- UnWantedB:SetText("")
- UnWantedB.Paint = function( self, w, h)
- draw.RoundedBox(4, 0, 0, w, h, self.on_cursor_entered and Color(0, 80, 0, 255) or Color(0, 80, 0, 200))
- draw.SimpleText(self.on_cursor_entered and ">> " .. lang_agc.Button_Unwanted .. " <<" or lang_agc.Button_Unwanted, buttonFont, w / 2, h / 2, color_white, 1, 1)
- end
- UnWantedB.DoClick = function()
- CmdMenu( lang_agc.Button_Unwanted, lang_agc.Cmd_Desc, "AGC_Unwanted", "2", "1" )
- if IsValid(BaseDesktop) then BaseDesktop:SetMouseInputEnabled( false ) end
- end
- local AgendaB = vgui.Create( "DButton", BaseDesktop )
- AgendaB:SetSize( bsize, 25 )
- AgendaB:SetPos( x * xbu * 6, y - 45 )
- AgendaB:SetText("")
- AgendaB.Paint = function( self, w, h)
- draw.RoundedBox(4, 0, 0, w, h, self.on_cursor_entered and Color(0, 80, 120, 255) or Color(0, 80, 150, 200))
- draw.SimpleText(self.on_cursor_entered and ">> " .. lang_agc.Button_Agenda .. " <<" or lang_agc.Button_Agenda, buttonFont, w / 2, h / 2, color_white, 1, 1)
- end
- AgendaB.DoClick = function()
- if IsValid(ErrorB) then ErrorB:Remove() end
- if not LocalPlayer():isMayor() then
- ErrorFrame( lang_agc.Agenda_Error, 250, ScrW() * 0.68, ScrH() * 0.782 )
- return
- end
- CmdMenu( lang_agc.Button_Agenda, lang_agc.Cmd_Agenda_Desc, "/agenda", "3" )
- if IsValid(BaseDesktop) then BaseDesktop:SetMouseInputEnabled( false ) end
- end
- for k,v in pairs( Icon_Base ) do
- local Bib = vgui.Create( "DPanel", BaseDesktop )
- Bib:SetSize( x * 0.0694, y * 0.1125)
- Bib:SetPos( x * 0.013, y * 0.125 * k - 60 )
- Bib.Paint = function(self, w, h)
- surface.SetDrawColor(color_white)
- surface.SetMaterial(Material( v.Icon ))
- surface.DrawTexturedRect( 16, 4, y * 0.08, y * 0.08)
- if littlescreen then
- draw.SimpleText(v.Title, "AGC_Ta_13", w / 2 + 5, h * 0.85, color_white, 1, 1)
- else
- draw.SimpleText(v.Title, "AGC_Ta_13", w / 2 - 1.5, h * 0.85, color_white, 1, 1)
- end
- end
- local IconB = vgui.Create( "DButton", Bib )
- IconB:SetPos( 16, 0 )
- IconB:SetText( "" )
- IconB:SetSize( x * 0.0444, y * 0.1125 )
- IconB.Paint = function( self, w, h)
- if self.on_cursor_entered then
- draw.RoundedBox(6, 0, 0, w, h, Color(255, 255, 255, 7))
- end
- end
- IconB.DoClick = function()
- if v.Action == "1" then
- AGCLogsFrame()
- elseif v.Action == "2" then
- ComplaintFrame()
- elseif v.Action == "3" then
- ArrWanFrame(true)
- elseif v.Action == "4" then
- ArrWanFrame(false)
- elseif v.Action == "5" then
- DBPolice()
- elseif v.Action == "6" then
- SettingsFrame(ent)
- elseif v.Action == "7" then
- _ghomes_lister()
- end
- if IsValid(BaseDesktop) then BaseDesktop:SetMouseInputEnabled( false ) end
- end
- IconB.OnCursorEntered = function( self )
- self.on_cursor_entered = true
- end
- IconB.OnCursorExited = function( self )
- self.on_cursor_entered = false
- end
- end
- for k,v in pairs(BaseDesktop:GetChildren()) do
- if v:GetName() == "DButton" then
- v.OnCursorEntered = function(self)
- self.on_cursor_entered = true
- end
- v.OnCursorExited = function(self)
- self.on_cursor_entered = false
- end
- end
- end
- end
- net.Receive("CaseMenu", function()
- local lang_agc = AGC.Language[AGC.MainLanguage]
- local BaseNCase = vgui.Create( "DFrame" )
- BaseNCase:SetSize( 540 , 215)
- BaseNCase:SetTitle("")
- BaseNCase:Center()
- BaseNCase:SetDraggable( false )
- BaseNCase:MakePopup()
- BaseNCase:ShowCloseButton( false )
- BaseNCase.Paint = function( self, w, h)
- draw.RoundedBox(4, 0, 0, w, h, color_black )
- draw.RoundedBox(4, 1, 1, w - 2, h - 2, Color(50, 50, 50, 255) )
- draw.RoundedBox(4, 9, 9, w - 18, h - 18, color_black)
- draw.RoundedBox(4, 10, 10, w - 20, h - 20, Color(20, 20, 20, 255))
- draw.SimpleText( lang_agc.Case_Frame, "AGC_Bu_20", 200, 30, color_white, 1, 1)
- draw.SimpleText( lang_agc.Case_Frame_Desc, "AGC_Bu_17", 200, 50, color_white, 1, 1)
- --draw.SimpleText("C:/Police/>", "BudgetLabel", 20, 20, Color(255, 255, 255, 10))
- if tooletter then
- draw.SimpleText(lang_agc.Case_ErrorLon, "AGC_Bu_17", 200, 145, Color(180, 0, 0), 1, 1)
- end
- end
- local ExitB = vgui.Create( "DButton", BaseNCase )
- ExitB:SetSize( 100, 35 )
- ExitB:SetPos( 250, 160 )
- ExitB:SetText("")
- ExitB.Paint = function( self, w, h)
- draw.RoundedBox(2, 0, 0, w, h, Color(180, 0, 0, 225))
- draw.SimpleText(lang_agc.Case_Abort, "BudgetLabel", w / 2, h / 2, color_white, 1, 1)
- end
- ExitB.DoClick = function()
- if IsValid(BaseNCase) then BaseNCase:Remove() end
- end
- tooletter = false
- local EntryArg = vgui.Create( "DTextEntry", BaseNCase )
- EntryArg:SetPos( 50, 75 )
- EntryArg:SetText( "" )
- EntryArg:SetSize( 300, 30 )
- EntryArg.Paint = function( self, w, h)
- draw.RoundedBox(4, 0, 0, w, h, color_white)
- draw.SimpleText(self:GetValue(), "AGC_Bu_17", w / 2, h / 2, color_black, 1, 1)
- self:DrawTextEntryText(color_black, self.m_colHighlight, color_black)
- end
- local select_plyc = vgui.Create( "DComboBox", BaseNCase )
- select_plyc:SetPos(132.5, 115)
- select_plyc:SetSize(125, 20)
- for _,v in pairs( player.GetAll() ) do
- select_plyc:AddChoice(v:Name())
- end
- local SendB = vgui.Create( "DButton", BaseNCase )
- SendB:SetSize( 100, 35 )
- SendB:SetPos( 50, 160 )
- SendB:SetText("")
- SendB.Paint = function( self, w, h)
- draw.RoundedBox(2, 0, 0, w, h, Color(0, 80, 0, 225))
- draw.SimpleText(lang_agc.Button_Send, "BudgetLabel", w / 2, h / 2, color_white, 1, 1)
- end
- SendB.DoClick = function()
- local target = select_plyc:GetSelected()
- local reason = EntryArg:GetValue()
- if reason and string.len( reason ) <= 44 and target and string.len(target) <= 30 and IsValid(LocalPlayer()) then
- if IsValid(BaseNCase) then BaseNCase:Remove() end
- net.Start("agc:createCase")
- net.WriteTable({target, reason})
- net.SendToServer()
- else
- tooletter = true
- end
- end
- local npc_icon = vgui.Create( "DModelPanel", BaseNCase )
- npc_icon:SetPos( 380 , 5 )
- npc_icon:SetSize( 150 , 200 )
- npc_icon:SetModel( AGC.NPC_Model )
- npc_icon.LayoutEntity = function() return false end
- npc_icon:SetFOV( 40 )
- npc_icon:SetCamPos( Vector( 25, 5, 62 ) )
- npc_icon:SetLookAt( Vector( 0, 0, 62 ) )
- npc_icon.Entity:SetEyeTarget( Vector( 150, 0, 50 ) )
- end)
- hook.Add("InitPostEntity", "LoadPoliceFonts", function()
- surface.CreateFont( "AGC_Ge_75", { font = "Georgia", size = 75, weight = 400, } )
- surface.CreateFont( "AGC_Ge_15", { font = "Georgia", size = 15, weight = 400, } )
- surface.CreateFont( "AGC_Ge_10", { font = "Georgia", size = 12, weight = 400, } )
- surface.CreateFont( "AGC_Ge_20", { font = "Georgia", size = 20, weight = 400, } )
- surface.CreateFont( "AGC_Ge_30", { font = "Georgia", size = 30, weight = 400, } )
- surface.CreateFont( "AGC_Bu_20", { font = "BudgetLabel", size = 20, weight = 400, } )
- surface.CreateFont( "AGC_Bu_17", { font = "BudgetLabel", size = 17, weight = 400, } )
- surface.CreateFont( "AGC_Ta_17", { font = "Tahoma", size = 17.5, weight = 500, } )
- surface.CreateFont( "AGC_Ta_16", { font = "Tahoma", size = 16, weight = 500, } )
- surface.CreateFont( "AGC_Ta_13", { font = "Tahoma", size = 13, weight = 500, } )
- surface.CreateFont( "AGC_La_22", { font = "Lato", size = 22.5, weight = 500, } )
- surface.CreateFont( "AGC_Hack_25", { font = "Lato", size = 25, weight = 500, } )
- end)
- hook.Add( "PopulateToolMenu", "Bind Vehicle Button", function()
- spawnmenu.AddToolMenuOption( "Utilities", "AGC", "Bind AGC", "Bind Key AGC", "", "", function (menu)
- menu:AddControl( "Label", { Text = "When you press this bind you access the police computer. (You need to be in police vehicle)" } )
- menu:AddControl( "Numpad", { Label = "Open AGC", Command = "agc_key_vehicle" } )
- end)
- end)
- hook.Add( "PlayerBindPress", "Open Menu Vehicle", function()
- if input.IsKeyDown(GetConVar("agc_key_vehicle"):GetInt()) then
- local ply = LocalPlayer()
- if IsValid( ply ) and ply:InVehicle() then
- local plyvehicle = ply:GetVehicle()
- if IsValid(plyvehicle) and ((plyvehicle:GetClass() == "prop_vehicle_jeep" and table.HasValue( AGC.VehicleAccess, plyvehicle:GetModel())) or (IsValid(plyvehicle:GetParent()) and plyvehicle:GetParent():IsVehicle())) then
- AuthFrame(plyvehicle) -- {{ user_id }
- return
- end
- end
- end
- end)
- concommand.Add("agc_exit", function()
- if IsValid(BaseDesktop) then BaseDesktop:Remove() end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement