Well I've gone through with my idea and it seems to work fine!
Here's how to do it:
In q_shared.h, change
38 is MAX_WEAPONS * 2. Using a short means that only 16 bits are used per ammo slot, rather than 32, allowing for double the number of weapons.
You must also remember that ps.stats[STAT_WEAPONS] holds a bit field of the weapons a player carries. However, this is sent as a 19-bit field (contrary to what the declaration in the header says of 16 bits). I've simply replaced all instances of ps.stats[STAT_WEAPONS] with ps.userInt1, and resized this field to 32 bits in the ext_data/MP/psf_overrides.txt file.
And then now you're increase the maximum weapon limit up to 32!