public OnPasswordResponse(playerid)
{
new num_rows, num_fields;
cache_get_data(num_rows, num_fields, manomysql);
if(num_rows == 1)
{
//Slaptažodis teisingas
sInfo[playerid][kazkas] = 1;
TogglePlayerSpectating(playerid, 0);
ClearChat(playerid);
SendClientMessage(playerid, MELYNA, "pasveikinimas");
sInfo[playerid][XP] = cache_get_field_content_int(0, "XP", manomysql);
SetPlayerScore(playerid, sInfo[playerid][XP]);
sInfo[playerid][id] = cache_get_field_content_int(0, "id", manomysql);
sInfo[playerid][lytis] = cache_get_field_content_int(0, "lytis", manomysql);
sInfo[playerid][pinigai] = cache_get_field_content_int(0, "pinigai", manomysql);
GivePlayerMoney(playerid, sInfo[playerid][pinigai]);
sInfo[playerid][adminlevel] = cache_get_field_content_int(0, "adminlevel", manomysql);
sInfo[playerid][skinas] = cache_get_field_content_int(0, "skinas", manomysql);
SetPlayerSkin(playerid, sInfo[playerid][skinas]);
sInfo[playerid][zskinas] = cache_get_field_content_int(0, "zskinas", manomysql);
sInfo[playerid][dskinas] = cache_get_field_content_int(0, "dskinas", manomysql);
sInfo[playerid][VIP] = cache_get_field_content_int(0, "VIP", manomysql);
sInfo[playerid][p_x] = cache_get_field_content_float(0, "x", manomysql);
sInfo[playerid][p_y] = cache_get_field_content_float(0, "y", manomysql);
sInfo[playerid][p_z] = cache_get_field_content_float(0, "z", manomysql);
SetPlayerPos(playerid, sInfo[playerid][p_x], sInfo[playerid][p_y], sInfo[playerid][p_z]);
sInfo[playerid][MedikuDarbas] = cache_get_field_content_int(0, "MedikuDarbas", manomysql);
sInfo[playerid][MedDirektorius] = cache_get_field_content_int(0, "MedDirektorius", manomysql);
sInfo[playerid][MedPavaduotojas] = cache_get_field_content_int(0, "MedPavaduotojas", manomysql);
sInfo[playerid][MedRangas] = cache_get_field_content_int(0, "MedRangas", manomysql);
sInfo[playerid][TaxiDarbas] = cache_get_field_content_int(0, "TaxiDarbas", manomysql);
sInfo[playerid][TaxDirektorius] = cache_get_field_content_int(0, "TaxDirektorius", manomysql);
sInfo[playerid][TaxPavaduotojas] = cache_get_field_content_int(0, "TaxPavaduotojas", manomysql);
sInfo[playerid][TaxDirektorius] = cache_get_field_content_int(0, "TaxDirektorius", manomysql);
}
else
{
//Slaptažodis neteisingas
SendClientMessage(playerid, RAUDONA, "Neteisingas slaptažodis!");
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Prisijungimas", "Prašome įvesti slaptažodį!", "Prisijungti", "Išeiti");
}
return 1;
}
|