There is an array of weapon model strings. Each index corresponds to weapon id. I have an entity id. By classname i detected that it's a weapon ("weaponbox").Then i need to detect a weapon id. Sequental comparison of strings is a shitty method, but 100% workable.
I thought i can do like this:
1) first time detect a weapon id by sequantal comparison of model strings
2) make an association of modelindex -> weapon_id into modelindex2wid array assuming max model index is (for example) 255; so, next time i can get a weapon id immediately: weapon_id = modelindex2wid[entity.modelindex]
But that's not working (see my previous post)!
Is there any other common pev value for weapons of the same type/model, but unique for different types of weapons?