Played time
#2

This function converts the player's connected time from milli seconds to human readable format (horus, minutes and seconds).
pawn Код:
stock GetPlayerConnectedTime(playerid, &hours, &minutes, &seconds)
{
        new connected_time = NetStats_GetConnectedTime(playerid);
        seconds = (connected_time / 1000) % 60;
        minutes = (connected_time / (1000 * 60)) % 60;
        hours = (connected_time / (1000 * 60 * 60));
        return true;
}
Snippet from Players Library.
Reply


Messages In This Thread
Played time - by kalanerik99 - 18.06.2015, 14:09
Re: Played time - by Gammix - 18.06.2015, 14:26
Re: Played time - by kalanerik99 - 19.06.2015, 12:51
Re: Played time - by rappy93 - 19.06.2015, 13:01
Re: Played time - by kalanerik99 - 19.06.2015, 13:07
Re: Played time - by rappy93 - 19.06.2015, 13:12
Re: Played time - by kalanerik99 - 19.06.2015, 14:33
Re: Played time - by Stanford - 19.06.2015, 15:58
Re: Played time - by Threshold - 19.06.2015, 16:24
Re: Played time - by kalanerik99 - 19.06.2015, 16:42

Forum Jump:


Users browsing this thread: 1 Guest(s)