03.10.2011, 19:39
part of what where i want it Okay..
pawn Код:
if (dialogid == 2)
{
new name[MAX_PLAYER_NAME], file[256], string[128];
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file), ARS_SERVERFILES, name);
if(!response)
{
SendClientMessage( playerid, WHITE, "Fine, have it your way!" );
Kick( playerid );
}
if (!strlen(inputtext)) return ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "This account is registered in our data base.", "Enter your password below, or leave if you're the wrong person", "Login", "Leave");
new tmp;
tmp = dini_Int(file, "Password");
if(udb_hash(inputtext) != tmp) {
SendClientMessage(playerid, RED, "..::Invalid password::.. Re-enter your password correctly or leave!");
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "This account is registered in our data base.", "Enter your password below, or leave if you're a wrong person", "Login", "Leave");
}
else
{
PlayerInfo[playerid][pAdminLevel] = dini_Int(file, "AdminLevel");
PlayerInfo[playerid][pJob] = dini_Int(file, "Job");
SetPlayerScore(playerid, PlayerInfo[playerid][pScore]);
GivePlayerMoney(playerid, dini_Int(file, "Money"));
SetPlayerHealth(playerid, dini_Int(file, "Health"));
SetPlayerArmour(playerid, dini_Int(file, "Armour"));
format(string, 128, "You have succesfully logged into your account. %s, Welcome back.", name);
SendClientMessage(playerid, DARKBLUE, string);
SpawnLastSaved(playerid);
PlayerOnline[playerid] = 1;
SetPlayerName(playerid, PlayerInfo[playerid][pFirstname]);
}
}