Garry's Mod Wiki


  GM:PlayerSetHandsModel( Player ply, Entity ent )


Called whenever view model hands needs setting a model. By default this calls PLAYER:GetHandsModel and if that fails, sets the hands model according to his player model.


1 Player ply
The player whose hands needs a model set
2 Entity ent
The hands to set model of


Sets the players hands to the model's hands.

function GM:PlayerSetHandsModel( ply, ent ) local simplemodel = player_manager.TranslateToPlayerModelName(ply:GetModel()) local info = player_manager.TranslatePlayerHands(simplemodel) if info then ent:SetModel(info.model) ent:SetSkin( ent:SetBodyGroups(info.body) end end