Hai guise! i am making a swep that if you right click, you die and drop a grenade, i get the drop thing to work but it wont be activated after drop, you need to pick it up with the gravity gun to make it work, HALP ME PL0X! D:
HERE IS TEH CODE!
function SWEP:SecondaryAttack()
local ent = ents.Create ("npc_grenade_frag");
ent:SetEntity ("npc_grenade_frag");
ent:SetPos (self.Owner:EyePos() + (self.Owner:GetAimVector() * 16));
ent:SetAngles (self.Owner:EyeAngles());
ent:Spawn();
ent:Activate();
local phys = ent:GetPhysicsObject();
RunConsoleCommand("kill");
end
PS: i spelt bad because i wanted to :3