Garry's Mod Wiki

GM:OnViewModelChanged

  GM:OnViewModelChanged( Entity viewmodel, string oldModel, string newModel )

Description

Called when the player changes their weapon to another one - and their viewmodel model changes.

This is not always called clientside.

Issue Tracker: 2473

Arguments

1 Entity viewmodel
The viewmodel that is changing
2 string oldModel
The old model
3 string newModel
The new model