Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if CLIENT then
- local function add_wf(data)
- local ply = data:ReadEntity()
- local model = data:ReadString()
- local pos = data:ReadVector()
- if ply.clientm and ply.clientm:IsValid() then ply.clientm:Remove() end
- ply.clientm = ClientsideModel(model)
- local cache_model = ply.clientm
- if not ply.clientm:IsValid() then return end
- ply.clientm:SetPos(pos)
- ply.clientm:SetModelScale(1.2, 0)
- ply.clientm:SetRenderMode(RENDERMODE_TRANSALPHA)
- ply.clientm:SetMaterial("models/vortigaunt/pupil")
- local a = 255
- hook.Add("Think", "remove_wireframe_tws" .. ply:EntIndex(), function()
- if not ply:IsValid() then
- if cache_model and cache_model:IsValid() then cache_model:Remove() end
- hook.Remove("Think", "remove_wireframe_tws" .. ply:EntIndex())
- end
- if ply.clientm and ply.clientm:IsValid() then
- if a <= 0 then
- hook.Remove("Think", "remove_wireframe_tws" .. ply:EntIndex())
- return
- end
- a = a - 0.5
- ply.clientm:SetColor(Color(a * 3, 255, a * 3, a))
- ply.clientm:SetAngles(Angle(0, CurTime() * 150, 0))
- ply.clientm:SetSequence(3)
- end
- end)
- end
- usermessage.Hook("make_wireframe_tws", add_wf)
- return
- end
- hook.Add("PlayerSpawn", "tws_spawnprotect", function(ply)
- if CLIENT then return end
- ply:GodEnable()
- local model = ply:GetModel()
- local pos = ply:GetPos()
- umsg.Start("make_wireframe_tws")
- umsg.Entity(ply)
- umsg.String(model)
- umsg.Vector(pos)
- umsg.End()
- timer.Simple(6, function()
- if IsValid(ply) then
- ply:GodDisable()
- end
- end)
- end)
- //blocker
- hook.Add("PlayerSpawnSENT", "blocker_tws", function(ply, class)
- if class == "sent_ball" then return false end
- return true
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement