I'd store everything that is a pickup in a type collection
Then loop through each type object and do a distance check between the player and each of the type objects. Then, if the obect is within a certain distance, check to see what kind of pickup it is. Then, depending on that, add extra ammo, or health, or add a flag saying you have picked up a gun.
What i'd do, is give you player all the guns he will ever have, but have a flag for each gun, a variable saying gun_available = 0: When switching weapons, check the flag for each gun, If the flag = 1 then, you can switch to that weapon, if not, you don't "have" it.
Type pickup field x,y,z field p_type ; the type of pickup field quantity ; the quantity of the pickup End Type
Then loop through each type object and do a distance check between the player and each of the type objects. Then, if the obect is within a certain distance, check to see what kind of pickup it is. Then, depending on that, add extra ammo, or health, or add a flag saying you have picked up a gun.
What i'd do, is give you player all the guns he will ever have, but have a flag for each gun, a variable saying gun_available = 0: When switching weapons, check the flag for each gun, If the flag = 1 then, you can switch to that weapon, if not, you don't "have" it.