03.09.2013, 12:12
Use GetPlayerWeaponData and get the player's weapon data. Store them to an array and get the weaponid from its name (****** it, you'll find results). Reset the weapons of the player and give them back with a for loop (like the example GetPlayerWeaponData shows at the Wiki), but check if the 3rd parameter which is the weaponid is different (inside the loop) to the id of the weapon you typed (in that case, M4).
Pretty much the same to give it back, but without exceptions. Just loop without any if statement to check the weaponid.
Pretty much the same to give it back, but without exceptions. Just loop without any if statement to check the weaponid.