bandi94 Posted February 27, 2012 Share Posted February 27, 2012 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
drk Posted February 27, 2012 Share Posted February 27, 2012 LOL You have to create a function that save's the last time played etc... Then when the map starts it search if the map have last time or not and others things, if yes then load the data. Link to comment
bandi94 Posted February 27, 2012 Author Share Posted February 27, 2012 hm it's funny i used "mapInfo.playedCount" (played times) and it's work fine in this case i hawe more to work Link to comment
drk Posted February 27, 2012 Share Posted February 27, 2012 Oh, ok. If you need other map info only see registry.db map registry. See the columns, time, name, playedCount and all you can use ( mapInfo.name, mapInfo.time, mapinfo.playerCount ). Link to comment
bandi94 Posted February 27, 2012 Author Share Posted February 27, 2012 ok thx now i am more confused if the mapInfo. playedCount it's work's why the mapInfo.lastTimePlayed it return the curent date and don't return the last day ? Link to comment
drk Posted February 27, 2012 Share Posted February 27, 2012 I don't know I never used mapInfo arguments ... Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now