Quote:
Originally Posted by ThomasEvil
I have same problem and this is not solution. Any idea? New registered people still getting stats of last connected player... I am so crazy, cant solve it so long!
|
Reset the data when the player connects — before doing anything else data-related:
PHP код:
public OnPlayerConnect(playerid) {
// Reset them here ...
// Rest of your code
return 1;
}
The possibility of variables not resetting under OnPlayerDisconnect is significantly greater than when you do it under OnPlayerConnect. In fact, resetting them under OnPlayerConnect guarantees you that they will successfully reset when a player connects and remains on the server.