12.11.2013, 12:43
I'm facing an issue when a player is an admin(padmin >1) when he logs out and other player registers he will get the same stats, how to fix this? I am using Kush's registeration tutorial.
maybe something - When player joins, in your script. It maybe as " Admin[padmin] > 1 " If so, set it to 0
|
Could you give a link to that tutorial ? I assume that it doesn't check whether the previous player is connected or not.
|
//add this to the enumerator
Logged
//when player logs
PlayerInfo[playerid][Logged] = 1;
//and when player logs out
PlayerInfo[playerid][Logged] = 0;
public OnPlayerConnect(playerid)
{
RestartVariables(playerid);
return 1;
}
stock RestartVariables(playerid)
{
// reset variables to avoid random players getting your powers
Admin[playerid] = 0.
// etc
return 1;
}