Hours , Mins saving system in Mysql
#1

Well, I want to know how to save hours , mins.

I know how to save but idk how does it work . I mean, where should i put "PlayerInfo[playerid][Phours]" ? under function of time? or what. Can u give me function.
Reply
#2

Do you even have player time online system in your script?
Reply
#3

Gettime
Reply
#4

Nah, I don't have. I just have mysql saving system. But it does not save because i need a function where i can put this "PlayerInfo[playerid][Pmins]" so it saves players total mins of playing.

I didn't get this gettime function. Can you explain me more please. I mean, Where should i put this on gettime so it can save my online time.
Reply
#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


Forum Jump:


Users browsing this thread: 1 Guest(s)