PivityGmodStore

Ammo

Explanation

Items with the Type = "Ammo" will give the player the desired ammo and a certain amount of that ammo.

Code Example

CH_NPC_Shops.Items["ammo_buckshot"] = { -- A unique name. This can be anything as long as it's unique.
Name = "Buckshot Ammo (10 Rounds)", -- Display name in the menu
Class = "Buckshot", -- The ammo class (use the toolgun to spawn the weapon whos ammo you want to know the name of. See the name of the ammo popup on the right side of your screen)
Type = "Ammo", -- Type of the item (in this case Ammo)
Price = 500, -- How much does it cost?
Amount = 10, -- How much ammo do we give?
Description = "10 rounds of buckshot ammo typically used with shotguns.", -- The description
Model = "models/Items/BoxBuckshot.mdl", -- The model in the menu
Color = Color( 0, 160, 0 ), -- The color behind the model panel
CanBuy = true, -- If the item can be bought from the store
}

You can find default ammo types here: https://wiki.facepunch.com/gmod/Default_Ammo_Types

Can't find what you're looking for?

Contact support