Welcome, Guest. Please login or register.
Did you miss your activation email?
September 20, 2024, 06:25:52 AM
Home Help Login Register
News: Trouble in Terrorist Town? Site here, forum here.

Zombie Master  |  Other  |  Trouble in Terrorist Town  |  Topic: TTT Admin Commands For ULX (Download)
Pages: [1] 2
Author Topic: TTT Admin Commands For ULX (Download)  (Read 11806 times)
Oren
Poster

Posts: 2


« on: August 30, 2010, 11:31:22 AM »

I coded 4 new buttons for the ULX admin addon.


    [li]Respawn - Respawns a player. Can be very helpful in RDM cases.[/li]
    [li]Traitor - Turns a player into a traitor.[/li]
    [li]Detective - Turns a player into a detective.[/li]
    [li]Innocent - Turns a player into an innocent.[/li]




Download:
http://hotfile.com/dl/65736743/cfcf4e8/ttt.lua.html

Put the file in:
/garrysmod/addons/ulx/lua/ulx/modules/ttt.lua

The code in case the file host deletes the file sometime (ttt.lua):
--[[
Title: TTT

Some TTT related functions (respawn,traitor,detective,innocent)

Made by Oren Yomtov (thenameisoren at gmail)
]]
ulx.setCategory( "TTT" )

function ulx.cc_respawn( ply, command, argv, args )
if #argv < 1 then
ULib.tsay( ply, ulx.LOW_ARGS, true )
return
end

local targets, err = ULib.getUsers( argv[ 1 ], _, true, ply ) -- Enable keywords
if not targets then
ULib.tsay( ply, err, true )
return
end

for _, v in ipairs( targets ) do
ulx.logUserAct( ply, v, "#A respawned #T" )
v:SpawnForRound(true)
end
end
ulx.concommand( "respawn", ulx.cc_respawn, "<user(s)> - Respawns target(s).", ULib.ACCESS_ADMIN, "!respawn", _, ulx.ID_PLAYER_HELP )
ulx.addToMenu( ulx.ID_MCLIENT, "Respawn", "ulx respawn" )

function ulx.cc_traitor( ply, command, argv, args )
if #argv < 1 then
ULib.tsay( ply, ulx.LOW_ARGS, true )
return
end

local targets, err = ULib.getUsers( argv[ 1 ], _, true, ply ) -- Enable keywords
if not targets then
ULib.tsay( ply, err, true )
return
end

for _, v in ipairs( targets ) do
ulx.logUserAct( ply, v, "#A turned #T into a traitor" )
v:SetRole(ROLE_TRAITOR)
SendFullStateUpdate()
end
end
ulx.concommand( "traitor", ulx.cc_traitor, "<user(s)> - Turns target(s) into traitors.", ULib.ACCESS_ADMIN, "!traitor", _, ulx.ID_PLAYER_HELP )
ulx.addToMenu( ulx.ID_MCLIENT, "Traitor", "ulx traitor" )

function ulx.cc_detective( ply, command, argv, args )
if #argv < 1 then
ULib.tsay( ply, ulx.LOW_ARGS, true )
return
end

local targets, err = ULib.getUsers( argv[ 1 ], _, true, ply ) -- Enable keywords
if not targets then
ULib.tsay( ply, err, true )
return
end

for _, v in ipairs( targets ) do
ulx.logUserAct( ply, v, "#A turned #T into a detective" )
v:SetRole(ROLE_DETECTIVE)
SendFullStateUpdate()
end
end
ulx.concommand( "detective", ulx.cc_detective, "<user(s)> - Turns target(s) into detectives.", ULib.ACCESS_ADMIN, "!detective", _, ulx.ID_PLAYER_HELP )
ulx.addToMenu( ulx.ID_MCLIENT, "Detective", "ulx detective" )

function ulx.cc_innocent( ply, command, argv, args )
if #argv < 1 then
ULib.tsay( ply, ulx.LOW_ARGS, true )
return
end

local targets, err = ULib.getUsers( argv[ 1 ], _, true, ply ) -- Enable keywords
if not targets then
ULib.tsay( ply, err, true )
return
end

