ULX

Author Topic: [TTT] Show Number of Traitors/Innocents at the begin of the Round  (Read 14059 times)

0 Members and 1 Guest are viewing this topic.

Offline DH1806

  • Newbie
  • *
  • Posts: 38
  • Karma: 0
Hi Guys,
I'm new to this Forum and first I wanted to say thank you to all the developers, you really did great work with all the plugins and addons and I'm actually using them on my TTT Server and everything works great.
I hope I'm in the right forum here for my question and I hope this isn't a question that has already been asked, but I am searching now for more than one hour for a solution for my "problem" and didn't find any solution (maybe I'm just a noob in Searching, but for my other questions I usually found a solution  ;D )

Now to my "question": I've seen on some other servers that there is kinda group like "Regula Players" who is for players who has played X hours on the Server (UTime is installed).
I wanted to add something like this also to my server and already created the group, and I already have general ideas how to do it as I've found the variable 'lbltotaltime' in the cl_utime.lua . So there has to be some kind of 'if ply.lbltotaltime = 8 then ply.SetUserGroup("regularplayer")' (just for general understanding with example 8 hours), am I right?
If this thought should be right: My problem is that I have no idea in which data I have to add this code and on which line etc.
I Would be very happy if someone of you could help me there :)

If my thought isn't right, what could be a different way to reach this "automatically adding to a group" ? Is there already a solution how to do it?

Thanks for your help,
DH
« Last Edit: December 29, 2014, 04:42:02 AM by DH1806 »

Offline Decicus

  • Hero Member
  • *****
  • Posts: 552
  • Karma: 81
    • Alex Thomassen
Re: [TTT] Adding an User automatically to a Group after a certain Gametime
« Reply #1 on: December 24, 2014, 02:57:35 PM »
I believe AutoPromote would work for you.
Contact information:
E-mail: alex@thomassen.xyz.
You can also send a PM.

Offline DH1806

  • Newbie
  • *
  • Posts: 38
  • Karma: 0
Re: [TTT] Adding an User automatically to a Group after a certain Gametime
« Reply #2 on: December 24, 2014, 03:27:42 PM »
Looks Great! I will try it out as soon as my "nice" hoster is online again. :P
Thx for this fast help :)

Offline DH1806

  • Newbie
  • *
  • Posts: 38
  • Karma: 0
Re: [TTT] Adding an User automatically to a Group after a certain Gametime
« Reply #3 on: December 25, 2014, 06:50:32 AM »
Works perfect, thanks for your answer and thanks to the developer for this great addon.

There is another question for which i didn't find an answer, I didn't want to create a new topic for it and hope that one of you guys could help me as a noob in searching once again. It seems pretty simple, on some servers there is a message at the begin of the round which shows the number of traitors, detectives and innocents in this round. While searching i always found only sites where is explained how to change the number of traitors in general but not how to show a message with the current number of theat the begin of the round.
Does anyone know the name of this addon? :)

Thx again for spending time on my questions,
DH

Btw, as i'm german i apologize for some language mistakes. :)

Offline DH1806

  • Newbie
  • *
  • Posts: 38
  • Karma: 0
Re: [TTT] Adding an User automatically to a Group after a certain Gametime
« Reply #4 on: December 27, 2014, 05:46:16 AM »
Does nobody have an idea? :)
Btw, why was this moved to off-topic?

Offline Neku

  • Hero Member
  • *****
  • Posts: 549
  • Karma: 27
Re: [TTT] Adding an User automatically to a Group after a certain Gametime
« Reply #5 on: December 27, 2014, 05:05:44 PM »
Does nobody have an idea? :)
Btw, why was this moved to off-topic?

It's too simple for an actual release, which is probably why you can't find it, as neither can I.
Out of the Garry's Mod business.

Offline DH1806

  • Newbie
  • *
  • Posts: 38
  • Karma: 0
Re: [TTT] Adding an User automatically to a Group after a certain Gametime
« Reply #6 on: December 27, 2014, 06:29:20 PM »
Weil I also got an idea how to realise it, but I don't know in which file I have to add the code or if I have to create a new one. Could you give me a hint? :)

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: [TTT] Adding an User automatically to a Group after a certain Gametime
« Reply #7 on: December 27, 2014, 07:53:35 PM »
This topic was moved from Ulysses help and chat because it overall has little mention of an actual ULib or ULX discussion.
It mentions UTime, and then quickly moves towards other topics. But, even UTime has it's own discussion area.
Hence, Off-Topic.
And, It may end up in Developer's Corner, as discussion seems to be heading towards what code/where to edit files.
Moving isn't a bad thing, it's simply meant to keep the Help/Chat section related to ULib/ULX discussion only.
The other releases have their own chat areas.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline DH1806

  • Newbie
  • *
  • Posts: 38
  • Karma: 0
