--//Utime Utilities by Baron von Haxor//--
local CATEGORY_NAME = "Utime Settings"

--Utime Position--
function ulx.utimeposition( calling_ply, posx, posy)
      calling_ply:ConCommand("utime_pos_x " .. posx)
      calling_ply:ConCommand("utime_pos_y " .. posy)
end

local utimeposition = ulx.command( CATEGORY_NAME, "ulx utimepositionition", ulx.utimeposition, "!utimeposition" )
utimeposition:addParam{ type=ULib.cmds.NumArg, min=0, default=10, hint="Pos X", ULib.cmds.optional, ULib.cmds.round }
utimeposition:addParam{ type=ULib.cmds.NumArg, min=0, default=10, hint="Pos Y", ULib.cmds.optional, ULib.cmds.round }
utimeposition:help( "Change the Position of Utime!" )

--Utime Toggle--
function ulx.utimetoggle( calling_ply )
  if (GetConVar("utime_enable"):GetInt()==0) then  
    calling_ply:ConCommand("utime_enable 1" )
  elseif (GetConVar("utime_enable"):GetInt()==1) then
    calling_ply:ConCommand("utime_enable 0" )
  end
end

local utimetoggle = ulx.command( CATEGORY_NAME, "ulx utimetoggle", ulx.utimetoggle, "!utimetoggle" )
utimetoggle:help( "Enable or disable Utime!" )

--Utime Inside Colour--
function ulx.utimeincolour( calling_ply, r, g, b) 
      calling_ply:ConCommand("utime_insidecolor_r " .. r)
      calling_ply:ConCommand("utime_insidecolor_g " .. g)
      calling_ply:ConCommand("utime_insidecolor_b " .. b)
end

local utimeincolour = ulx.command( CATEGORY_NAME, "ulx utimeincolour", ulx.utimeincolour, "!utimeincolour" )
utimeincolour:addParam{ type=ULib.cmds.NumArg, min=0, max=255, hint="red", ULib.cmds.round }
utimeincolour:addParam{ type=ULib.cmds.NumArg, min=0, max=255, hint="green", ULib.cmds.round }
utimeincolour:addParam{ type=ULib.cmds.NumArg, min=0, max=255, hint="blue", ULib.cmds.round }
utimeincolour:help( "Inside Utime frame colour" )

--Utime Outside Colour--
function ulx.utimeoutcolour( calling_ply, r, g, b) 
      calling_ply:ConCommand("utime_outsidecolor_r " .. r)
      calling_ply:ConCommand("utime_outsidecolor_g " .. g)
      calling_ply:ConCommand("utime_outsidecolor_b " .. b)
end

local utimeoutcolour = ulx.command( CATEGORY_NAME, "ulx utimeoutcolour", ulx.utimeoutcolour, "!utimeoutcolour" )
utimeoutcolour:addParam{ type=ULib.cmds.NumArg, min=0, max=255, hint="red", ULib.cmds.round }
utimeoutcolour:addParam{ type=ULib.cmds.NumArg, min=0, max=255, hint="green", ULib.cmds.round }
utimeoutcolour:addParam{ type=ULib.cmds.NumArg, min=0, max=255, hint="blue", ULib.cmds.round }
utimeoutcolour:help( "Outside Utime frame colour" )

--Utime Inside Text Colour--
function ulx.intextcolour( calling_ply, r, g, b) 
      calling_ply:ConCommand("utime_insidetext_r " .. r)
      calling_ply:ConCommand("utime_insidetext_g " .. g)
      calling_ply:ConCommand("utime_insidetext_b " .. b)
end

local intextcolour = ulx.command( CATEGORY_NAME, "ulx intextcolour", ulx.intextcolour, "!intextcolour" )
intextcolour:addParam{ type=ULib.cmds.NumArg, min=0, max=255, hint="red", ULib.cmds.round }
intextcolour:addParam{ type=ULib.cmds.NumArg, min=0, max=255, hint="green", ULib.cmds.round }
intextcolour:addParam{ type=ULib.cmds.NumArg, min=0, max=255, hint="blue", ULib.cmds.round }
intextcolour:help( "Utime inside text colour" )

--Utime Outside Text Colour--
function ulx.outtextcolour( calling_ply, r, g, b) 
      calling_ply:ConCommand("utime_outsidetext_r " .. r)
      calling_ply:ConCommand("utime_outsidetext_g " .. g)
      calling_ply:ConCommand("utime_outsidetext_b " .. b)
end

local outtextcolour = ulx.command( CATEGORY_NAME, "ulx outtextcolour", ulx.outtextcolour, "!outtextcolour" )
outtextcolour:addParam{ type=ULib.cmds.NumArg, min=0, max=255, hint="red", ULib.cmds.round }
outtextcolour:addParam{ type=ULib.cmds.NumArg, min=0, max=255, hint="green", ULib.cmds.round }
outtextcolour:addParam{ type=ULib.cmds.NumArg, min=0, max=255, hint="blue", ULib.cmds.round }
outtextcolour:help( "Utime outside text colour" )