Garry's Mod

Garry's Mod

Custom Roles for TTT [OUTDATED]
Dee 2019 年 10 月 19 日 上午 9:05
Is there any way to make TTT workshop weapons available to other traitor roles?
Hey, this mod is basically perfect and I gotta thank ya'll for making it. I just have one question: is there any way I can make it so that I can give other traitor-team roles the ability to buy workshop weapons? I found that if I ever want to buy these weapons, I have to "ttt_force_traitor" myself and open the shop for them to appear. Any way I can avoid having to do this if I want to use other weapons as, say, a vampire or zombie or hypnotist, etc.
< >
正在显示第 1 - 2 条,共 2 条留言
SniperTheNoodle 2019 年 12 月 26 日 下午 5:41 
i believe this is on purpose its to balance their op traits
HYDRAVOLT 2020 年 1 月 25 日 下午 4:50 
you would have to decomplie the workshop addon and add the roles to the swep's shared.lua file, ie:
...
if (GetConVar("ttt_jihad_buyable"):GetBool()) then
-- CanBuy is a table of ROLE_* entries like ROLE_TRAITOR and ROLE_DETECTIVE. If
-- a role is in this table, those players can buy this.
SWEP.CanBuy = { ROLE_TRAITOR } // <--------- @HERE IS WHERE YOU ADD IT

-- If LimitedStock is true, you can only buy one per round.
SWEP.LimitedStock = true
end
...
I don't know the roles enumerator tho. this is an excerpt from the jihad bomb file, but all weapons have this section
< >
正在显示第 1 - 2 条,共 2 条留言
每页显示数: 1530 50