How to record total played time?
#1

Hi guys, can anyone explain me how to save the total played time of a player using Dini?
Thank you.
Reply
#2

Set a repeating 1 minute timer. On said timer loop through all players and add one (var[i]++;) to a variable for each player. Save it to the file in said loop or when they disconnect. Simples.
Reply
#3

Meaning about hours, mins and secs, how will the pawno code would be?
Reply
#4

Anyone?
Someone explain me how to record it with DINI please, i set a timer and then?
Reply
#5

use this, which is made by ipleomax, I think (use it for seconds):
pawn Код:
GetPlayerOnlineTime(playerid, &days, &hours, &minutes, &seconds)
{
    days = (yourvar / (60 * 60 * 24)) % 86400;
    hours = (yourvar / (60 * 60)) % 24;
    minutes = (yourvar / 60) % 60;
    seconds = yourvar % 60;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)