Author Topic: uTime default location for everyone  (Read 1527 times)

0 Members and 2 Guests are viewing this topic.

Offline UltimateByte

  • Newbie
  • *
  • Posts: 11
  • Karma: 0
    • FR Mesnie multigaming
uTime default location for everyone
« on: April 30, 2015, 04:54:48 PM »
Hi there,

For some reasons, i'd like to get uTime to the top right corner as a default settings on one of my servers (to avoid overlapping with other HUD)

Only problem, I don't know lua, just some basics of programming...

I tried the same thing as here http://www.facepunch.com/showthread.php?t=1362745&p=43889703 , i tried at first to change "utime_pos_x" to 100 into the cl_utime.lua but it has no effect, at least for anyone already having the uTime.

 I tried this code added at the end of cl_utime.lua and into the garrysmod/lua/autorun/client/utime_setposition.lua i created :

Code: [Select]
function setCvars( ply )
ply:ConCommand( "utime_pos_y 90"  )
ply:ConCommand( "utime_pos_x 90" )
end
hook.Add( "PlayerInitialSpawn", "setcvars", setCvars )



And this little attempt to fix it into my utime_setposition.lua :

Code: [Select]
function setCvars( ply )
        ply:ConCommand( "utime_pos_y 10" )
        ply:ConCommand( "utime_pos_x 100" )
end
hook.Add( "PlayerInitialSpawn", "setcvars", setCvars( ply ) )


None of them works. Can we really set Cvars as we wish ? I googled a lot, and setCvars didn't give a lot of revelant things concerning Gmod.

Any help would be very appreciated. Cheers