VegaS™ Posted August 1, 2016 Report Share Posted August 1, 2016 It is for scripts online player or developer php that make connections to the database to achieve something, one who came to me to help him with that worked on a market online and item-shop and no time it was updated in real time and cause them a thousand a problem/bugs. /********* * author: VegaS * file: input_login.cpp * description: Time update in real-time table last_play * date: Tuesday, Aug 01 st 2016, 02:44am */ //1.) Search: void CInputLogin::Entergame(LPDESC d, const char * data) { LPCHARACTER ch; [........................................] } //2.) Add bellow: #ifdef ENABLE_UPDATE_LASTPLAY_REAL_TIME /********* * I put this verification level as not to over apply database updates elsewhere for characters that start at * first on the game that is at level 1, I believe that it is not necessary for a player of that level to have time adapted real-time. */ int pLevel = 5; // To begin initialize of level 5 ++ if (ch->GetLevel() > pLevel) { char pUpdateTime[1024]; snprintf(pUpdateTime, sizeof(pUpdateTime), "UPDATE player.player SET last_play = NOW() WHERE id = %u", ch->GetPlayerID()); std::auto_ptr<SQLMsg> sUpdate(DBManager::instance().DirectQuery(pUpdateTime)); } #endif Richard Tamas, renssis, Shang and 6 others 9 Quote Link to comment Share on other sites More sharing options...
Richard Tamas Posted December 25, 2022 Report Share Posted December 25, 2022 can u make real time level update too? Quote Link to comment Share on other sites More sharing options...
greedisgood272 Posted January 16 Report Share Posted January 16 . Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.