Max bullets in weapon's clip and table with 2 Dimensions

Hello everyone. I want to know if there’s anyway to get the max bullets that a weapon can have loaded (SMG = 45, AR2 = 30, Shotgun = 6, Magnum .357 = 6), something like weapon(“weapon_smg”):GetMaxBullets() and how to get the weapon’s ammo type (weapon(“weapon_smg”):AmmoType). Also, I want to know how can I make a multi-dimension table, like: weapon = {(“weapon_smg”, “item_ammo_smg”), (“weapon_357”, “item_ammo_357”)}

Weapon:Clip1() and Weapon:GetAmmoType()

If you want to do it for a weapon you don’t have, then you need to look it up in the table you get from weapons.Get . That won’t work for HL2 (non Lua) weapons though, you need to just hardcode it for them.

A multidimensional table is simply a table where every value stored in it is another table.

This is the (very) long way of setting it up:
[lua]local WeaponsTable = {} --Make a new table

–Add a bunch of other table to it
WeaponsTable[“weapon_smg”] = {} --Make a new table stored under the key weapon_smg
WeaponsTable[“weapon_rpg”] = {} --Make a new table stored under the key weapon_rpg
WeaponsTable[“weapon_whatever”] = {} --etc

–Now you can set values on those tables
WeaponsTable[“weapons_smg”].ClipSize = 20 --Set clip size to whatever

The short way like in your post (not sure what you want for x,x) would be:
[lua]local WeaponsTable = {
weapon_smg = {
ClipSize = 20,
AmmoType = “item_ammo_smg”,
weapon_357 = {
ClipSize = 8,
AmmoType = “item_ammo_357”,

Post lua questions there: not here.

To get the value after I made the 2 Dimensions table can I use WeaponsTable[1][1]? There’s anything like that?