16.03.2012, 18:16
pawn Код:
if(dialogid == 2)
{
if(!response)
{
StopAudioStreamForPlayer(playerid);
SendClientMessage(playerid, COLOR_SYSTEMRED, "( ! ) You must log in to play on this server. Please come again soon");
Kick(playerid);
gPlayerLogged[playerid] = 0;
}
new hashed_password[129];
WP_Hash(hashed_password, sizeof(hashed_password), inputtext);
printf("WP_Hash: %s | Data: %s", hashed_password, dj(file, "Password"));
if(!strcmp(hashed_password, dj(file, "Password"), true))
{
SendClientMessage(playerid, COLOR_GREEN, "( ! ) You have successfully Logged In!");
GivePlayerMoney(playerid, djInt(file, "Money"));
PlayerInfo[playerid][pBanned] = djInt(file, "Banned");
gPlayerLogged[playerid] = 1;
OnceLogged[playerid] = 1;
}
else
{
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_PASSWORD, "{FFFF00}Hopes Hills RPG Account", "{AF0000}Incorrect Password!\n{FFFFFF}Enter your Password", "Login", "Quit");
}