Garry's Mod

Garry's Mod

39 个评价
pmTTT
   
奖励
收藏
已收藏
取消收藏
素材类型: 插件
插件类型: 游戏模式
插件标签: 角色扮演, 写实
文件大小
发表于
更新日期
6.338 KB
2021 年 6 月 5 日 下午 6:02
2021 年 8 月 11 日 上午 5:43
9 项改动说明 ( 查看 )

订阅以下载
pmTTT

描述
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 条留言
viva la bands 2023 年 6 月 30 日 上午 10:23 
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
omi  [作者] 2021 年 9 月 1 日 上午 8:42 
@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 2021 年 9 月 1 日 上午 7:15 
when I load the config, it says: Error: Failed to convert JSON to table
rateedus 2021 年 9 月 1 日 上午 7:15 
[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
omi  [作者] 2021 年 9 月 1 日 上午 2:03 
@rateedus any errors/logs? does doing ttt_pm_loadconfig in the console return an error? seems to work completely fine on my side
rateedus 2021 年 8 月 31 日 下午 7:31 
I'm having the same issue with the round not starting/spawns not happening with this mod and ttt2
Raggle 2021 年 8 月 11 日 下午 5:23 
You're a legend
omi  [作者] 2021 年 8 月 11 日 上午 5:47 
just added that in, now it is: ttt_pm_ordertype -2 should do exactly just that
Raggle 2021 年 8 月 10 日 下午 4:43 
This is awesome! Is it possible to force every player to have the same model when the round starts?
You 2021 年 7 月 23 日 上午 8:21 
Awesome! Thank you so much for creating this and even going beyond for TTT2! :D