Re: [TTT] Adding an User automatically to a Group after a certain Gametime
« Reply #8 on: December 29, 2014, 04:39:32 AM »
Thx for your explaination, but is there really nobody with an idea just because it's that simple as neku said? (For me it's of course not that simple).

Offline Bytewave

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 718
  • Karma: 116
  • :)
    • My Homepage
Re: [TTT] Show Number of Traitors/Innocents at the begin of the Round
« Reply #9 on: December 29, 2014, 09:53:09 AM »
Thx for your explaination, but is there really nobody with an idea just because it's that simple as neku said? (For me it's of course not that simple).
You could always get the values of each console variable for the percent chance of being T, I, or D, and multiply that by the number of players. math.floor() the values, and you've got it.
bw81@ulysses-forums ~ % whoami
Homepage

Offline DH1806

  • Newbie
  • *
  • Posts: 38
  • Karma: 0
Re: [TTT] Show Number of Traitors/Innocents at the begin of the Round
« Reply #10 on: December 29, 2014, 12:32:45 PM »
Thank you for the hint, but in which file do I have to write this code?
Sorry for being a noob :/

Offline Bytewave

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 718
  • Karma: 116
  • :)
    • My Homepage
Re: [TTT] Show Number of Traitors/Innocents at the begin of the Round
« Reply #11 on: December 29, 2014, 01:04:10 PM »
Thank you for the hint, but in which file do I have to write this code?
Sorry for being a noob :/
Wherever. Probably in lua/autorun.
bw81@ulysses-forums ~ % whoami
Homepage

Offline bender180

  • Full Member
  • ***
  • Posts: 217
  • Karma: 42
    • Benders Villa
Re: [TTT] Show Number of Traitors/Innocents at the begin of the Round
« Reply #12 on: December 30, 2014, 01:33:26 PM »
I'd suggest looking in the ttt lua files there are lots of places you could start from in there.
Made community pool and community bowling and for the life of me couldn't tell you why they are popular.
Also made the ttt ulx commands.

Offline DH1806

  • Newbie
  • *
  • Posts: 38
  • Karma: 0
Re: [TTT] Show Number of Traitors/Innocents at the begin of the Round
« Reply #13 on: January 13, 2015, 09:39:57 AM »
Hi Guys, it's me again. First of all a happy new year 2015 to you (a bit late, I know  :P )
Maybe you'll laugh on me, but I hope one of you pros can help a noob like me. Last Days I was reading many lua tutorials and threads and so on, and I'm close to solve the problem, but there are two things I didnt find even with searching nor for hours. I don't know how to get variables from the server.cfg
You could always get the values of each console variable for the percent chance of being T, I, or D
Is there a way to read it out from the server.cfg file or do I have to fill it in manually?
And how is the variable of the number of players who are in game (so number of players without spectators) ?

Thx again for your help :)
DH

Offline Zmaster

  • Full Member
  • ***
  • Posts: 235
  • Karma: 25
Re: [TTT] Show Number of Traitors/Innocents at the begin of the Round
« Reply #14 on: January 13, 2015, 02:08:25 PM »
Hi Guys, it's me again. First of all a happy new year 2015 to you (a bit late, I know  :P )
Maybe you'll laugh on me, but I hope one of you pros can help a noob like me. Last Days I was reading many lua tutorials and threads and so on, and I'm close to solve the problem, but there are two things I didnt find even with searching nor for hours. I don't know how to get variables from the server.cfgIs there a way to read it out from the server.cfg file or do I have to fill it in manually?
And how is the variable of the number of players who are in game (so number of players without spectators) ?

Thx again for your help :)
DH

You can type the commands found here ( http://ttt.badking.net/config-and-commands/convars ) in the server console and it'll tell you it's current state -- I found that when typing those commands into client console, it'll say "Unknown command" so be sure to use the server console



PS:
Is this what you're looking for?

« Last Edit: January 13, 2015, 02:27:02 PM by Zmaster »