23.11.2014, 17:19
Are you sure you are resetting the variables upon disconnect? Because if you don't the player that comes after will replace the previous player ID and take his variables.
Example:
Player A logs in the server with his own variables let's say.
Example:
Player A logs in the server with his own variables let's say.
pawn Код:
new MyVariable[MAX_PLAYERS];
OnPlayerConnect(playerid) // I've taken this callback as an example it has nothing to do with your issue!
{
MyVariable[playerid] = 1; // Assigned the variable 1 to the following player id. (Let's say 0) So player ID 0 has "MyVariable" set to 1.
}
// Now here comes the Disconnecting part if you don't set it to 0 aka reset the variable the current player will disconnect BUT that variable is still set as true(1) to that playerid! Therefore do the following..
OnPlayerDisconnect(playerid,reason)
{
MyVariable[playerid] = 0;
}