You can't. Most weapon settings are not accessible via script. However, you can create a set of weapon files named differently than the stock ones, and switch between them by giving them to the player, then taking them away again and replacing them with stock ones.