i = math.ceil( 23.53 )
print( i ) -- 23 يعطيك الرقم
او استخدم هذا الفنشكن
function convertMilliseconds( i )
if ( i ) then
sec = math.fmod( math.floor( i / 1000 ), 60 )
min = math.floor( math.floor( i / 1000 ) / 60 )
return string.format( '%02d:%02d', min, sec )
end
end
مثال عليه
Timer = setTimer(
function( )
givePlayerMoney( getRootElement( ), 1000 )
end, 40000, 0
)
addCommandHandler( 'timer',
function( playerSource )
if isTimer( Timer ) then
local TimeLeft = convertMilliseconds( getTimerDetails( Timer ) )
outputChatBox( TimeLeft ..' بقي من الوقت للتوزيع !', playerSource, 255, 255, 0, true )
end
end
)
راح يظهر لك الوقت كذا