for _, v in ipairs( targets ) do
ulx.logUserAct( ply, v, "#A turned #T into an innocent" )
v:SetRole(ROLE_INNOCENT)
SendFullStateUpdate()
end
end
ulx.concommand( "innocent", ulx.cc_innocent, "<user(s)> - Turns target(s) into innocents.", ULib.ACCESS_ADMIN, "!innocent", _, ulx.ID_PLAYER_HELP )
ulx.addToMenu( ulx.ID_MCLIENT, "Innocent", "ulx innocent" )
phoenixf129
Poster

Posts: 476


I Rise from the Ashes.


« Reply #1 on: August 30, 2010, 11:43:48 AM »

I can see a whole new horizon for abuse on TTT servers now... Thank god I don't use ulx.

Software Upgrade Paradox - If you improve a piece of software enough times, you eventually ruin it.
mattse123
Poster

Posts: 2


« Reply #2 on: August 30, 2010, 01:31:01 PM »

Goodjob buddy you have made something that can be useful in rdm cases but can be abuseive aswell :(
James
Poster

Posts: 12


« Reply #3 on: August 30, 2010, 02:53:23 PM »

Thanks!
This will be handy in a few servers running ULX.
Meta-Stick
Poster

Posts: 481


it contains, a daisy box


« Reply #4 on: August 30, 2010, 03:01:26 PM »

Do not want. :|

Just grab some bottles and stick them in girls...
James
Poster

Posts: 12


« Reply #5 on: August 30, 2010, 03:09:52 PM »

Then you don't need to be an asshat, flaming on something you probably couldn't do :/
Meta-Stick
Poster

Posts: 481


it contains, a daisy box


« Reply #6 on: August 30, 2010, 03:20:36 PM »

Not really. o_o More or less stating that it is not wanted by me. You're probably new to TTT so the concept of a ulx addition that goes against the fundamentals of the game itself doesn't strike you as much more than a thing of than just, "This is cool!". I was also about to edit that comment, out of the kindness of my small heart, and add "Very nice for those who do want, sadly." Good to know you're trigger happy.

Just grab some bottles and stick them in girls...
bigbadboo
Poster

Posts: 287


« Reply #7 on: August 30, 2010, 04:06:19 PM »

Then you don't need to be an asshat, flaming on something you probably couldn't do :/


He may be an asshat but he has every right to flame something that provokes admin cheating, I can think of no possible use for this.

The force traitor command is cheat flagged for a reason, to stop admins using it without turning sv_cheats on.

If you knew how to play TerrorTown on a half decent server, you would know this is crap...

I like talking like this /endrant.
James
Poster

Posts: 12


« Reply #8 on: August 30, 2010, 04:09:32 PM »

Hm.
That statement just made me delete it off my server.
I see what you mean, with admins cheating.
Thanks :)
Mr. Gash
Poster

Posts: 382


www.nonerdsjustgeeks.com


« Reply #9 on: August 30, 2010, 08:01:20 PM »

Would just using
--[[
Title: TTT

Some TTT related functions (respawn,traitor,detective,innocent)

Made by Oren Yomtov (thenameisoren at gmail)
]]
ulx.setCategory( "TTT" )

function ulx.cc_respawn( ply, command, argv, args )
if #argv < 1 then
ULib.tsay( ply, ulx.LOW_ARGS, true )
return
end

local targets, err = ULib.getUsers( argv[ 1 ], _, true, ply ) -- Enable keywords
if not targets then
ULib.tsay( ply, err, true )
return
end

for _, v in ipairs( targets ) do
ulx.logUserAct( ply, v, "#A respawned #T" )
v:SpawnForRound(true)
end
end
ulx.concommand( "respawn", ulx.cc_respawn, "<user(s)> - Respawns target(s).", ULib.ACCESS_ADMIN, "!respawn", _, ulx.ID_PLAYER_HELP )
ulx.addToMenu( ulx.ID_MCLIENT, "Respawn", "ulx respawn" )
work? I don't want people abusing with the force traitor, detective, and innocent commands.

Edit:
It didn't work, what version is this for? I'm running the svn.
« Last Edit: August 30, 2010, 08:27:12 PM by Mr. Gash »
Oren
Poster

