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.Entity:PhysicsInit( SOLID_VPHYSICS )
- self.Entity:SetMoveType( MOVETYPE_VPHYSICS )
- self.Entity:SetSolid( SOLID_VPHYSICS )
- self.Entity:SetModel( "models/cloudstrifexiii/football/football.mdl" )
- end
- local phys = self.Entity:GetPhysicsObject()
- if phys:IsValid() then
- phys:Wake()
- end
- function ENT:PhysicsCollide( data, phys )
- local ply = data.HitEntity;
- if ply and ply:IsValid() and ply:IsPlayer() then
- if ply:HasWeapon("weapon_football") then
- ply:GiveAmmo(1,"grenades");
- else
- ply:Give("weapon_football")
- end
- end
- end
- function ENT:SetPlayer( ply )
- self.player = ply
- end
- function ENT:GetPlayer( ply )
- return self.player
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement