hello!
i wanted to make the commands(ttt_force_traitor or det~)to active in sv_cheats 0
So i modified like this but it was not works and after prep time, the play time(5 minutes) became prep time too!
\garrysmod\gamemodes\terrortown\gamemode\traitor_state.lua
LINE 124
[lua]
local function force_traitor(ply)
if server_settings.Bool("sv_cheats", 0) then
ply:SetRole(ROLE_TRAITOR)
SendFullStateUpdate()
end
end
concommand.Add("ttt_force_traitor", force_traitor)
[/lua]
I modified like this , becuase if superadmin wants to be traitor,so be it
LINE 124
[lua]
local function force_traitor(ply)
if ply:IsSuperAdmin()
ply:SetRole(ROLE_TRAITOR)
SendFullStateUpdate()
end
end
concommand.Add("ttt_force_traitor", force_traitor)
[/lua]
But as i said , it was not works and the play time became prep time lol...
what should i do ?..
[lua]local function force_traitor(ply)
if ply:IsSuperAdmin() then
ply:SetRole(ROLE_TRAITOR)
SendFullStateUpdate()
end
end
concommand.Add("ttt_force_traitor", force_traitor)[/lua]
You forgot a "then"
[QUOTE=.\\Shadow};30810662][lua]local function force_traitor(ply)
if ply:IsSuperAdmin() then
ply:SetRole(ROLE_TRAITOR)
SendFullStateUpdate()
end
end
concommand.Add("ttt_force_traitor", force_traitor)[/lua]
You forgot a "then"[/QUOTE]
Thanks! but it was not works..
Here's what i did
[lua]
local function force_traitor(ply)
if ply:IsSuperAdmin() then
ply:SetRole(ROLE_TRAITOR)
SendFullStateUpdate()
end
end
concommand.Add("ttt_force_traitor", force_traitor)
[/lua]
and when the round has begining , i input "ttt_force_traitor" in console.
But i was stiil innocent..
Please help me one more
That's odd, it should work... Did you do it before or after the innocents were picked?
[QUOTE=InfernalCookie;30813755]That's odd, it should work... Did you do it before or after the innocents were picked?[/QUOTE]
i did it after the innocents were picked lol and it works now ! thanks!
How'd you get it to work?
Nvm I fixed it
[QUOTE=Apozen;30818235]How'd you get it to work?
Nvm I fixed it[/QUOTE]
How did you do that?
i thought that it works but it is not..
i input "ttt_force_traitor" before innocents were picked.
but i didnt be the traitor..
You type it in after the innocents have been chosen. It turns you from an innocent to a Traitor.
[QUOTE=Apozen;30819702]You type it in after the innocents have been chosen. It turns you from an innocent to a Traitor.[/QUOTE]
Yeah it works thanks!
I edited the code so it will set your role once the round starts, instead of waiting after the round starts. If you want it PM me or contact me on steam, if we're added.
~Stoned Phoenix
[QUOTE=InfernalCookie;30833392]I edited the code so it will set your role once the round starts, instead of waiting after the round starts. If you want it PM me or contact me on steam, if we're added.
~Stoned Phoenix[/QUOTE]
I sent you a PM
[QUOTE=cyw960517;30838913]I sent you a PM[/QUOTE]
Same
Sorry, you need to Log In to post a reply to this thread.