Weapons loading improperly

Hey guys (and gals?), I have this strange problem that I am not sure how to fix and more problematic still I don’t know whats causing it either and so I am hoping someone might know either or both how to fix and/or what the problem is.

When my gamemode starts and the players get their weapons, the last weapon purchased has the model of the weapon they start with. However, its not a SWEP shared.lua issue, as the model is correctly set there. The issue fixes itself if you select the weapon it is supposed to be and switch back.

So basically, lets say player usually starts with SMG1. Player decides to buy grenades. Now when player gets his weapons, it looks like he has his SMG1 out, however the mechanics (ammo, animation, etc) will be of the grenades. The issue resolves itself if the player switches to his grenades and switches back to his SMG1. The SMG1 will now function properly as will the grenades until the next round.

I experienced this issue in my mode earlier on in its coding and solved the issue by when the player is given a weapon, have the player select it, and thus since every weapon is selected, it basically in coding does what I found to fix it. However, recently it started happening again and I have not touched this part of my code, and so I have no idea why it no longer works again.

Anyone have any ideas?

Its just a common problem with switching weapons via lua to quickly, or auto switching, its like the Idle timer on the smg1 plays once he gets the grenade out.

Give him the weapon and then select it. Don’t let the engine do what it wants, because the engine will mess things up.