Jump to content

Time problem


R.y.c.k

Recommended Posts

Yo .. in infomap I shows the time exp. 12:10 and in our country is 11:10 where I could set ?

part script :

  
local name, author, lastTimePlayed, playedCount, modename 
local startTick 
local enabled = false 
local drawTime = 20000 
local month = {"January","February","March","April","May","June","Juli","August","September","October","November","December"} 
local rollSpeed1 = 0 
local rollSpeed2 = 0 
local rollSpeed3 = 0 
local rollSpeed4 = 0 
local rollSpeed5 = 0 
local rollRectangle = 0 
  
function timestampToDate(stamp) 
    local time = getRealTime(stamp) 
    return string.format("%d %s %02d:%02d",time.monthday,month[time.month+2],time.hour,time.minute) 
end 
  
function handleMapInfo(mapInfo) 
    name            = mapInfo.name or "Unknown" 
    author          = mapInfo.author or "Unknown" 
    lastTimePlayed  = timestampToDate(mapInfo.lastTimePlayed) or "Unknown" 
    playedCount     = tostring(mapInfo.playedCount or "Unknown") 
    modename        = mapInfo.modename ~= "Destruction derby" and mapInfo.modename or "Destruction derby" 
     
    startTick = getTickCount() 
    if not enabled then 
        enabled = true 
        addEventHandler ( "onClientRender", getRootElement(),drawMapInfo) 
        rollSpeed1 = 0 
        rollSpeed2 = 0 
        rollSpeed3 = 0 
        rollSpeed4 = 0 
        rollSpeed5 = 0 
        rollRectangle = 0 
    end  
end 
addEvent("onClientMapStarting",true) 
addEventHandler("onClientMapStarting",getRootElement(),handleMapInfo) 
  
function drawMapInfo () 
    local time = getTickCount() - startTick 
     
--7750  
    if time >= drawTime + 1000 then 
        enabled = false 
        removeEventHandler ( "onClientRRender", getRootElement(),drawMapInfo) 
        return   
    end 

Link to comment

I can see that it's not your script.. are you allowed to edit it?

Anyway, it should be working if you use this:

function timestampToDate(stamp) 
    local time = getRealTime(stamp) 
    return string.format("%d %s %02d:%02d",time.monthday,month[time.month+2],time.hour + 1,time.minute) 
end 

The thing I changed is this: time.hour + 1, you can't do even that? It should work..

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...