19.04.2011, 20:40
I got this code (part of my code)
When I first log in with playername Max_Havelaar and his password is mypass I will succeed. But when I log in with Lead_Admin and his pass is mypass2 I can still only log in with mypass. This means the Password[playerid] won't be overwritten, which is a problem. I've tried to empty Password[playerid] after every log in by that playerid but then it'll be permanently empty and still no value can be assigned to it :S
How to solve this? I've tried everything
pawn Код:
new PlayerName[MAX_PLAYERS][MAX_PLAYER_NAME], Password[MAX_PLAYERS][MAX_PASSWORD];
INI:playerlist[](playerid, name[], value[])
{
INI_String(PlayerName[playerid], Password[playerid], MAX_PASSWORD);
return 0;
}
stock CheckPlayer(playerid){
GetPlayerName(playerid, PlayerName[playerid], MAX_PLAYER_NAME);
INI_Load("playerlist.ini", true, playerid); // if set to true, playerid will be passed over to INI:playerlist[...
if(strlen(Password[playerid]) == 0){
ShowPlayerDialog(playerid, 30, 1, "Register", "To register you must first give in the first name of your character.", "OK", "");
return 1;
}
else{
ShowPlayerDialog(playerid, 33, 1, "Login", "Please give in your password.", "OK", "");
return 1;
}
}
How to solve this? I've tried everything

