Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- AddCSLuaFile( "cl_init.lua" )
- AddCSLuaFile( "shared.lua" )
- include("shared.lua")
- function ENT:Initialize()
- self:SetUseType( SIMPLE_USE )
- self:SetModel( "models/props_junk/garbage_metalcan001a.mdl" )
- self:PhysicsInit( SOLID_VPHYSICS ) -- Make us work with physics,
- self:SetMoveType( MOVETYPE_VPHYSICS ) -- after all, gmod is a physics
- self:SetSolid( SOLID_VPHYSICS )
- self:SetColor(Color( 153,51, 255 )) -- Toolbox
- local phys = self:GetPhysicsObject()
- if (phys:IsValid()) then
- phys:Wake()
- end
- end
- function ENT:Use( activator, caller )
- end
- function ENT:SpawnFunction( ply, tr, ClassName )
- if ( !tr.Hit ) then return end
- local SpawnPos = tr.HitPos + tr.HitNormal * 16
- local ent = ents.Create( ClassName )
- ent:SetPos( SpawnPos )
- ent:SetBallSize( math.random( 16, 48 ) )
- ent:Spawn()
- ent:Activate()
- return ent
- end
- function ENT:Think()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement