All pastes #542844 Raw Edit

Someone

public text v1 · immutable
·published 2007-06-05 23:04 UTC
rendered paste body
function GM:PlayerDeath( ply, weapon, killer )
	ply.DeathPos = ply:GetPos()

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

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

end


function GM:Think()
    for _, ply in pairs(player.GetAll()) do
	if ( ply:Alive() ) then
		ply.currentWeapon = ply:GetActiveWeapon():GetClass()
	end
    end
end