ULX

Author Topic: TTT Read out Firstpreptime  (Read 1981 times)

0 Members and 1 Guest are viewing this topic.

Offline DH1806

  • Newbie
  • *
  • Posts: 38
  • Karma: 0
TTT Read out Firstpreptime
« on: August 13, 2015, 08:05:05 AM »
Hi Guys,
im working atm on a script that changes the Number of traitors manually because I don't like the way to do it as percent (2 Traitor with 6 People are okay, 4 with 12 are too much and so on...) so I wanted to write a script to change the ttt_traitor_pct for every different number of Players.
The question is WHEN to start the change of ttt_traitor_pct. The hook TTTBeginRound can't be used because it's called when the traitors are already selected. So I had to work with TTTPrepareRound which is called when the preparing begins. But since the preparing and the begin of the round people could still join. So I worked with getting the convar ttt_preptime_seconds and used a timer.simple with x-0,01.
The problem is that there is a ttt_firstpreptime which is called on the round after the mapchange and it's different than the normal ttt_preptime_seconds. So the scipt has to know when it has to use ttt_firstpreptime and when ttt_preptime_seconds. Is there a way to check if there was a mapchange in the previous round or how many rounds left until the next mapchange?
Would be glad if someone could help me :)

DH

Offline DH1806

  • Newbie
  • *
  • Posts: 38
  • Karma: 0
Re: TTT Read out Firstpreptime
« Reply #1 on: August 17, 2015, 03:32:05 PM »
No ideas? :/

An Error Has Occurred!

array_keys(): Argument #1 ($array) must be of type array, null given