17.04.2011, 10:33
This is a part of an include I made
So when one decides to register, this playlerist.ini might appear
however, when you try to log in with sa-mp username Har_Levis the script again asks you to register. But then, when I restart the server you are able to log in with EVERY sa-mp username using mypass :S
I just want to make a login script you know, in which you can register and login with your own username and password.
pawn Код:
new PlayerName[MAX_PLAYER_NAME], Password[MAX_PASSWORD];
INI:playerlist[](playerid, name[], value[])
{
INI_String(PlayerName, Password, sizeof(Password));
return 1;
}
stock CheckPlayer(playerid){
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
INI_Load("playerlist.ini", true, playerid); // if set to true, playerid will be passed over to INI:playerlist[...
if(strlen(Password) == 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;
}
}
pawn Код:
Har_Levis = mypass
I just want to make a login script you know, in which you can register and login with your own username and password.