Leveling system only working for 1 person, and bad.
#6

pawn Код:
new gPlayTime[ MAX_PLAYERS ];
new gPlayerJoinTime[ MAX_PLAYERS ];

public OnPlayerConnect(playerid)
{
    gPlayerJoinTime[ playerid ] = gettime();
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    gPlayTime[ playerid ] = ( gettime()-gPlayerJoinTime[playerid] );
    return 1;
}
@ Mp2s comment : Make sure you also save this where your player data saves in case the server crashes As you should with all player stats.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 5 Guest(s)