Weapon Inventory System GTA style. PickUp,Swap

I have the idea of ​​creating a GTA-style inventory system, using an “Inventory” array, the group of objects that will be added to the “Weapons” inventory and the “Swap” Variable to exchange between the weapons stored in the inventory.

1- the name of the object taken must be added to the “Inventory” Array using: Weapons.ObjectName(). after this it would be something like this

0 = shotgun
1 = smg
2 = pistol

2- then use an indicator that can move between 0, 1, 2. something like a variable that increases and decreases its value

The value that is indicated will be the selected weapon

3- then it would be necessary to see what to do if the inventory is exceeded, it returns to 0 and vice versa. and other problems

As you can see, I’m using gdevelop5, so I don’t know anything about programming and I don’t know if doing this is possible.