Garry's Mod

Garry's Mod

39 ratings
pmTTT
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Gamemode
Addon Tags: Roleplay, Realism
File Size
Posted
Updated
6.338 KB
5 Jun, 2021 @ 6:02pm
11 Aug, 2021 @ 5:43am
9 Change Notes ( view )

Subscribe to download
pmTTT

Description
pmTTT
A stupid simple GMOD Lua script dedicated to having custom playermodels for TTT/TTT2.

Upon startup, the Lua script will generate a config JSON file in garrysmod/data. Edit it accordingly and adjust it to your needs.

The format of the config is very simple and easy. Taking a look at the default config JSON, we can see that there are role-specific configurations inside maps, which will load the playermodels inside there if the current map is located in the list. Outside of maps are the default configurations. Inside of them contain string arrays containing the modelpaths for the specific roles. If using TTT2, you can run ttt_roles_index in console to get a list of all your installed roles. For TTT1, stick to using only innocent, traitor and detective. If a role isn't specified, it'll either pick the playermodels for innocent (or whatever the first role is if using TTT2), or the first role specified in the list.

Commands
ttt_pm_enable <1/0> - Enable or disable pmTTT
ttt_pm_randbodygroups <1/0> - Picks random bodygroups depending on the order type
ttt_pm_randskin <1/0> - Picks a random skin value depending on the order type
ttt_pm_ordertype <-2/-1/0/1/2> - This sets the order type for playermodels.
  • ttt_pm_ordertype -2 picks a random playermodel each round, but every player shares one depending on their role
  • ttt_pm_ordertype -1 picks the first playermodel listed in their role, every player shares one depending on their role
  • ttt_pm_ordertype 0 will always pick the playermodel depending on the players UserID
  • ttt_pm_ordertype 1 will pick the randomly picked playermodel from when the player initially spawned.
  • ttt_pm_ordertype 2 will pick a new random playermodel for every player on a new round.
ttt_pm_loadconfig - Upon execution, it'll reload the configuration file.

Misc
Source Code: https://github.com/bjrkk/pmttt
15 Comments
dw 30 Jun, 2023 @ 10:23am 
No clue if you still care about this addon or have time, but I would love any sort of config feature to manually select certain bodygroups/skins on certain models
bjrkk  [author] 1 Sep, 2021 @ 8:42am 
@rateedus yeah the issue seems to be with your config file, look for any mistakes you made like missing a comma and fix them up; you could also use a json validator online or something if you don't know where you've made a mistake. not else much to say here
rateedus 1 Sep, 2021 @ 7:15am 
when I load the config, it says: Error: Failed to convert JSON to table
rateedus 1 Sep, 2021 @ 7:15am 
[pmTTT] lua/autorun/ttt2_randompm.lua:76: attempt to get length of local 'tbl' (a nil value)
1. Run - lua/autorun/ttt2_randompm.lua:76
2. SpawnForRound - gamemodes/terrortown/gamemode/server/sv_player_ext.lua:609
3. SpawnWillingPlayers - gamemodes/terrortown/gamemode/server/sv_main.lua:1199
4. unknown - gamemodes/terrortown/gamemode/server/sv_main.lua:956
bjrkk  [author] 1 Sep, 2021 @ 2:03am 
@rateedus any errors/logs? does doing ttt_pm_loadconfig in the console return an error? seems to work completely fine on my side
rateedus 31 Aug, 2021 @ 7:31pm 
I'm having the same issue with the round not starting/spawns not happening with this mod and ttt2
Raggle 11 Aug, 2021 @ 5:23pm 
You're a legend
bjrkk  [author] 11 Aug, 2021 @ 5:47am 
just added that in, now it is: ttt_pm_ordertype -2 should do exactly just that
Raggle 10 Aug, 2021 @ 4:43pm 
This is awesome! Is it possible to force every player to have the same model when the round starts?
You 23 Jul, 2021 @ 8:21am 
Awesome! Thank you so much for creating this and even going beyond for TTT2! :D