In this script if a player RDMs it announces it, then forces the “weapon_mu_magnum” to drop and the player can’t pick it up for 500 seconds. That works great, but my problem is that if two or more people RDM then they can pick eachothers magnums up, just not their own. Would there be any way to make so they are restricted from using the magnum period, not just their own?
Announcing RDM and dropping weapon:
if attacker != ply then if self.ShowBystanderTKs:GetBool() then local ct = ChatText() local col = attacker:GetPlayerColor() ct:Add(attacker:Nick() .. ", " .. attacker:GetBystanderName(), Color(col.x * 255, col.y * 255, col.z * 255)) ct:Add(" killed an innocent bystander") ct:SendAll() end attacker.LastTKTime = CurTime() attacker:CalculateSpeed() timer.Simple(0, function () if IsValid(attacker) && attacker:HasWeapon("weapon_mu_magnum") then local wep = attacker:GetWeapon("weapon_mu_magnum") wep.LastTK = attacker wep.LastTKTime = CurTime() attacker:DropWeapon(wep) end end) end
Not being able to pick that weapon up after rdm for 500 seconds:
if ent.LastTK == ply && ent.LastTKTime + 500 > CurTime() then return false end end