T.T.T. only 1 Traitor

This was taken from another site and they want help with some coding. (I have removed names)

Effectively what they need is a Trouble in Terrorist Town version that always selects one Traitor and gives the Traitor 5 credits. If someone here could do this we would be very thankfull.

I also jumped the gun and asked the experts here to do this before they set our developers onto this task. If they want me to remove/edit this I will.

I’ll look into it, gimme a minute

init.lua - Gives 5 credits on start – Replace the 1 line of coding that look like this



CreateConVar("ttt_credits_starting", "2"))


with this


-- Traitor credits
CreateConVar("ttt_credits_starting", "5")


init.lua - Makes 1 traitor only – Replace the 1 line of coding that looks like this



((not table.HasValue(prev_roles[ROLE_TRAITOR], pply)) or (math.random(1, 3) == 2)) then


with this



((not table.HasValue(prev_roles[ROLE_TRAITOR], pply)) or (math.random(1, 3) == 2)) and (ts < 1) then


I’m not 100% sure this will work, but it’s a pretty simple change.

Thank you.

You’re welcome.

Or you can change the convar that controls the percentage of players who are traitors to 1%. That way it would take over 100 players for more then 1 traitor. Which would be impossible.


BREAKING NEWS: TacoNBanana - T.T.T. SERIOUS RP 24/7 NOW OPEN

Thanks for sandbagging me.