Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local a="igs.20"local b="igs.18"local c="igs.40"local d="igs.15"local e="igs.18"local f="igs.18"local g="igs.22"local h="igs.18"local i="igs.20"local j="igs.17"local k="igs.40"local l="igs.20"local m="igs.15"local n="igs.15"local o="igs.20"local p="igs.17"local q="igs.17"local r="igs.17"local s=r local t="igs.17"local u="igs.22"local v="igs.18"local w="igs.15"local x="igs.15"local y="igs.18"local z="igs.24"local A="igs.18"local B=A local C="igs.18"local function D(Cb)return Cb end local function E(Cb)return Material(Cb,"smooth")end local F=E("hrp/gui/donate/close.png")local G=E("hrp/gui/donate/shop.png")local H=E("hrp/gui/donate/shop_unactive.png")local I=E("hrp/gui/donate/profile.png")local J=E("hrp/gui/donate/profile_unactive.png")local K=E("hrp/gui/donate/go.png")local L=E("hrp/gui/donate/grad.png")local M=E("hrp/gui/donate/buy.png")local N=E("hrp/gui/donate/heart.png")local O=E("hrp/gui/donate/coupon.png")local P={}function P.FancyTerm(Cb)local Db=IGS.TermToStr(Cb)if Db=="бесконечно"then return"НАВСЕГДА"elseif Db=="единоразово"then return"ОДНОРАЗОВО"else return"НА "..Db end end file.CreateDir("dc_hellspace")local Q={["close.png"]="https://i.imgur.com/e0RfeLy.png",["closeHover.png"]="https://i.imgur.com/xJnHQ9f.png",["store.png"]="https://i.imgur.com/ZRpEWpo.png",["inventory.png"]="https://i.imgur.com/Wn1LDOd.png",["profile.png"]="https://i.imgur.com/bPOh33q.png",["cart.png"]="https://i.imgur.com/4z9RWdB.png",["deposit.png"]="https://i.imgur.com/U81QgPm.png",["logo.png"]="blob:https://imgur.com/50b71a39-5b9f-44a7-8862-13c06c1c3dd1",["transactions.png"]="https://i.imgur.com/OTkRDpU.png",["smile.png"]="https://i.imgur.com/gKQKBf9.png",}local R={}timer.Simple(0.2,function()for Cb,Db in pairs(Q)do R[Cb]=R[Cb]or Material("../data/dc_hellspace/"..Cb)if R[Cb]:IsError()then http.Fetch(Db,function(Eb)file.Write("dc_hellspace/"..Cb,Eb)end)timer.Simple(4,function()R[Cb]=Material("../data/dc_hellspace/"..Cb)end)end end end)local S local T={{name="Магазин",icon="store.png",panel="dc_cloudshop",},{name="Инвентарь",icon="inventory.png",panel="dc_cloudinventory",},{name="Транкзакции",icon="transactions.png",panel="dc_transactions",},{name="Профиль",icon="profile.png",panel="dc_cloudprofile",},}local function U()local Cb={}Cb["Все"]=Cb["Все"]or{}for Db,Eb in pairs(IGS.GetItems())do if not Eb:CanSee(LocalPlayer())then goto CONTT end if Eb.isnull then goto CONTT end Cb[Eb.category or"Прочее"]=Cb[Eb.category or"Прочее"]or{}table.insert(Cb[Eb.category or"Прочее"],Eb)table.insert(Cb["Все"],Eb)local Fb=""if Eb.image_url then Fb=string.find(Eb.image_url,".png")and".png"or".jpg"end R[Eb.uid]=Material("../data/dc_hellspace/"..Eb.uid..Fb)if Eb.image_url and R[Eb.uid]:IsError()then http.Fetch(Eb.image_url,function(Gb)file.Write("dc_hellspace/"..Eb.uid..Fb,Gb)end)timer.Simple(4,function()R[Eb.uid]=Material("../data/dc_hellspace/"..Eb.uid..Fb)end)end::CONTT::end return Cb end timer.Simple(0.5,U)local function V(Cb,Db)return math.Truncate(tonumber(Cb)or Db,2)end local W={{name="Банк. карта",uniqueID="bankcard",url="https://data.hellspace.ru/deposit/index.php?serverID="..GetGlobalString("d_serverid","site").."&steamID="..(CLIENT and LocalPlayer():SteamID()or""),isParamentrs=true,advWide=70,notify="Поддерживаются все карты. Доступна так же оплата через СБП и Яндекс Pay.",icon="edQPOqu",desc="Доступно также: Банк. карты(Visa, Union Pay, Mastercard, Maestro)"},}local X local Y=Color(30,30,30,200)local Z=Color(45,45,45,200)local function ab(Cb)if IsValid(X)then X:Remove()end X=vgui.Create("PIXEL.Frame")X:SetSize(0,200)X:MakePopup()X:SetSizable(false)X:SetTitle("Выберите способ пополнения")local Db=0 for Eb,Fb in pairs(W)do local Gb=hook.Run("DC_PaymentShow",Fb.uniqueID)if(Gb~=nil)and(Gb==false)then goto CONTTT end local Hb=vgui.Create("Panel",X)Hb:Dock(LEFT)Hb:SetWide(200)Hb:DockMargin(1,1,1,1)Hb:SetCursor('hand')Hb:SetTooltip(Fb.desc)Hb.Paint=function(Ib,Jb,Kb)draw.RoundedBox(3,0,0,Jb,Kb,Ib:IsHovered()and Z or Y)PIXEL.DrawImgur(10,10,Jb-20,Kb-20,Fb.icon,color_white)end Hb.OnMousePressed=function()if Fb.notify then Derma_Query(Fb.notify,"Уведомление","Понял",function()gui.OpenURL(Fb.isParamentrs and string.format(Fb.url,LocalPlayer():SteamID(),Cb)or Fb.url)end)else gui.OpenURL(Fb.isParamentrs and string.format(Fb.url,LocalPlayer():SteamID(),Cb)or Fb.url)end end Db=Db+Hb:GetWide()+2::CONTTT::end X:SetWide(Db)X:Center()end local bb function IGS.WIN.Deposit(Cb)if IsValid(bb)then return end Cb=tonumber(Cb)hook.Run("IGS.OnDepositWinOpen",Cb)local Db=true local Eb=math.max(IGS.GetMinCharge(),V(Cb,0))bb=uigs.Create("igs_frame",function(self)self:SetSize(450,400)self:RememberLocation("igs_deposit")self:SetTitle("Автодонат от gm-donate.ru")self:MakePopup()uigs.Create("DLabel",function(Kb)Kb:SetSize(Db and 450 or 180,25)Kb:SetPos(Db and 0 or 10,self:GetTitleHeight())Kb:SetText(Db and"Введите ниже сумму пополнения счета"or"Рубли")Kb:SetFont("igs.22")Kb:SetTextColor(IGS.col.HIGHLIGHTING)Kb:SetContentAlignment(2)end,self)self.real_m=uigs.Create("DTextEntry",self)self.real_m:SetPos(10,50)self.real_m:SetSize(Db and 450-10-10 or 180,30)self.real_m:SetNumeric(true)self.real_m.OnChange=function(Kb)if Db then return end self.curr_m:SetValue(IGS.PriceInCurrency(V(Kb:GetValue(),0)))end self.real_m.Think=function()local Kb=tonumber(self.real_m:GetValue())if Db then self.purchase:SetText("Пополнить счет на "..V(Kb,0).." руб")else local Lb=tonumber(self.curr_m:GetValue())self.purchase:SetText("Пополнить на "..IGS.SignPrice(V(Lb,0)).." за "..V(Kb,0).." руб")end self.purchase:SetActive(Kb and Kb>0)end if not Db then uigs.Create("DLabel",function(Kb)Kb:SetSize(50,30)Kb:SetPos(200,50)Kb:SetText("=")Kb:SetFont("igs.40")Kb:SetTextColor(IGS.col.TEXT_HARD)Kb:SetContentAlignment(5)end,self)end self.purchase=uigs.Create("igs_button",function(Kb)local Lb,Mb=self.real_m:GetPos()Kb:SetSize(400,40)Kb:SetActive(true)Kb:SetPos((self:GetWide()-Kb:GetWide())/2,Mb+self.real_m:GetTall()+10)Kb.DoClick=function()local Nb=V(self.real_m:GetValue())if not Nb then self.log:AddRecord("Указана некорректная сумма пополнения",false)return elseif Nb<Eb then self.log:AddRecord("Минимальная сумма пополнения "..PL_MONEY(Eb),false)return end self.log:AddRecord("Запрос цифровой подписи запроса от сервера...")IGS.GetPaymentURL(Nb,function(Ob)ab(Nb)if not IsValid(self)then return end self.log:AddRecord("Подпись получена. начинаем процесс оплаты")timer.Simple(.7,function()self.log:AddRecord("Счет пополнится моментально или после перезахода")end)end)end end,self)if not Db then uigs.Create("DLabel",function(Kb)Kb:SetSize(180,25)Kb:SetPos(self:GetWide()-10-Kb:GetWide(),self:GetTitleHeight())Kb:SetText(IGS.C.CURRENCY_NAME)Kb:SetFont("igs.22")Kb:SetTextColor(IGS.col.HIGHLIGHTING)Kb:SetContentAlignment(2)end,self)self.curr_m=uigs.Create("DTextEntry",self)self.curr_m:SetPos(self:GetWide()-10-self.real_m:GetWide(),50)self.curr_m:SetSize(self.real_m:GetWide(),self.real_m:GetTall())self.curr_m:SetNumeric(true)self.curr_m.OnChange=function(Kb)self.real_m:SetValue(IGS.RealPrice(V(Kb:GetValue(),0)))end end self.real_m:SetValue(Eb)self.real_m:OnChange()self.log=uigs.Create("igs_scroll",function(Kb)Kb:SetSize(250,200)Kb:SetPos(10,self:GetTall()-Kb:GetTall()-10)function Kb:AddRecord(Lb,Mb)local Nb=(Mb==true and IGS.col.LOG_SUCCESS)or(Mb==false and IGS.col.LOG_ERROR)or IGS.col.LOG_NORMAL if Mb or Mb==false then self:GetParent():RequestFocus()self:GetParent():MakePopup()end return Kb:AddItem(uigs.Create("Panel",function(Ob)Lb="> "..os.date("%H:%M:%S",os.time()).."\n"..Lb local Pb=2 for Qb,Rb in ipairs(string.Wrap("igs.18",Lb,Kb:GetWide()-0-0))do uigs.Create("DLabel",function(Sb)Sb:SetPos(0,Pb)Sb:SetText(Rb)Sb:SetFont("igs.18")Sb:SizeToContents()Sb:SetTextColor(Qb==1 and IGS.col.HIGHLIGHTING or Nb)Pb=Pb+Sb:GetTall()end,Ob)end Ob:SetTall(Pb+2)Kb:ScrollTo(Kb:GetCanvas():GetTall())end,Kb))end end,self)local Fb=uigs.Create("DLabel",function(Kb)local Lb,Mb=self.log:GetPos()Kb:SetSize(self.log:GetWide(),22)Kb:SetPos(Lb,Mb-Kb:GetTall())Kb:SetText("Лог операций")Kb:SetTextColor(IGS.col.HIGHLIGHTING)Kb:SetFont("igs.22")Kb:SetContentAlignment(1)end,self)local Gb,Hb=Fb:GetPos()uigs.Create("DPanel",function(Kb)Kb:SetPos(10,Hb-2-10)Kb:SetSize(self:GetWide()-Kb:GetPos()*2,2)Kb.Paint=function(Lb,Mb,Nb)draw.RoundedBox(0,0,0,Mb,Nb,IGS.col.SOFT_LINE)end end,self)local Ib=uigs.Create("igs_button",function(Kb)local Lb,Mb=self.log:GetPos()Kb:SetSize(170,30)Kb:SetPos(self:GetWide()-10-Kb:GetWide(),Mb-20)Kb:SetText("Активировать купон")Kb.DoClick=function()IGS.WIN.ActivateCoupon()end end,self)local function Jb(Kb,Lb,Mb)timer.Simple(Kb,function()if not IsValid(self.log)then return end self.log:AddRecord(Lb,Mb)end)end Jb(0,"Открыт диалог пополнения счета",nil)Jb(math.random(3),"Соединение установлено!",true)Jb(math.random(20,40),"Деньги будут зачислены мгновенно и автоматически",nil)end)return bb end local cb=Color(10,10,10,150)local db=Color(222,170,12,200)local eb=Color(35,35,35,255)local fb=Color(50,50,50,255)local gb=Color(10,10,10,150)local hb=Color(0,150,0,200)local ib=Color(200,200,200)local jb=Color(0,0,0)local kb=Color(200,200,200)local lb=Color(255,255,255)local mb=Color(222,170,12,150)local nb=Color(245,0,0,255)local ob=Color(200,0,0,100)local pb=Color(200,0,0,150)local qb={}local function rb(Cb,Db,Eb,Fb,Gb)Gb=Gb or g local Hb=vgui.Create("DLabel",Cb)Hb:SetFont(Gb)Hb:SetText(Db)Hb:SetPos(Eb,Fb)Hb:SizeToContents()Hb:SetCursor('hand')Hb.OnMousePressed=function(Ib)SetClipboardText(Ib:GetText())end return Hb end local sb=draw.SimpleText local tb=Color(200,200,200)function qb:Init()local Cb=LocalPlayer()local Db=vgui.Create("DPanel",self)Db:Dock(TOP)Db:SetTall(200)Db:TDLib():ClearPaint():Background(fb):Blur(2)local Eb=vgui.Create("DPanel",self)Eb:Dock(TOP)Eb:SetTall(50)Eb:DockMargin(0,1,0,1)Eb:TDLib():ClearPaint():Background(cb):Blur(2):Text("Активные Покупки",g,Color(200,200,200))IGS.GetMyPurchases(function(Kb)if not IsValid(self)then return end if#Kb==0 then local Nb=vgui.Create("Panel",self)Nb:Dock(FILL)Nb:TDLib():On("Paint",function(Ob,Pb,Qb)surface.SetTextColor(tb)surface.SetTextPos(Pb/2-240,Qb/2-80)surface.DrawText("Здесь будут отображаться ваши активные покупки")surface.SetTextPos(Pb/2-240,Qb/2-55)surface.DrawText("Не самое ли подходящее время, чтобы совершить первую?")surface.SetTextPos(Pb/2-240,Qb/2-30)surface.DrawText("Табличка сразу станет красивее. Честно-честно")surface.SetDrawColor(255,255,255,255)surface.SetMaterial(R['smile.png'])surface.DrawTexturedRect(Pb/2-64,Qb-182,128,128)end)return end local Lb=vgui.Create("DPanel",self)Lb:Dock(TOP)Lb:SetTall(30)Lb:DockMargin(0,1,0,1)Lb:TDLib():ClearPaint():Background(cb):Blur(2):On("Paint",function(Nb,Ob,Pb)draw.SimpleText("Имя сервера",g,10,Pb/2,tb,TEXT_ALIGN_LEFT,1)draw.SimpleText("ID в системе",g,Ob*.4,Pb/2,tb,1,1)draw.SimpleText("Куплен",g,Ob*.6,Pb/2,tb,1,1)draw.SimpleText("Истекает",g,Ob*.75,Pb/2,tb,1,1)draw.SimpleText("название",g,Ob-10,Pb/2,tb,TEXT_ALIGN_RIGHT,1)end)local Mb=vgui.Create("DScrollPanel",self)Mb:Dock(FILL)for Nb,Ob in ipairs(Kb)do local Pb=IGS.ServerName(Ob.server)or"???"local Qb=IGS.GetItemByUID(Ob.item)local Rb=Qb.isnull and Ob.item or Qb:Name()local Sb=IGS.TimestampToDate(Ob.expire)or"Никогда"local Tb=IGS.TimestampToDate(Ob.purchase)or"Никогда"if Pb and utf8 and utf8.len and(utf8.len(Pb)>20)then Pb=utf8.sub(Pb,1,20)Pb=Pb.."..."end local Ub=Mb:Add("DPanel")Ub:Dock(TOP)Ub:SetTall(25)Ub:DockMargin(0,1,0,1)Ub:TDLib():ClearPaint():Background(cb):Blur(2):On("Paint",function(Vb,Wb,Xb)draw.SimpleText(Pb,g,10,Xb/2,tb,TEXT_ALIGN_LEFT,1)draw.SimpleText(Ob.id,g,Wb*.4,Xb/2,tb,1,1)draw.SimpleText(Tb,g,Wb*.6,Xb/2,tb,1,1)draw.SimpleText(Sb,g,Wb*.75,Xb/2,tb,1,1)draw.SimpleText(Rb,g,Wb-10,Xb/2,tb,TEXT_ALIGN_RIGHT,1)end)end end)local Fb=vgui.Create("DPanel",self)Fb:TDLib()Fb:SetSize(184,184)Fb:SetPos(10,10)Fb:CircleAvatar():SetPlayer(LocalPlayer(),184)rb(self,LocalPlayer():SteamID(),Fb:GetWide()-5,20)local Gb=IGS.PlayerLVL(Cb)local Hb=Cb:IGSFunds()local Ib=not Gb and IGS.LVL.MAP[1]or Gb:GetNext()rb(self,"Статус: "..(Gb and Gb:Name()or"Никто :("),Fb:GetWide()+10,50)if Ib then local Kb=Ib:Description()rb(self,"След. статус: "..Ib:Name()..(Kb and("\n\n%s"):format(Kb)or"")..(" (".."Нужно: "..Ib:Cost()-IGS.TotalTransaction(Cb).." руб"..")"),Fb:GetWide()+18,80)end local Jb=vgui.Create("DButton",self)Jb:SetSize(220,30)Jb:SetPos(Fb:GetWide()+5,150)Jb:SetText("")Jb:TDLib():ClearPaint():Background(Color(22,87,128),5):FadeHover(Color(7,107,171)):Text("Активировать купон",g):On("DoClick",function(Kb)LocalPlayer():EmitSound("UI/buttonclick.wav",100,100)IGS.WIN.ActivateCoupon()end)end vgui.Register("dc_cloudprofile",qb,"Panel")local ub={}local vb=draw.SimpleText local wb=Color(200,200,200)function ub:Init()local Cb=vgui.Create("DPanel",self)Cb:Dock(TOP)Cb:SetTall(50)Cb:TDLib():ClearPaint():Background(cb,3):Blur(2):On("Paint",function(Fb,Gb,Hb)vb("Сервер",o,Gb*.1,Hb/2,wb,1,1)vb("Предмет",o,Gb*.35,Hb/2,wb,1,1)vb("Куплен",o,Gb*.5,Hb/2,wb,1,1)vb("Истечет",o,Gb*.67,Hb/2,wb,1,1)vb("Сумма",o,Gb*.83,Hb/2,wb,1,1)vb("Баланс",o,Gb*.95,Hb/2,wb,1,1)end)local Db=vgui.Create("DScrollPanel",self)Db:Dock(FILL)local Eb=LocalPlayer():IGSFunds()IGS.GetMyTransactions(function(Fb)if not IsValid(Db)then return end for Gb,Hb in ipairs(Fb)do Hb.note=Hb.note or"-"local function Ib(Pb)local Qb=IGS.GetItemByUID(Pb)return Qb.isnull and Pb or Qb:Name()end if Hb.note:StartWith("A: ")or Hb.note:StartWith("C: ")then goto SKIP end if not Hb.note:StartWith("P: ")then goto SKIP end Eb=Eb-Hb.sum local Jb=IGS.ServerName(Hb.server)or"???"local Kb=IGS.GetItemByUID(Ib(Hb.note:sub(4)))local Lb=Kb.isnull and Hb.note:sub(4)or Kb:Name()local Mb=function(Pb,Qb,Rb)draw.SimpleText(Pb,s,Qb,Rb,color_white,1)end local Nb=vgui.Create("DPanel",self)Nb:Dock(TOP)Nb:SetTall(30)if Jb and utf8 and utf8.len and(utf8.len(Jb)>20)then Jb=utf8.sub(Jb,1,20)Jb=Jb.."..."end local Ob=Eb Nb:DockMargin(0,1,0,0)Nb:TDLib():ClearPaint():Background(fb,3):On("Paint",function(Pb,Qb,Rb)vb(Jb,o,Qb*.12,Rb/2,wb,1,1)vb(Lb,o,Qb*.35,Rb/2,wb,1,1)vb(IGS.TimestampToDate(Hb.date)or"Никогда",o,Qb*.5,Rb/2,wb,1,1)vb(Kb.termin~=0 and IGS.TimestampToDate(Hb.date+Kb.termin*86400)or"Никогда",o,Qb*.67,Rb/2,wb,1,1)vb(IGS.SignPrice(Hb.sum),o,Qb*.83,Rb/2,wb,1,1)vb(IGS.SignPrice(Ob),o,Qb-5,Rb/2,wb,TEXT_ALIGN_RIGHT,1)end)Db:AddItem(Nb)::SKIP::end end)end vgui.Register("dc_transactions",ub,"Panel")local xb={}local yb local function zb(Cb)if IsValid(yb)then yb:Remove()end yb=vgui.Create("DFrame")yb:SetSize(400,500)yb:Center()yb:MakePopup()yb:SetTitle("")yb:ShowCloseButton(false)yb:TDLib():ClearPaint():Background(eb,5):Blur(2):On("Paint",function(Ob,Pb,Qb)draw.RoundedBox(1,0,0,Pb,28,fb)draw.SimpleText(Cb.name,e,Pb/2,5,color_white,1,TEXT_ALIGN_TOP)end)local Db=vgui.Create("DButton",yb)Db:SetSize(24,24)Db:SetPos(yb:GetWide()-26,2)Db:SetText('')Db:TDLib():ClearPaint():On("Paint",function(Ob,Pb,Qb)surface.SetDrawColor(color_white)surface.SetMaterial(Ob:IsHovered()and R["closeHover.png"]or R["close.png"])surface.DrawTexturedRect(0,0,Pb,Qb)end):On("DoClick",function()yb:Remove()end)surface.SetFont("ChatFont")local Eb,Fb=surface.GetTextSize(Cb.price)local Gb=Color(255,255,255)local Hb=vgui.Create("DPanel",yb)Hb:Dock(TOP)Hb:SetTall(240)Hb:DockMargin(1,1,1,10)Hb:TDLib():ClearPaint():Background(cb):Blur(4):Material(R[Cb.uid]):On("Paint",function(Ob,Pb,Qb)if Cb.discounted_from then local Rb=draw.SimpleText("₽"..Cb.discounted_from,"ChatFont",10,Qb-45,nb,TEXT_ALIGN_LEFT,TEXT_ALIGN_BOTTOM)local Sb,Tb=7,Qb-48-(20/2)surface.SetDrawColor(IGS.col.TEXT_SOFT)surface.DrawLine(Sb,Tb,Rb+13,Tb+6)Gb.g=100 Gb.r=math.sin(CurTime()+1)*100 Gb.b=100-math.sin(CurTime()+1)*100 draw.RoundedBox(5,5,Qb-40,Eb+20,30,Gb)draw.SimpleText("₽"..Cb.price,"ChatFont",10,Qb-15,color_white,TEXT_ALIGN_LEFT,TEXT_ALIGN_BOTTOM)else draw.RoundedBox(5,5,Qb-40,Eb+20,30,hb)draw.SimpleText("₽"..Cb.price,"ChatFont",10,Qb-15,color_white,TEXT_ALIGN_LEFT,TEXT_ALIGN_BOTTOM)end end)local Ib=vgui.Create("DButton",Hb)Ib:SetSize(120,30)Ib:SetText("")Ib:SetPos(Eb+30,Hb:GetTall()-40)Ib:TDLib():ClearPaint():Background(Color(66,133,180),5):Text(P.FancyTerm(Cb.termin),l)local Jb=string.Wrap(p,Cb.description,400)local Kb=IGS.GetItemByUID(Cb.uid)local Lb=Cb.price local Mb=-1 uigs.Create("DCheckBoxLabel",function(self)self.Button:TDLib():SquareCheckbox(Color(39,174,96))self:Dock(TOP)self:DockMargin(0,5,0,0)self:SetTall(20)local Ob=LocalPlayer():GetNWBool("igs.gos."..Kb:ID())self:SetValue(Ob)self:SetText("Выдавать при спавне")self.Label:SetTextColor(IGS.col.TEXT_SOFT)self.Label:SetFont("igs.15")function self:OnChange(Pb)net.Start("IGS.GiveOnSpawnWep")net.WriteIGSItem(Kb)net.WriteBool(Pb)net.SendToServer()end end,Hb)for Ob,Pb in ipairs(Jb)do local Qb=vgui.Create("DLabel",yb)Qb:SetText(Pb)Qb:SetFont(p)Qb:SizeToContents()Qb:Dock(TOP)end local Nb=vgui.Create("DButton",yb)Nb:SetText("")Nb:Dock(BOTTOM)Nb:SetSize(120,40)Nb:SetTall(45)Nb:DockMargin(5,1,5,5)Nb:TDLib():ClearPaint():Background(gb):FadeHover(hb):On("Paint",function(Ob,Pb,Qb)surface.SetDrawColor(Ob:IsHovered()and jb or ib)surface.SetMaterial(R["cart.png"])local Rb,Sb=draw.SimpleText("КУПИТЬ",C,Pb/2,Qb/2,color_white,1,1)surface.DrawTexturedRect(Pb/2-Rb-10,Qb/2-16,32,32)end):On("DoClick",function()if Mb>=CurTime()then return end Mb=CurTime()+1 IGS.Purchase(Cb.uid,function(Ob,Pb)Mb=-1 if Ob then local need=Lb-LocalPlayer():IGSFunds()surface.PlaySound("ambient/voices/citizen_beaten1.wav")IGS.BoolRequest("Недостаточно денег",("Вам не хватает %s для покупки %s.\nЖелаете мгновенно пополнить счет?"):format(PL_IGS(need),Kb:Name()),function(Qb)if Qb then IGS.WIN.Deposit(need,true)surface.PlaySound("vo/npc/male01/yeah02.wav")end end):ShowCloseButton(true)surface.PlaySound("ambient/voices/citizen_beaten1.wav")return end Cb.Purchased=Cb.Purchased or 0 Cb.Purchased=Cb.Purchased+1 if not Kb:IsStackable()then if not IGS.C.Inv_Enabled then IGS.ShowNotify("Спасибо за покупку. Это было просто, правда? :)","Успешная покупка")return end IGS.BoolRequest("Успешная покупка","Спасибо за покупку. Она находится в вашем /donate инвентаре.\n\nАктивировать ее сейчас?",function(Qb)if not Qb then return end IGS.ProcessActivate(Pb)end)end surface.PlaySound("ambient/office/coinslot1.wav")end)end)end function xb:Init()self:TDLib():ClearPaint()local Cb=vgui.Create("DScrollPanel",self)Cb:Dock(FILL)Cb:TDLib():HideVBar()local Db=vgui.Create("DHorizontalScroller",self)Db:Dock(TOP)Db:SetTall(40)Db:SetOverlap(-4)local Eb=nil for Fb,Gb in SortedPairs(U())do local Hb=Db:Add("DButton")Hb:Dock(LEFT)Hb:SetWide(100)Hb:SetFont(a)Hb:DockMargin(1,1,0,1)Db:AddPanel(Hb)surface.SetFont(a)local Ib,Jb=surface.GetTextSize(Fb)Hb:SetText(Fb)if Ib+10<100 then Ib=90 end Hb:SetWide(Ib+10)Hb:SetTextColor(color_white)Hb:TDLib():ClearPaint():FadeHover(db):On("Paint",function(Lb,Mb,Nb)if(Lb:IsHovered()or Eb==Lb)then draw.RoundedBox(1,0,0,Mb,Nb,db)end end)local Kb=function(Lb)Cb:Clear()Eb=Lb local Mb=vgui.Create("DIconLayout",Cb)Mb:Dock(FILL)Mb:DockMargin(5,5,5,5)Mb:SetSpaceY(5)Mb:SetSpaceX(5)for Nb,Ob in pairs(Gb)do local Pb=Mb:Add("DPanel")Pb:SetSize(200,200)Pb:SetCursor('hand')surface.SetFont("ChatFont")local Qb,Rb=surface.GetTextSize(Ob.price)local Sb=table.Copy(color_white)Pb:TDLib():ClearPaint():Background(cb,5):Blur(4):On("OnMousePressed",function(Vb)surface.PlaySound("garrysmod/ui_click.wav")zb(Ob)end):On("Paint",function(Vb,Wb,Xb)PIXEL.DrawImage(0,0,Wb,Xb,Ob.image_url,Vb:IsHovered()and lb or kb)if Ob.discounted_from then local Yb=draw.SimpleText("₽"..Ob.discounted_from,"ChatFont",10,Xb-45,nb,TEXT_ALIGN_LEFT,TEXT_ALIGN_BOTTOM)local Zb,ac=7,Xb-48-(20/2)surface.SetDrawColor(IGS.col.TEXT_SOFT)surface.DrawLine(Zb,ac,Yb+13,ac+6)Sb.g=100 Sb.r=math.sin(CurTime()+1)*100 Sb.b=100-math.sin(CurTime()+1)*100 draw.RoundedBox(5,5,Xb-40,Qb+20,30,Sb)draw.SimpleText("₽"..Ob.price,"ChatFont",10,Xb-15,color_white,TEXT_ALIGN_LEFT,TEXT_ALIGN_BOTTOM)else draw.RoundedBox(5,5,Xb-40,Qb+20,30,hb)draw.SimpleText("₽"..Ob.price,"ChatFont",10,Xb-15,color_white,TEXT_ALIGN_LEFT,TEXT_ALIGN_BOTTOM)end end)local Tb=vgui.Create("DPanel",Pb)Tb:Dock(TOP)Tb:DockMargin(2,2,2,2)Tb:SetTall(25)Tb:TDLib():ClearPaint():Background(Color(26,66,71),5):Text(Ob.name,g)local Ub=vgui.Create("DButton",Pb)Ub:SetSize(115,30)Ub:SetText("")Ub:SetPos(Pb:GetWide()-120,Pb:GetTall()-40)Ub:TDLib():ClearPaint():Background(Color(66,133,180),5):Text(P.FancyTerm(Ob.termin),l)end end Hb:On("DoClick",function(Lb)LocalPlayer():EmitSound("UI/buttonclick.wav",100,300)Kb(Lb)end)if Eb==nil then Kb(Hb)end end end vgui.Register("dc_cloudshop",xb,"DPanel")local Ab={}function Ab:Init()self:TDLib():ClearPaint()local Cb=vgui.Create("DScrollPanel",self)Cb:Dock(FILL)Cb:TDLib():HideVBar()local Db local function Eb(Fb)Cb:Clear()IGS.GetInventory(function(Gb)if table.Count(Gb)<=0 then self:Text("Инвентарь пуст")return end local Hb=vgui.Create("DIconLayout",Cb)Hb:Dock(FILL)Hb:DockMargin(5,5,5,5)Hb:SetSpaceY(5)Hb:SetSpaceX(5)for Ib,Jb in pairs(Gb)do if not Jb.item:CanSee(LocalPlayer())then goto CONTT end if Jb.item.isnull then goto CONTT end local Kb=Hb:Add("DPanel")Kb:SetSize(200,200)surface.SetFont("ChatFont")local Lb,Mb=surface.GetTextSize(Jb.item.price)Kb:TDLib():ClearPaint():Background(cb,5):Blur(4):On("Paint",function(Qb,Rb,Sb)surface.SetDrawColor(lb)surface.SetMaterial(R[Jb.item.uid])surface.DrawTexturedRect(0,0,Rb,Sb)end)local Nb=vgui.Create("DPanel",Kb)Nb:Dock(TOP)Nb:DockMargin(2,2,2,2)Nb:SetTall(25)Nb:TDLib():ClearPaint():Background(Color(26,66,71),5):Text(Jb.item.name,g)local Ob=vgui.Create("DButton",Kb)Ob:Dock(BOTTOM)Ob:SetTall(20)Ob:DockMargin(2,2,2,5)Ob:SetText("")Ob:TDLib():ClearPaint():Background(ob,5):FadeHover(pb):Text("ВЫБРОСИТЬ",l):On("DoClick",function(Qb)IGS.DropItem(Jb.id,function()surface.PlaySound("garrysmod/ui_click.wav")Qb:Remove()Eb()end)end)local Pb=vgui.Create("DButton",Kb)Pb:Dock(BOTTOM)Pb:SetTall(30)Pb:DockMargin(2,2,2,5)Pb:SetText("")Pb:TDLib():ClearPaint():Background(Color(66,133,180),5):FadeHover(hb):Text("АКТИВИРОВАТЬ",l):On("DoClick",function(Qb)IGS.ProcessActivate(Jb.id,function(Rb)surface.PlaySound("garrysmod/ui_click.wav")if not Rb then return end Qb:Remove()Eb()end)end)::CONTT::end end)end Eb()end vgui.Register("dc_cloudinventory",Ab,"Panel")function P.Menu()if IsValid(S)then S:Remove()gui.EnableScreenClicker(false)hook.Run("DC_DonateClose")return end local Cb,Db=1000,700 hook.Run("DC_DonateOpen")if ScrW()<Cb then Cb=ScrW()end if ScrH()<Db then Db=ScrH()end S=vgui.Create("DPanel")S:SetSize(Cb,Db)S:SetPos(ScrW()/2-Cb/2,ScrH()/2-Db/2)S:TDLib():ClearPaint():On("Paint",function(Nb,Ob,Pb)draw.RoundedBox(4,0,42,Ob,Pb-42,eb)end)gui.EnableScreenClicker(true)local Eb=vgui.Create("DButton",S)Eb:SetSize(40,40)Eb:SetPos(S:GetWide()-42,2)Eb:SetText('')Eb:TDLib():ClearPaint():On("Paint",function(Nb,Ob,Pb)surface.SetDrawColor(color_white)surface.SetMaterial(Nb:IsHovered()and R["closeHover.png"]or R["close.png"])surface.DrawTexturedRect(0,0,Ob,Pb)end):On("DoClick",function()surface.PlaySound("garrysmod/ui_click.wav")gui.EnableScreenClicker(false)S:Remove()hook.Run("DC_DonateClose")end)local Fb=vgui.Create("Panel",S)Fb:Dock(FILL)Fb:DockMargin(0,42,0,0)Fb:TDLib():Blur(3)local Gb=vgui.Create("DPanel",Fb)Gb:Dock(LEFT)Gb:SetWide(Cb*.14)Gb:TDLib():ClearPaint():Background(Color(20,20,20,100),3)local Hb=vgui.Create("Panel",Fb)Hb:Dock(FILL)Hb:DockMargin(5,5,5,5)local Ib=nil local function Jb(Nb,Ob)Hb:Clear()Ib=Ob local Pb=vgui.Create(Nb,Hb)Pb:Dock(FILL)end Jb(T[1].panel)local Kb=Gb:Add("Panel")Kb:Dock(TOP)Kb:SetTall(100)Kb:DockMargin(7,7,7,7)Kb:TDLib():On("Paint",function(Nb,Ob,Pb)if Nb:IsHovered()then Nb:SetCursor('hand')end PIXEL.DrawImgur(0,0,Ob,Pb,"ygFuFdm",color_white)end):On("OnMousePressed",function(Nb)surface.PlaySound("garrysmod/ui_click.wav")gui.OpenURL("https://hellspace.ru")end)local Lb=hook.Run("DC_DonateOpenCategorises",T)if Lb then table.insert(T,Lb)end for Nb,Ob in ipairs(T)do local Pb={}local Qb=Gb:Add("DButton")Qb:Dock(TOP)Qb:SetTall(Cb*.1)Qb:SetText("")Qb:DockMargin(5,2,5,0)Qb:TDLib():ClearPaint():Background(cb):FadeHover(db):On("Paint",function(Rb,Sb,Tb)if(Rb:IsHovered()or Ib==Rb)then draw.RoundedBox(1,0,0,Sb,Tb,db)end surface.SetDrawColor((Rb:IsHovered()or Ib==Rb)and jb or ib)surface.SetMaterial(R[Ob.icon])surface.DrawTexturedRect(Sb/2-25,Tb/2-25,50,50)end):On("DoClick",function(Rb)if Ib==Rb then return end LocalPlayer():EmitSound("UI/buttonclick.wav",100,300)Jb(Ob.panel,Qb)end)if Ib==nil then Jb(Ob.panel,Qb)end end local Mb=vgui.Create("DButton",Gb)Mb:Dock(BOTTOM)Mb:SetText("")Mb:SetTall(40)Mb:DockMargin(5,1,5,5)Mb:TDLib():ClearPaint():Background(gb):FadeHover(hb):On("Paint",function(Nb,Ob,Pb)surface.SetDrawColor(Nb:IsHovered()and jb or ib)surface.SetMaterial(R["deposit.png"])surface.DrawTexturedRect(Ob-26,Pb/2-12,24,24)draw.SimpleText("₽"..LocalPlayer():IGSFunds(),"ChatFont",5,Pb/2,color_white,TEXT_ALIGN_LEFT,1)end):On("DoClick",function()IGS.WIN.Deposit(need,true)end)return S end local Bb=IGS.UI IGS.UI=P.Menu concommand.Add("donate_menu",function()P.Menu()end)concommand.Add("donate_menu_old",function()Bb()end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement