Hours , Mins saving system in Mysql
#5

Код:
public OnPlayerLogin(playerid, password) 
{
  Give a MySQL query to load a time online of player from the db then set it to variable.
  playerOnline[playerid] = Data Fetched from the DB;
  curronline[playerid] = gettime(); 
}
public OnPlayerDisconnect(playerid, password) 
{
   new time_new = playerOnline[playerid] + (gettime() - curronline[playerid]);
   And give a MySQL query to save a time online of a player.
   And it will save the time in milliseconds. 
}
Reply


Messages In This Thread
Hours , Mins saving system in Mysql - by STONEGOLD - 23.06.2015, 19:24
Re: Hours , Mins saving system in Mysql - by Inn0cent - 23.06.2015, 19:34
Re: Hours , Mins saving system in Mysql - by AlonzoTorres - 23.06.2015, 19:34
Re: Hours , Mins saving system in Mysql - by STONEGOLD - 23.06.2015, 20:14
Re: Hours , Mins saving system in Mysql - by Inn0cent - 23.06.2015, 20:37

Forum Jump:


Users browsing this thread: 1 Guest(s)