TTT Custom Player Model HANDS Not Showing

I’m a LUA noob. Here’s what I’ve done.


hook.Add("TTTBeginRound", "BeginRoundDetectiveSkin", function()
    for k,v in pairs(player.GetAll()) do
        if v:IsActiveDetective() then v:SetModel(Model("models/player/dduck/daffyduck.mdl")) end
	if v:IsActiveDetective() then ply:SetupHands() end
    end
end)

The hands aren’t showing for my custom Detective model. I really don’t know what to do. Help!

Bump.

Take a look at this

I appreciate that link but I copy/pasted some of that code into this in various ways, editing what I understand, and no luck.


hook.Add("TTTBeginRound", "BeginRoundDetectiveSkin", function()
    for k,v in pairs(player.GetAll()) do
        if v:IsActiveDetective() then v:SetModel(Model("models/goatplayer/goat_player.mdl")) end
    end
end)

I added this:


player_manager.AddValidModel( "goatplayer", "models/goatplayer/goat_player.mdl" )
player_manager.AddValidHands( "goatplayer", "models/goatplayer/goat_arms.mdl", 0, "00000000" )

and nothing.

Then I pasted this directly under and still nothing.



function PLAYER:GetHandsModel()

	return { model = "models/weapons/models/goatplayer/goat_arms.mdl", skin = 0, body = "0000000" }

end

Bump – more help would be appreciated. Sorry if I’m annoying. :frowning:

(General questions)
Are the hand models only not shown if you have specific weapon?
Do you see any error textures?

The hand models are coming up as regular terrorist hands with every weapon. There are no error textures. I’m only using this code right now. I don’t know what do add to it to change the Detective’s hand models. I tried a lot, whatever that means, to the extent of my ability.


hook.Add("TTTBeginRound", "BeginRoundDetectiveSkin", function()
    for k,v in pairs(player.GetAll()) do
        if v:IsActiveDetective() then v:SetModel(Model("models/goatplayer/goat_player.mdl")) end
    end
end)

Bump.

Bump.

Bump.

Don’t bump so frequently. You don’t need the “Model” inside the SetModel args, that might be what’s breaking it. Also TTT might be setting the model after your code is being called, so if the above doesn’t work add a .1 second timer before you set the model. Or a less ghetto fix would be editing the TTT gamemode and making it so the default model for detectives would be your custom model.

Thanks. I just tried to add a timer to the gamemode, so that I could delay when TTT assigns models to everyone so that the Detective model is chosen at the same time which would give the Detective his/her proper hands.


timer.Simple( 15, function GetRandomPlayerModel() end )
   return table.Random(ttt_playermodels)
end

I go into the game and nothing. In fact, script errors, lol.

Probably because that code makes no sense.

Chill fam wtf, when I said I was a LUA noob I wasn’t lying. Can you help me make that make sense? At least respect the fact that I’m making an effort here, lol.

Bump.

Bump.

Bump.

Nobody knows ffs. It works for other people by default afaik so nobody knows why your version alone is causing an issue for yourself. It also doesn’t help that TTT is poorly coded and that support for c_ hands is wonky.

You should probably make sure that the weapons are using c models.

If you have any weapons using v models, the hands are a part of the viewmodel, while c models support custom hands.