Random Prop Ammo?

Is it possible to make a gun shoot random props each shot, not the same one over and over? If so, whats the ammo type i put in the lua?

It isn’t as simple as changing the ammo type. The best way of doing this is creating a table of valid models that your weapon is able to fire, then each time the weapon is fired, create a prop_physics and set its model to a random model from the table.




what do i separate the models with in lua? a ;?

A comma.
[lua]local ModelsTable = {

do you know where i can find a list of props i can use?


In your Garry’s Mod directory (steam/steamapps/<your name>/garrysmod/garrysmod), navigate to settings/spawnlist. Take a look at the models in the Useful Construction Props list.



im using a swep maker, where do i insert the table.random?

SWEP.Secondary.Model = local ModelsTable = {
} // the model you want to fire.

This probably won’t work with a SWEP maker. I would suggest coding it from scratch for experience, or modifying the Chair Throwing SWEP.

May I ask what SWEP Maker you are using?

im not sure. i think it may have been deleted from gmod.org as i cant find it