Jump to content

Map Info lastTimePlayed litel bug


bandi94

Recommended Posts

i made a mapinfo window what include the lastTimePlayed that map now my problem is that it return's the date no problem whit it but it return's the current date not the lastTime

Client Side

local month ={"January","February","March","April","May","June","Juli","August","September","October","November","December"} 
  
function timestampToDate(stamp) 
    local time = getRealTime(stamp) 
    return string.format("%d %s %02d:%02d",time.monthday,month[time.month+1],time.hour-2,time.minute-2) 
end 
  
  
 function handleMapInfo(mapInfo) 
lastTimePlayed  = timestampToDate(mapInfo.lastTimePlayed) or "Unknown" 
 end 
     
  
addEvent("onClientMapStarting",true) 
addEventHandler("onClientMapStarting",getRootElement(),handleMapInfo) 

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...