01.01.2015, 14:59
pawn Код:
new gConnectTimestamp[MAX_PLAYERS], gOnlineTime[ MAX_PLAYERS ];
public OnPlayerConnect(playerid)
{
gConnectTimestamp[ playerid ] = gettime();
// I will assume that you will load seconds online into "gOnlineTime"
}
public OnPlayerDisconnect(playerid, reason)
{
gOnlineTime[ playerid ] += gettime() - gConnectTimestamp[ playerid ];
// If you didnt ignore my previous comment the "gOnlineTime" will now contain the total seconds connected.
}