Problems when calling the data table

Hi! I don’t speak English so I’m going to use a translator!

I’m implementing a shooting system in my game, everything is great so far, I can shoot … Reload … Change weapons … Precision system … But my problem comes when I have 2 weapons and I want to use a data table for the different weapons

The table is assembled with the basic variables that I use. My problem is that I don’t know how to “call” the lines of the tables. That is, if I use an AK47 (for example), I would like it to call the line of the AK47 in the table, since it is always being used line 1 … Use whatever weapon you use.

I’ve been porbando and testing for 3 afternoons and it’s impossible for me. I simply want to achieve that, that my character detects that I have an AK equipped and the line of the AK is 3, that he calls line 3 …

I don’t think it’s that complicated but I can’t get it, in the afternoon when I get home from work I’ll pass photos if necessary, thanks in advance!