Garry's Mod

Garry's Mod

316 ratings
TTT Custom Playermodels
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Gamemode
Addon Tags: Roleplay, Realism
File Size
Posted
Updated
1.397 KB
31 Dec, 2015 @ 3:39pm
2 Jan, 2016 @ 4:02pm
3 Change Notes ( view )

Subscribe to download
TTT Custom Playermodels

In 1 collection by The real Samuel L.
ttt.tam.gg - server content
50 items
Description
Change playermodels in TTT gamemode easily.

Why does this addon exist
It's because the most ttt servers using the default models thats not bad but its very boring.
So with this addon you can make a server with unique player models that is easy to install and configure.

Features
·Random skin selection
·Add as many models as you want.
·Models automatically added to downloadlist.
·Models for detective and innocent/traitor roles.
·Configuration while Ingame (without restarting client/server and no there is no "ingame configuration menu")
·Support of all game hooks that the models stays anytime the same.

Usage
When you fire up the addon the first time it will generate a new file.
You'll find it under 'garrysmod/data/ttt_custom_playermodels.txt' its written in JSON if you wanna now more about it then google it.

Example:
{
"player1": "models/test/model.mdl",
"player2": "models/test2/model2.mdl",
"detective1": "models/test3/model3.mdl"
}

ATTENTION: you have to now the model path if you're using an model out of the workshop you have to open the addon and find out how the *.mdl file is called. You can do that by using programs like the GMAD Extractor
See also: interactive editor[tjark-kuehl.github.io]

About the script
The config will reload any preperation in the TTT gamemode and you'll get a new random skin everytime.
The models wil be set 0.2 seconds after the TTTPrepareRound, TTTBeginRound and the TTTEndRound hook entered the script, because if found a problem if i wanna set them instandly that the dont overwrite the default skins.
There is also a timer that asks if a custom skin is set to take care of all the other hooks that can change the model.

Source
https://github.com/Tjark-Kuehl/TTT-Custom-Playermodels
41 Comments
Mofker 26 Aug, 2022 @ 9:39am 
NVM I figured it out. Just had to increase the 0.2 second timer to trigger 1 second after the round started
Mofker 25 Aug, 2022 @ 12:21pm 
I can't seen to get this to work.
The playermodels switch back to normal terrorists after the preptime is over.
Pro American 15 Aug, 2022 @ 10:59pm 
omg Im a moron. It has taken me two years to figure out why some playermodels would be briefly shown, then overwritten. the answer is capital letters

Ignore what I said last year. Models are case sensitive when checking if playermodels are valid, but not in setting them. If you put caps in your garrysmod/data/ttt_custom_playermodels it will set the model correctly, but the IsValidPlayermodel will mark the model as invalid as the lowercase string doesnt exist in the playerModel table. this can be fixed with a string.lower to keep file structure, or just dont use caps

TLDR go into your garrysmod/lua/playermodels.lua and add change lines 60 and 66 to " if string.match(detectiveModels[k], model, 0) then" and "string.match(string.lower(playerModels[k]), model, 0)"
TheMysticR 19 Mar, 2022 @ 5:12am 
I dont get a txt file in garrysmod/data/
And the people who I play with didn't get it either.

How do I add Playermodels to it now?
Pro American 21 Dec, 2021 @ 9:46pm 
I had a problem where certain playermodels (such as the first playermodel added) would always be considered invalid by the fuction IsValidPlayermodel. They would still be chosen at the start of the round, but then 5 seconds later a new model would be assigned, causing players to rapidly change model. This meant some models were never chosen despite me adding them to ttt_custom_layermodels. This problem is likely caused by Timer_CheckPlayermodel.

I have no idea why this happens. in testing, if only two models are added to ttt_custom_playermodels, if the first model is chosen, it will always turn into the second model after either 5 or 10 seconds. The second model never changes. I have no idea why this could be the case, but the problem in likely the IsValidPlayermodel function.

I fixed this by removing said timer and IsValidPlayermodel function, which causes the addon to work better.
Fellow Gibus 9 Mar, 2021 @ 9:22pm 
Hello dev. The mods works up until the start timer is up and we are all given our roles. Majority of the time we just go back to the normal default terrorists; however rarely we will be terrorists but one person will be a custom model. You have any ideas for a fix?
S. HITMAN 23 Sep, 2020 @ 12:14am 
can you do something like this for player colors?
F3AR_E4TER.exe 1 Feb, 2019 @ 6:08pm 
You don't need mod making tools to figure out the model path for custom models, just get NPCifier and select a model to use with the NPCifier tool in-game, then it will tell you the model path.
WaYnE 18 Dec, 2018 @ 7:19am 
I dont get a txt file in garrysmod/data/.
This addon is subscribed but i dont get the file for configuration.
ONeill3007 24 Sep, 2018 @ 6:39pm 
For some reasons, the playermodels on the players are changing every few seconds, even while the game is running.
Any ideas?