Playing Time
#1

Hey i have a bug in player stats (played time) the time increases by 160 hours or smthing after a minutes from register
when player register the time is working good but after few minutes it gets bugged.

Код:
TotalGameTime(playerid, &h=0, &m=0, &s=0)
{
    PInfo[playerid][TotalTime] = ( (gettime() - PInfo[playerid][ConnectTime]) + (PInfo[playerid][hours]*60*60) + (PInfo[playerid][mins]*60) + (PInfo[playerid][secs]) );

    h = floatround(PInfo[playerid][TotalTime] / 3600, floatround_floor);
    m = floatround(PInfo[playerid][TotalTime] / 60,   floatround_floor) % 60;
    s = floatround(PInfo[playerid][TotalTime] % 60,   floatround_floor);

    return PInfo[playerid][TotalTime];
}
thats the code of how it should count the played time i guess its the wrong one
also under onplayerconnect
PInfo[playerid][ConnectTime] = gettime();
Reply


Messages In This Thread
Playing Time - by Rockyyy - 17.07.2016, 14:07
Re: Playing Time - by GuyB790 - 19.07.2016, 12:36
Re: Playing Time - by OneDay - 19.07.2016, 12:44
Re: Playing Time - by GuyB790 - 19.07.2016, 12:52

Forum Jump:


Users browsing this thread: 3 Guest(s)