Player Model set for certain Steam ID's?

Is there a code for setting a person with a certain Steam ID to a certain player model? I have thought it was this:



function GM:PlayerSetModel( ply ) if ply:SteamID() == "STEAM_0:1:14817695" then
    ply:SetModel( "models/player/slow/tau_commander/slow_tau_commander.mdl" )
else
    ply:SetModel("models/player/group01/male_07.mdl")
end
 
end

PlayerSetModel is not a hook (to the best of my knowledge), so if you want to set their player model do this

[lua]

hook.Add(“PlayerSpawn”, “SetPlyModel”, function( ply )
if( ply:SteamID() == “STEAM_0:1:14817695” ) then
ply:SetModel(“models/player/slow/tau_commander/slow_tau_commander.mdl”);
else
ply:SetModel(“models/player/group01/male_07.mdl”);
end
end)
[/lua]

Yeah it is **[Gamemode.PlayerSetModel

http://wiki.garrysmod.com/favicon.ico](wiki.garrysmod.com/?title=Gamemode.PlayerSetModel)**, but reading that, the additional notes state that “If you override Gamemode.PlayerSpawn, this stops being called.”, could that be your issue?

My code should work right off the bat, no reason in wasting time troubleshooting why PlayerSetModel hook is called.

if you want to override playerspawn but still use this hook:
[lua]
function GM:PlayerSpawn()
GAMEMODE.PlayerSetModel()
end
[/lua]

just call that hook somwewhere like I did in the function and it should work

thank you it worked