cseréld (ezmár a jó):
[pawn]if(dialogid == LoGiN)
{
if(response)
{
new file[128];
new string[128];
new PlayerName[24];
if(strlen(inputtext) == 0)
{
GetPlayerName(playerid, PlayerName, sizeof PlayerName);
format(string, sizeof string, \"Bejelentkezés \\n\\nÜdv a TDM Airport szervren %s! \\nTe regisztrálva vagy! \\n\\nKérjük jelentkezz be.\", PlayerName);
ShowPlayerDialog(playerid, LoGiN, DIALOG_STYLE_INPUT, \"Bejelentkezés\", string, \"Login\", \"Cancel.\");
return 0;
}
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(file,sizeof(file),\"/tReg/%s.ini\",name);
if(fexist(file))
{
new password = dini_Int(file, \"Password\");
if(udb_hash(inputtext) != password)
{
SendClientMessage(playerid, COLOR_RED, \"Hiba:Nem jó jelszó!\");
Kick(playerid);
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
printf(\"%s Nem tudott bejelentkezni!\", name);
}
else
{
IsLogged[playerid] = 1;
ResetPlayerMoney(playerid);
SetPlayerScore(playerid, dini_Int(file,\"Score\"));
GivePlayerMoney(playerid, dini_Int(file,\"Money\"));
PlayerInfo[playerid][Deaths] = dini_Int(file,\"Deaths\");
PlayerInfo[playerid][Kills] = dini_Int(file,\"Kills\");
//PlayerInfo[playerid] = dini_Int(file,\"Admin\");
SendClientMessage(playerid, COLOR_GREEN, \"Bejelentkeztél, adatok betöltve. Ha legközelebb feljössz a mostani csapatod válaszd!\");
nLog[playerid] = 1;
TogglePlayerSpectating(playerid, 0);
}
}
}
}[/pawn]