TTT Detective Playermodel

I want to change the default ttt detective player model(s) to this one “models/player/aiden_pearce.mdl”

If I have to code what code would I have to do to achieve this. And if possible can anyone write the code for me
Or would I have to go into the terrortown gamemodes folder and switch some things there.

Thanks

I haven’t played TTT myself so I wouldn’t be able to say for sure but if you go into garrysmod/gamemodes/terrortown/gamemode/shared.lua on line 106 you find


-- Everyone's model
local ttt_playermodels = {
   Model("models/player/phoenix.mdl"),
   Model("models/player/arctic.mdl"),
   Model("models/player/guerilla.mdl"),
   Model("models/player/leet.mdl")
};


Maybe you could change up one of these models?

Ok i’ll check it out

[editline]20th February 2017[/editline]

I’ll Check it out

**TTTBeginRound **Hook > Loop through all players > v:GetRole() == ROLE_DETECTIVE > v:SetModel(“models/player/aiden_pearce.mdl”)



hook.Add( "TTTBeginRound", "your_hook_name", function()

  for k, v in pairs( player.GetAll() ) do
    if v:GetRole() == ROLE_DETECTIVE then
      v:SetModel("models/player/aiden_pearce.mdl")
    end
  end

end)