From 3b1b4835b2d62fedaf965e01775cdb26f1153d54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=5BMEF=5D=20=D0=BC=D0=B5=D1=85=D1=80=D0=BE=D0=B1?= <124378025+happy1063@users.noreply.github.com> Date: Mon, 25 Nov 2024 20:22:03 +0300 Subject: [PATCH] Create skybox.txt --- skybox.txt | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 skybox.txt diff --git a/skybox.txt b/skybox.txt new file mode 100644 index 0000000..4ef781b --- /dev/null +++ b/skybox.txt @@ -0,0 +1,30 @@ +--@name skybox +--@author cool-bro +--@client +--@owneronly +--[[ +replace materail of skybox +--]] +--settings +local url = "https://i.imgur.com/d5bWxdJ.gif" +local model = "cube" -- models : cube , sphere , pyramid , cone + +--code +local models = { + cube = "models/holograms/cube.mdl", + sphere = "models/holograms/hq_sphere.mdl", + pyramid = "models/holograms/pyramid.mdl", + cone = "models/holograms/hq_cone.mdl" + } +local sky = hologram.create(owner():getShootPos(),Angle(0,0,180),models[model],Vector(-2500,-2500,-2500)) +sky:suppressEngineLighting(true) +local mat = material.create("UnlitGeneric") +mat:setInt("$flags", 256) +mat:setTextureURL("$basetexture", url, function(m, u, w, h, l) +if m == nil then return end +l(0, 0, m:getWidth(), m:getHeight()) +sky:setMaterial("!" .. mat:getName()) +end) +hook.add("think","",function() + sky:setPos(owner():getShootPos()) +end)