I’m trying to code a weapon so it will fire a random prop. But I’m having difficulty implementing it due to the fact that I kinda suck.
Here is the fire function.
function SWEP:PrimaryAttack() if ( !self:CanPrimaryAttack() ) then return end self.Weapon:SetNextPrimaryFire( CurTime() + self.Primary.Delay ) self:TakePrimaryAmmo(1) self:throw_attack("---") end
How could I have it so there are multiple functions like that? and it chooses them randomly?