Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /////////////HOBO HALO DRAWING\\\\\\\\\\\\\\\\\\\
- --[[hook.Add("PreDrawHalos", "HoboWh", function()
- local WhHoboEnts = { -- Table of entities that halos are drawn on.
- "food_fatburger",
- "food_cola",
- "food_burger",
- "food_tosty",
- "food_zupa",
- "food_kanapka",
- "food_gofry",
- "food_melon"
- }
- if LocalPlayer():Team() == TEAM_HOBO then
- for k, v in pairs (WhHoboEnts) do
- local find = ents.FindByClass(v)
- halo.Add(find, Color(0, 0, 255), 2, 2, 2, true, true) -- Actual function that draws halo around those entities.
- end
- end
- local hobos = {}
- for x, y in pairs(player.GetAll()) do
- if y == LocalPlayer() then continue end
- if y:Team() == TEAM_HOBO then
- table.insert(hobos, y)
- end
- halo.Add(hobos, Color(255, 0, 0), 2, 2, 2, true, true) -- Hobos can see each other through the walls
- end
- end)]]
- //////////HOBO GUI DRAW\\\\\\\\\\
- local frame
- hook.Add("KeyPress", "HoboMenuOpen", function(ply, key)
- if ply:KeyDown(IN_SPEED) and key == IN_USE and (not frame or not frame:IsVisible()) and ply:Team() == TEAM_HOBO then
- frame = vgui.Create("DFrame")
- frame:SetTitle("")
- frame:SetSize(300, 300)
- frame:Center()
- frame:MakePopup()
- frame:SetVisible(true)
- frame:SetDraggable(false)
- frame:ShowCloseButton(false)
- frame.Paint = function(self, w, h )
- draw.RoundedBox(20, 0, 0, w, h, Color(61, 45, 39, 200) )
- draw.SimpleText("Hobo Menu", "CloseCaption_Bold", 10, 0, Color(62, 173, 69, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP)
- end
- local closeButtonColor = Color(255, 0, 0, 255)
- local button = vgui.Create("DButton", frame)
- button:SetText("")
- button:SetPos(260, 0)
- button:SetSize(40, 30)
- button.DoClick = function()
- frame:Close()
- surface.PlaySound("buttons/button24.wav")
- end
- button.Paint = function(self, w, h)
- draw.RoundedBox(10, 0, 0 ,w , h, closeButtonColor )
- draw.SimpleText("X", "CloseCaption_Bold", w/2, h/2, Color(255, 255, 255, 255), 1, 1)
- end
- button.OnCursorEntered = function()
- closeButtonColor = Color(130, 0, 0, 255)
- end
- button.OnCursorExited = function()
- closeButtonColor = Color(255, 0, 0, 255)
- end
- local playerModel = vgui.Create("DModelPanel", frame)
- playerModel:SetSize(300, 300)
- playerModel:SetModel(LocalPlayer():GetModel())
- playerModel:SetPos(-100, 0)
- playerModel:SetCamPos(Vector( 70, 0, 40 ))
- function playerModel:LayoutEntity( ent ) ent:SetSequence( ent:LookupSequence( "walk_suitcase" ) ) playerModel:RunAnimation() end
- local entHoloText = Color(0, 0, 0, 255)
- local entHoloButton = Color(111, 174, 247, 255)
- local entHolo = vgui.Create("DButton", frame)
- entHolo:SetSize(120, 50)
- entHolo:SetPos(150, 60)
- entHolo:SetText("")
- entHolo.Paint = function(self, w, h)
- draw.RoundedBox(20, 0, 0, w, h, entHoloButton)
- draw.SimpleText("Food Seeker!", "ChatFont", w-60, h-25, entHoloText, 1, 1)
- end
- entHolo.OnCursorEntered = function()
- entHoloButton = Color(0, 48, 104, 255)
- entHoloText = Color(255, 255, 255, 255)
- end
- entHolo.OnCursorExited = function()
- entHoloButton = Color(111, 174, 247, 255)
- entHoloText = Color(0, 0, 0, 255)
- end
- entHolo.DoClick = function()
- frame:Close()
- surface.PlaySound("npc/fast_zombie/leap1.wav")
- hook.Add("PreDrawHalos", "HoboWh", function()
- local WhHoboEnts = { -- Table of entities that halos are drawn on.
- "food_fatburger",
- "food_cola",
- "food_burger",
- "food_tosty",
- "food_zupa",
- "food_kanapka",
- "food_gofry",
- "food_melon"
- }
- if LocalPlayer():Team() == TEAM_HOBO then
- for k, v in pairs (WhHoboEnts) do
- local find = ents.FindByClass(v)
- halo.Add(find, Color(0, 0, 255), 2, 2, 2, true, true)
- end
- end
- end)
- end
- end
- end)
- --concommand.Add("testhobo",function()
- --PrintTable(Entity(1):GetSequenceList())
- --end)
Add Comment
Please, Sign In to add comment