Hi.
My goal is to make different weapons for players, that is, for one player to have no more than four weapons to choose from:
close: fist, knife, axe, etc.
weak: pistol, sawed-off shotgun, etc.
medium: automatic rifle, submachine gun, shotgun, etc.
strong: plasma rifle, gauss rifle, bfg, etc.
How can this be done? Through different classes of players who have only one specific set of weapons?
Or does the inventory in zandronum also allow this and not pick up weapons if the slot is already occupied by some weapon?
I would appreciate help and working examples.
p.s. Is it possible to do it like it is implemented in ROTT, in which there can only be one strong weapon in the last slot and it can be changed if you pick up another one.
Limited number of weapons per player
-
- New User
- Posts: 9
- Joined: Sat Jul 12, 2025 8:53 pm
- Location: Tatarstan
Re: Limited number of weapons per player
If it has to be based on a tier then you will need to keep an array with the tier and what weapons fall under it in an ACS file. You can make weapon spawns inherit from CustomInventory and call a script that checks it on pickup and determines if you can grab the weapon by checking the weapon name using GetWeapon() and iterating the list. With the new lump reading you can make it easily modifiable and even extendable with patches.
As for the rest your question is confusing. What do slots and player classes have to do with this when the system you want is based on configurable tiers determined by yourself? I could have a weak slot 7 weapon, for example.
As for the rest your question is confusing. What do slots and player classes have to do with this when the system you want is based on configurable tiers determined by yourself? I could have a weak slot 7 weapon, for example.