Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local ENT = {}
- ENT.Type = "anim"
- ENT.Base = "base_anim"
- ENT.ClassName = "server_teleport"
- ENT.Name = "LAC"
- ENT.IP = "88.191.102.162"
- if CLIENT then
- do -- draw
- local font_name = "GotoMeta"
- surface.CreateFont(
- font_name,
- {
- font = "Roboto",
- size = 150,
- weight = 650,
- -- antialias = true, --true
- -- additive = true, --true
- outline = true,
- }
- )
- local function draw_text(text, color, x, y)
- surface.SetFont(font_name)
- surface.SetTextColor(color)
- surface.SetTextPos(x,y)
- surface.DrawText(text)
- end
- local function draw_text3D(txt,pos,ang,size)
- local alp = math.Clamp(300-((pos:Distance(LocalPlayer():GetPos()))/1500*255),0,255)
- if(alp!=0)then
- local tbl = {}
- local length = #txt
- for i = 1, length do
- local hsv=HSVToColor(((i / length) * 360-CurTime()*70)%360, 1, 1)
- table.insert(tbl, {char = txt:sub(i, i), color = Color(hsv.r,hsv.g,hsv.b,alp)})
- end
- surface.SetFont(font_name)
- local maxw,maxh = surface.GetTextSize(txt)
- local w, h = 0, 0
- local last_w, last_h = 0, 0
- cam.Start3D2D(pos,ang,size)
- for i, data in pairs(tbl) do
- draw_text(data.char,data.color,w/2 + last_w-maxw/2, h/2 + last_h-(math.sin(CurTime()*3-math.pi*4/#tbl*i)*25+25))
- local w, h = surface.GetTextSize(data.char)
- last_w = last_w + w
- end
- cam.End3D2D()
- end
- end
- local mat = Material("models/shadertest/predator")
- function ENT:Draw()
- render.SetMaterial(mat)
- render.DrawBox(self:GetPos() + Vector(0,0,70), self:GetAngles(), Vector(-66,-0,-75), Vector(66,31,60), Color(255,255,255), 10)
- local ang = self:GetAngles()
- ang:RotateAroundAxis(self:GetForward(), 90)
- draw_text3D(self.Name, self:GetPos() + Vector(0,0,100), ang, 0.23)
- end
- end
- net.Receive("server_teleport_leave", function(doquit, reason)
- local ent = net.ReadEntity()
- if ent:IsValid() then
- if ValidPanel(g_server_teleport_request) then return end
- g_server_teleport_request = Derma_Query(
- "Do you want to connect to " .. ent.Name .. "?",
- "Server teleport",
- "yes", function() Say("connect " .. ent.IP) end,
- "no", function() end
- )
- end
- end)
- end
- if SERVER then
- function ENT:Initialize()
- self:SetModel("models/hunter/plates/plate3x3.mdl")
- self:PhysicsInit(SOLID_VPHYSICS)
- self:SetMoveType(MOVETYPE_NONE)
- self:SetMaterial("models/props_lab/cornerunit_cloud")
- end
- util.AddNetworkString("server_teleport_leave")
- function ENT:StartTouch(ent)
- if ent:IsPlayer() then
- net.Start("server_teleport_leave")
- net.WriteEntity(self)
- net.Send(ent)
- end
- end
- end
- scripted_ents.Register(ENT, ENT.ClassName)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement