HUD Playermodel Not Updating

I am working on a HUD for DarkRP (mostly to practice my skills). I am displaying the playermodel in the HUD. I’d like it to change the playermodel each time the player changes job. How can I achieve this?

Thanks in advance.

There’s a hook when team changes

Are you able to link me to some documentation on the hook, or provide an example? Thanks

GM:OnPlayerChangedTeam

Will that work for DarkRP? To me, it seems like DarkRP would have a custom way of creating jobs, rather than using the default method of creating teams (if that sentence made any sense)

You can test it

http://wiki.darkrp.com/index.php/Hooks/Shared/OnPlayerChangedTeam

or just do this:



function modelPanel:Think()

      if self:GetModel() != LocalPlayer():GetModel() then
            self:SetModel( LocalPlayer():GetModel() )
      end
      
end


dont think it’s better to use a server-side hook to change the model client-side :smiley:

That worked perfectly. Thanks Tupac.