local CATEGORY_NAME = "Custom"
function ulx.setutime( ply, targ, time )
if not targ:IsValid() then return end
targ:SetUTimeStart( CurTime() )
targ:SetUTime( time*3600 )
sql.Query( "INSET into utime( player, totaltime, lastvisit ) VALUES( ".. targ:UniqueID() ..",".. time*3600 ..",".. os.time() .." );" )
ulx.fancyLogAdmin( ply, "#A set the hour's for #T to #i", targ, time )
//return true
end
local setutime = ulx.command( CATEGORY_NAME, "ulx setutime", ulx.setutime, "!setutime" )
setutime:addParam{ type=ULib.cmds.PlayerArg, hint="player" }
setutime:addParam{ type=ULib.cmds.NumArg, default = 0, min = 0, max = 9999, hint="hours" }
setutime:defaultAccess( ULib.ACCESS_SUPERADMIN )
setutime:help( "Sets a player's hours." )
//setutime:logString( "#1s set the hour's for #2s to #3i" )
Goes in your ULX/lua/ulx/modules/sh/
The commented out lines are for a few revisions back before the logging changed.