01.01.2015, 14:33
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
new h,m,s,diff,th,tm,ts;
diff = gettime() - gOnlineTime[playerid];
h = floatround(diff / 3600, floatround_floor);
m = floatround((diff - h * 3600) / 60, floatround_floor);
s = diff - h * 3600 - m * 60;
players_connected--;
th = PlayerInfo[playerid][Hours] + h;
tm = PlayerInfo[playerid][Minutes] + m;
ts = PlayerInfo[playerid][Seconds] + s;
PlayerInfo[playerid][Seconds] = ts;
PlayerInfo[playerid][Minutes] = tm;
PlayerInfo[playerid][Hours] = th;
return 1;
}
please help me