Posts: 2


« Reply #10 on: August 30, 2010, 08:51:00 PM »

@Mr. Gash:

It should work, that's how I tested it first. I added the other functions only later on.
TTT v12.

I downloaded ULX from their site a couple of days ago.
Mr. Gash
Poster

Posts: 382


www.nonerdsjustgeeks.com


« Reply #11 on: August 30, 2010, 09:03:39 PM »

Use the SVN, v3.50
« Last Edit: August 30, 2010, 09:05:11 PM by Mr. Gash »
Darkebrz
Poster

Posts: 189


« Reply #12 on: August 31, 2010, 12:53:40 AM »

Let me just say:
This is a terrible idea. Giving any sort of admin the ability to change players roles is just calling for abuse. When, are you _ever_ going to want to make someone a traitor? Or a detective?
Respawn is another thing that admins would abuse, respawn themselves and people who whine about RDM when half the time the RDMer had at least some reason to kill the victim.
Stupid.
Firespray
Build Tester
*
Posts: 1447


:-(


« Reply #13 on: August 31, 2010, 01:48:36 AM »

Respawn is another thing that admins would abuse,


Then why have that person as admin? 

Anyway, just saying, while it looks like a good idea, people pointed it out that it is flawed.  An example would be someone kills a traitor then immediately leave, sure he can respawn himself/another person but everyone would know he is a traitor.  While the rest seem eh...okay I guess.

Quote
Z3RO: Tanners sister isnt bad looking :v
Firespray: New sig
Z3RO: noooo

holocalls traumatize worbat
Rectal Exambot
Poster

Posts: 166


« Reply #14 on: August 31, 2010, 03:13:46 AM »

Don't hate the mod, hate the server/admins.

I like, it allows respawning people that died while spawning (mmmm water) or ect...

(Among other things....)

Edit: The screen shot reminds me of the board from the Meet the Spy video...
« Last Edit: August 31, 2010, 03:15:24 AM by Rectal Exambot »
Mr. Gash
Poster

Posts: 382


www.nonerdsjustgeeks.com


« Reply #15 on: August 31, 2010, 04:26:36 AM »

Let me just say:
This is a terrible idea. Giving any sort of admin the ability to change players roles is just calling for abuse. When, are you _ever_ going to want to make someone a traitor? Or a detective?
Respawn is another thing that admins would abuse, respawn themselves and people who whine about RDM when half the time the RDMer had at least some reason to kill the victim.
Stupid.

If this actually WORKED for me, I can come up with a couple reasons to use it when I'm testing things to add to NNJG in single-player, or in a LAN game.
bigbadboo
Poster

Posts: 287


« Reply #16 on: August 31, 2010, 06:25:23 AM »

If this actually WORKED for me, I can come up with a couple reasons to use it when I'm testing things to add to NNJG in single-player, or in a LAN game.


ttt_force_traitor ttt_force_detective is all that is needed.
Mr. Gash
Poster

Posts: 382


www.nonerdsjustgeeks.com


« Reply #17 on: August 31, 2010, 07:41:24 PM »

ttt_force_traitor ttt_force_detective is all that is needed.

I've never actually used those... lol, forgot about that. Well, the respawn command seems like the only one worth having on a server incase people are RDM'ing.
Darkebrz
Poster

Posts: 189


« Reply #18 on: September 01, 2010, 03:23:32 AM »

I've never actually used those... lol, forgot about that. Well, the respawn command seems like the only one worth having on a server incase people are RDM'ing.

RDMed people are usually IDed.
Mr. Gash
Poster

Posts: 382


www.nonerdsjustgeeks.com


« Reply #19 on: September 01, 2010, 07:10:19 AM »

RDMed people are usually IDed.

IDed people are usually dead.

Thank you captain obvious. :v
It still helps so people don't rage about getting RDMed even after the RDMer is punished.
Pages: [1] 2
Zombie Master  |  Other  |  Trouble in Terrorist Town  |  Topic: TTT Admin Commands For ULX (Download) « previous next »
Jump to:  


Login with username, password and session length

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines
Page created in 0.011 seconds with 17 queries.