Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- AddCSLuaFile()
- ENT.Base = "base_anim"
- ENT.Type = "anim"
- ENT.PrintName = "shiddy"
- ENT.Author = "cossack"
- ENT.Category = "mainboard blues"
- ENT.Spawnable = true
- ENT.AdminOnly = true
- ENT.PhysgunDisable = true
- ENT.PhysgunAllowAdmin = true
- if SERVER then
- function ENT:SpawnFunction(client, trace)
- local entity = ents.Create(className)
- entity:SetPos(trace.HitPos + Vector(0,0,50))
- entity:SetAngles(trace.HitNormal:Angle())
- entity:Spawn()
- entity:Activate()
- end
- end
- function ENT:Initialize()
- self:SetModel("models/props_junk/wood_crate001a.mdl")
- self:PhysicsInit(SOLID_VPHYSICS)
- self:SetSolid(SOLID_VPHYSICS)
- self:SetMoveType(MOVETYPE_VPHYSICS)
- self:DrawShadow(false)
- local phys = self:GetPhysicsObject()
- if phys:IsValid() then
- phys:Wake()
- end
- end
- else
- function ENT:Draw()
- -- Draw Model.
- self:DrawModel()
- local angles = self:GetAngles()
- local vector = self:GetPos()
- cam.Start3D2D(vector, angles, 1)
- surface.SetDrawColor( Color( 255, 165, 0, 255 ) )
- surface.DrawRect( 0, 0, 8, 8 )
- cam.End3D2D
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement