ULX

Author Topic: Change Utime Color in TTT  (Read 1212 times)

0 Members and 1 Guest are viewing this topic.

Offline Grischabock

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
  • Grischabock, der Let`s Player mit Herz
Change Utime Color in TTT
« on: August 05, 2016, 03:58:11 AM »
Hi, I wanted to change the color of utime but it does not work. myserver is gamemode ttt. in cl_utime.lia I adapted the following:

Code: [Select]
function resetCvars()
RunConsoleCommand( "utime_outsidecolor_r", "40" )
RunConsoleCommand( "utime_outsidecolor_g", "45" )
RunConsoleCommand( "utime_outsidecolor_b", "48" )

RunConsoleCommand( "utime_outsidetext_r", "255" )
RunConsoleCommand( "utime_outsidetext_g", "255" )
RunConsoleCommand( "utime_outsidetext_b", "255" )

RunConsoleCommand( "utime_insidecolor_r", "40" )
RunConsoleCommand( "utime_insidecolor_g", "45" )
RunConsoleCommand( "utime_insidecolor_b", "48" )

RunConsoleCommand( "utime_insidetext_r", "255" )
RunConsoleCommand( "utime_insidetext_g", "255" )
RunConsoleCommand( "utime_insidetext_b", "255" )

RunConsoleCommand( "utime_pos_x", "98" )
RunConsoleCommand( "utime_pos_y", "8" )
buildCP( controlpanel.Get( "Utime" ) )
end
concommand.Add( "utime_reset", resetCvars )



Even after restart server the color is still blue. What should I do?Thanks for your help. best greetings Grischabock

Offline roastchicken

  • Respected Community Member
  • Sr. Member
  • *****
  • Posts: 476
  • Karma: 84
  • I write code
Re: Change Utime Color in TTT
« Reply #1 on: August 05, 2016, 12:56:56 PM »
The function 'resetCvars' is for a console command. Unless you run that console command, the colors will not change.
Give a man some code and you help him for a day; teach a man to code and you help him for a lifetime.