11.07.2013, 10:05
Hello, i have an problem, the problem is that for example: when 10 players online and 1 new guy come online it says then something like [36/50], but why is that so? I think the variables didnt reset or something like that.
Код:
new gPlayersConnected = 0; // OnPlayerConnect gPlayersConnected++; new string[124], name[MAX_PLAYER_NAME+1]; GetPlayerName(playerid, name, sizeof(name)); format(string, sizeof(string), "Player %s connected. There are %d/50 players connected", name, gPlayersConnected); SendClientMessage(playerid, -1, string); // OnPlayerDisconnect gPlayersConnected--; new string[124]; new name[MAX_PLAYER_NAME+1]; GetPlayerName(playerid, name, sizeof(name)); format(string, sizeof(string), "Player %s left the server. There are %d/50 players connected", name, gPlayersConnected); SendClientMessage(playerid, -1, string);