Player becomes admin when registers(MYSQL)
#5

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.

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;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)