Someone
public text v1 · immutablefunction 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