Garry's Mod Wiki

Revision Difference

GM:PlayerSetModel#552850

<function name="PlayerSetModel" parent="GM" type="hook"> <ishook>yes</ishook>⤶ <description> Called whenever a player spawns and must choose a model. A good place to assign a model to a player. <note>This function may not work in your custom gamemode if you have overridden your <page>GM:PlayerSpawn</page> and you do not use self.BaseClass.PlayerSpawn or <page>hook.Call</page>.</note> </description> <realm>Server</realm> <predicted>No</predicted>⤶ <args> <arg name="ply" type="Player">The player being chosen</arg> </args> </function> <example> <description>Sets the player's model to Odessa</description> <code> function GM:PlayerSetModel( ply ) ply:SetModel( "models/player/odessa.mdl" ) end </code> </example>