Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
cases
surface.CreateFont("stark_font_case",{ font = "Arial", size = 22, weight = 40, }) net.Receive("StarkShop", function() local frame_cases = vgui.Create( "DFrame" ) frame_cases:SetPos( ScrH()/2, ScrW()/2 ) frame_cases:SetSize( 621, 570 ) frame_cases:SetTitle( "Магазин StarkRP" ) frame_cases:SetDraggable( true ) frame_cases:MakePopup() frame_cases:Center() frame_cases.Paint = function(self,w,h) draw.RoundedBox(5,0,0,w,h,Color(91,100,110,230)) local x = 15 local y = 35 for a = 1,3 do for i=1,3 do draw.RoundedBox(3,x,y,190,120,Color(0,0,0,150)) draw.RoundedBox(3,x,y+123,190,20,Color(0,0,0,150)) i = i+1 x = x+200 end x = 15 y = y+178 a = a+1 end end local s_money = 1000 local balance = vgui.Create( "DLabel", frame_cases ) balance:SetPos( 430, 5 ) balance:SetText( "Баланс: " .. s_money .. " RUB") balance:SizeToContents() DermaImageButton = vgui.Create( "DImageButton", frame_cases ) DermaImageButton:SetPos( 410, 4 ) DermaImageButton:SetImage( "icon16/add.png" ) DermaImageButton:SizeToContents() DermaImageButton.DoClick = function() local ply = LocalPlayer() ply:ChatPrint("data") end local case = {} local case_name = {} local case_button = {} local x_2 = 15+25 local y_2 = 35+12 local inter = 1 for m = 1,3 do for k = 1,3 do case[inter] = vgui.Create("DImage", frame_cases) case[inter]:SetPos( x_2, y_2 ) case[inter]:SetSize( 132, 96 ) case_name[inter] = vgui.Create( "DLabel", frame_cases ) case_name[inter]:SetPos( x_2+56, y_2+110 ) case_button[inter] = vgui.Create( "DButton", frame_cases ) case_button[inter]:SetPos( x_2-25, y_2+130 ) case_button[inter]:SetSize( 190, 20 ) if inter == 1 then case_name[1]:SetText( "Хромированный кейс" ) case_name[1]:SizeToContents() case_name[1]:SetPos( x_2+18, y_2+114 ) case[1]:SetImage( "scripted/chroma.png" ) case_button[1]:SetText( "Приобрести" ) else case_name[inter]:SetText( "Пусто" ) case_button[inter]:SetText( "" ) end x_2 = x_2+200 inter = inter+1 end x_2 = 15+25 y_2 = y_2+178 end case_button[1].DoClick = function() frame_cases:Hide() local frame_chromo = vgui.Create( "DFrame" ) frame_chromo:SetSize( 600, 500 ) frame_chromo:SetTitle( "Хромированный кейс" ) frame_chromo:SetDraggable( true ) frame_chromo:MakePopup() frame_chromo:Center() frame_chromo.Paint = function(self,w,h) draw.RoundedBox(5,0,0,w,h,Color(91,100,110,230)) draw.RoundedBox(3,200-5,38,190,120,Color(0,0,0,150)) draw.RoundedBox(3,200-5,38+123,190,20,Color(0,0,0,150)) draw.RoundedBox(3,100,250,400,300,Color(0,0,0,150)) end -- Деньги local s_money = 1000 local balance2 = vgui.Create( "DLabel", frame_chromo ) balance2:SetPos( 430-21, 5 ) balance2:SetText( "Баланс: " .. s_money .. " RUB") balance2:SizeToContents() DermaImageButton2 = vgui.Create( "DImageButton", frame_chromo ) DermaImageButton2:SetPos( 410-21, 4 ) DermaImageButton2:SetImage( "icon16/add.png" ) DermaImageButton2:SizeToContents() DermaImageButton2.DoClick = function() local ply = LocalPlayer() ply:ChatPrint("data") end -- Изображение кейса local image_chromo = vgui.Create("DImage", frame_chromo) image_chromo:SetPos( 225-5, 50 ) image_chromo:SetSize( 132, 96 ) image_chromo:SetImage( "scripted/chroma.png" ) -- Название кейса local name_chromo = vgui.Create( "DLabel", frame_chromo ) name_chromo:SetPos( 237-5, 164 ) name_chromo:SetText( "Хромированный кейс" ) name_chromo:SizeToContents() -- Кнопка купить local button_chromo = vgui.Create( "DColorButton", frame_chromo ) button_chromo:SetPos( 223, 187 ) button_chromo:SetColor( Color( 50, 200, 50 ) ) button_chromo:SetSize( 130, 30 ) local text_button_chromo = vgui.Create( "DLabel" , button_chromo ) text_button_chromo:SetFont("stark_font_case") text_button_chromo:SetText("ОТКРЫТЬ") text_button_chromo:SetPos( 25, 4 ) text_button_chromo:SetColor(Color(255,255,255,255)) text_button_chromo:SizeToContents() button_chromo:Paint( 130, 30 ) end case_button[2].DoClick = function() print("case") end case_button[3].DoClick = function() print("case") end case_button[4].DoClick = function() print("case") end case_button[5].DoClick = function() print("case") end case_button[6].DoClick = function() print("case") end case_button[7].DoClick = function() print("case") end case_button[8].DoClick = function() print("case") end case_button[9].DoClick = function() print("case") end end)
run
|
edit
|
history
|
help
0
ok
Random numbers in Lua. Range: 1-49. Sets of numbers without duplicates
kraft1c
855
Hand positions in a circle
Weird Lua OOP Lib
Hand positions in a circle
personal use
example for a friend
Fixed