All pastes #542786 Raw Edit

Spawn weapon

public text v1 · immutable
·published 2007-06-05 22:37 UTC
rendered paste body
function GM:PlayerDeath( ply, weapon, killer )

	self.BaseClass:PlayerDeath( ply, weapon, killer );

	ply:GetTable().DeathPos = ply:GetPos();

	if( ply ~= killer or ply:GetTable().Slayed ) then
		
		local ent = ents.Create( currentWeapon:GetClass );
		ent:SetPos( ply:DeathPos );
		ent:Spawn();

		ply:GetTable().Arrested = false;
		ply:GetTable().DeathPos = nil;
		ply:GetTable().Slayed = false;
	
	end

end


function GM:Think
	if ( ply:Alive() ) 
		currentWeapon = ply:GetActiveWeapon();
	end
end