Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- hostname: [UK][NEW] Rustic Roleplay 2.0 | Mining | Refined | Oil | Custom
- version : 18.02.07/24 7220 secure
- udp/ip : 54.36.224.253:27015 -- FIXED (пофиксилииии)
- map : rp_downtown_tits_v1 at: 0 x, 0 y, 0 z
- // ADDED FREE HOVERBOARD
- table.insert( HoverboardTypes, {
- bonus = {
- twist = 6,
- flip = 6,
- speed = 6,
- jump = 6,
- turn = 6
- },
- Price = 1, -- PRICE IS 0
- mcontrol = 5,
- shake = 5,
- trailsize = math.Clamp( 2, 0, 10 ),
- height = math.Clamp( 55, 36, 100 ),
- viewdist = math.Clamp( 125, 64, 256 ),
- trail = Vector( 10, 10, 10 ),
- boost = Vector( 10, 10, 10 ),
- recharge = Vector( 10, 10, 10 ),
- attributes = {
- speed = math.Clamp( 10, 0, 15 ),
- jump = math.Clamp( 10, 0, 15 ),
- turn = math.Clamp( 10, 0, 15 ),
- flip = math.Clamp( 10, 0, 15 ),
- twist = math.Clamp( 10, 0, 15 ),
- },
- model = "models/squint_hoverboard/hotrod.mdl",
- name = "HotRod",
- rotation = 90,
- driver = Vector( 1.5, 0, -1.5 ),
- effect_1 = {
- effect = "plasma_thruster_middle",
- position = Vector( 11, 22, 0 ),
- normal = Vector( 0, 1.85, 0.90 ),
- },
- effect_2 = {
- effect = "plasma_thruster_middle",
- position = Vector( -11, 22, 0 ),
- normal = Vector( 0, 1.85, 0.90 ),
- },
- effect_3 = {
- effect = "plasma_thruster_middle",
- position = Vector( 11, 27.5, 0 ),
- normal = Vector( 0, 1.85, 0.90 ),
- },
- effect_4 = {
- effect = "plasma_thruster_middle",
- position = Vector( -11, 27.5, 0 ),
- normal = Vector( 0, 1.85, 0.90 ),
- },
- effect_5 = {
- effect = "plasma_thruster_middle",
- position = Vector( 11, 33, 0 ),
- normal = Vector( 0, 1.85, 0.90 ),
- },
- effect_6 = {
- effect = "plasma_thruster_middle",
- position = Vector( -11, 33, 0 ),
- normal = Vector( 0, 1.85, 0.90 ),
- },
- effect_7 = {
- effect = "trail",
- position = Vector( 8.5, 40, -2.5 ),
- },
- effect_8 = {
- effect = "trail",
- position = Vector( -8.5, 40, -2.5 ),
- },
- files = {
- "materials/models/squint_hoverboard/hotrod/hotrod.vmt",
- "materials/models/squint_hoverboard/hotrod/hotrod.vtf",
- }
- } )
- // MENU BUY HOVERBOARD
- concommand.Add("creo_menu",function()
- -- Don't draw the frame if it already exists.
- if IsValid(gHoverDealer_Frame) then return end
- -- The frame itself.
- gHoverDealer_Frame = vgui.Create( "DFrame" )
- gHoverDealer_Frame:SetSize( 700, 500 )
- gHoverDealer_Frame:SetTitle( "" )
- gHoverDealer_Frame:MakePopup()
- gHoverDealer_Frame:SetDraggable( false )
- gHoverDealer_Frame:SetVisible( true )
- gHoverDealer_Frame:Center()
- gHoverDealer_Frame:ShowCloseButton( false )
- -- Cache the icon here if it exists.
- local gradRight = Material("vgui/gradient-l")
- gHoverDealer_Frame.Paint = function( self, w, h )
- -- Background.
- surface.SetDrawColor( gHoverDealer.Config.ClientSide.Background_Color )
- surface.DrawRect( 0, 0, w, h )
- -- Gradient.
- surface.SetMaterial( gradRight )
- surface.SetDrawColor( gHoverDealer.Config.ClientSide.BackgroundTabGrad_Color )
- surface.DrawTexturedRect( 0, 0, w, 50 )
- -- Left Line.
- surface.SetDrawColor( gHoverDealer.Config.ClientSide.LeftLine_Color )
- surface.DrawRect( 0, 0, 3, h )
- -- Right Line.
- surface.SetDrawColor( gHoverDealer.Config.ClientSide.RightLine_Color )
- surface.DrawRect( w-3, 0, 3, h )
- -- Title.
- draw.SimpleText(gHoverDealer.Config.ClientSide.Menu_Title, "gHoverDealer_ShopUIFont", 10, 25, gHoverDealer.Config.Base.Font_Color, TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER)
- end
- -- Close button.
- gHoverDealer_CloseButton = vgui.Create( "DButton", gHoverDealer_Frame )
- gHoverDealer_CloseButton:SetPos( gHoverDealer_Frame:GetWide()-53, 0 )
- gHoverDealer_CloseButton:SetSize( 50, 50 )
- gHoverDealer_CloseButton:SetText( "" )
- gHoverDealer_CloseButton.Paint = function(self, w, h)
- if self:IsHovered() then
- surface.SetDrawColor( Color(215,25,25) )
- surface.DrawRect(0,0,w,h)
- end
- draw.SimpleText( 'X', "gHoverDealer_ShopUIFont", w/2, h/2, gHoverDealer.Config.Base.Font_Color, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER )
- end
- gHoverDealer_CloseButton.DoClick = function()
- if IsValid(gHoverDealer_Frame) then
- gHoverDealer_Frame:Close()
- end
- end
- -- Create the list to hold all the players lines.
- gHoverDealer_ShopList = vgui.Create("DPanelList", gHoverDealer_Frame )
- gHoverDealer_ShopList:SetSize( gHoverDealer_Frame:GetWide()-6, gHoverDealer_Frame:GetTall() - 70 )
- gHoverDealer_ShopList:SetPos( 3, 60 )
- gHoverDealer_ShopList:EnableHorizontal(false)
- gHoverDealer_ShopList:EnableVerticalScrollbar(false)
- gHoverDealer_ShopList:SetSpacing(8)
- -- Paint the Panel list empty, this avoids a white box replacing it.
- gHoverDealer_ShopList.Paint = function(self, w, h) end
- -- This is the panel that holds the chosenopponents.
- local Potentialchosenopponents = vgui.Create("DPanel", gHoverDealer_Frame)
- Potentialchosenopponents:SetPos(3, 60)
- Potentialchosenopponents:SetSize(gHoverDealer_Frame:GetWide()-6, gHoverDealer_Frame:GetTall()-60)
- Potentialchosenopponents.Paint = function(self, w, h)
- draw.RoundedBox(0, 10, 30, w-20, 2, Color(2,170,235,230) )
- draw.SimpleText("Pick a HoverBoard: Click to Spawn/Purchase!", "gHoverDealer_ShopUIFont", w/2, 30, gHoverDealer.Config.Base.Font_Color, TEXT_ALIGN_CENTER, TEXT_ALIGN_BOTTOM)
- end
- --
- Potentialchosenopponents.scroll = vgui.Create("DScrollPanel", Potentialchosenopponents)
- Potentialchosenopponents.scroll:SetPos(0, 35)
- Potentialchosenopponents.scroll:SetSize(Potentialchosenopponents:GetWide()+15, Potentialchosenopponents:GetTall()-35)
- for k, v in pairs(HoverboardTypes) do
- gHoverDealer_ShopItem = vgui.Create("DPanel",Potentialchosenopponents.scroll)
- gHoverDealer_ShopItem:SetSize(120, 120)
- gHoverDealer_ShopItem:SetText("")
- gHoverDealer_ShopItem:Dock(TOP)
- -- Cache the icon here if it exists.
- local gradRight = Material("vgui/gradient-l")
- gHoverDealer_ShopItem.Paint = function(self, w, h)
- -- Gradient.
- surface.SetMaterial( gradRight )
- surface.SetDrawColor( Color(55,55,55,220) )
- surface.DrawTexturedRect( 0, 0, w, h )
- surface.SetDrawColor( Color(255,255,255) )
- surface.DrawOutlinedRect(0,0,w,h)
- draw.SimpleText(v.name, "gHoverDealer_ShopDescriptionFont", 120, h/2, gHoverDealer.Config.Base.Font_Color, TEXT_ALIGN_LEFT, TEXT_ALIGN_BOTTOM)
- draw.SimpleText(DarkRP.formatMoney(v.Price), "gHoverDealer_ShopItemFont", 445, 65, gHoverDealer.Config.Base.Font_Color, TEXT_ALIGN_CENTER, TEXT_ALIGN_BOTTOM)
- if table.HasValue(gHoverDealer_Hoverboards, v.name) then
- draw.SimpleText("OWNED", "gHoverDealer_ShopItemFont", 330, 65, gHoverDealer.Config.Base.Font_Color, TEXT_ALIGN_CENTER, TEXT_ALIGN_BOTTOM)
- end
- end
- gHoverDealer_ReturnButton = vgui.Create("DButton", gHoverDealer_ShopItem )
- gHoverDealer_ReturnButton:SetSize(90, 40)
- gHoverDealer_ReturnButton:SetPos(500, 35)
- gHoverDealer_ReturnButton:SetText("")
- gHoverDealer_ReturnButton.Paint = function(self, w, h)
- surface.SetDrawColor( gHoverDealer.Config.ClientSide.ReturnButton_Color )
- surface.DrawRect( 0, 0, w, h )
- if self:IsHovered() then
- surface.SetDrawColor( gHoverDealer.Config.ClientSide.ButtonOutline_Color )
- surface.DrawOutlinedRect(0,0,w,h)
- end
- draw.SimpleText("Return", "gHoverDealer_ShopDescriptionFont", 25, 25, gHoverDealer.Config.Base.Font_Color, TEXT_ALIGN_LEFT, TEXT_ALIGN_BOTTOM)
- end
- gHoverDealer_ReturnButton.DoClick = function()
- net.Start("gHoverDealer_ReturnItem")
- net.WriteTable(v)
- net.SendToServer()
- end
- gHoverDealer_PurchaseButton = vgui.Create("DButton", gHoverDealer_ShopItem )
- gHoverDealer_PurchaseButton:SetSize(90, 40)
- gHoverDealer_PurchaseButton:SetPos(600, 35)
- gHoverDealer_PurchaseButton:SetText("")
- gHoverDealer_PurchaseButton.Paint = function(self, w, h)
- surface.SetDrawColor( gHoverDealer.Config.ClientSide.PurchaseButton_Color )
- surface.DrawRect( 0, 0, w, h )
- if self:IsHovered() then
- surface.SetDrawColor( gHoverDealer.Config.ClientSide.ButtonOutline_Color )
- surface.DrawOutlinedRect(0,0,w,h)
- end
- draw.SimpleText("Purchase", "gHoverDealer_ShopDescriptionFont", 20, 25, gHoverDealer.Config.Base.Font_Color, TEXT_ALIGN_LEFT, TEXT_ALIGN_BOTTOM)
- end
- gHoverDealer_PurchaseButton.DoClick = function()
- net.Start("gHoverDealer_BuyItem")
- net.WriteTable(v)
- net.SendToServer()
- end
- -- The 3d model
- local icon = vgui.Create( "DModelPanel", gHoverDealer_ShopItem )
- icon:SetPos(0,0)
- icon:SetSize(130,100)
- icon:SetModel(v.model)
- local mn, mx = icon.Entity:GetRenderBounds()
- local size = 0
- size = math.max( size, math.abs( mn.x ) + math.abs( mx.x ) )
- size = math.max( size, math.abs( mn.y ) + math.abs( mx.y ) )
- size = math.max( size, math.abs( mn.z ) + math.abs( mx.z ) )
- icon:SetFOV( 45 )
- icon:SetCamPos( Vector( size+4, size+4, size+4 ) )
- icon:SetLookAt( ( mn + mx ) * 0.5 )
- function icon:LayoutEntity(Entity) end
- Potentialchosenopponents.scroll:Add(gHoverDealer_ShopItem)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement