public OnPasswordResponse(playerid)
{
new num_fields,num_rows;
cache_get_data(num_rows,num_fields,dbhandle);
if(num_rows==1)
{
//Passwort richtig
if(sInfo[playerid][registrierung]==1)
{
new s[128];
new loginname[MAX_PLAYER_NAME];
GetPlayerName(playerid,loginname,MAX_PLAYER_NAME);
format(s,sizeof(s),"{F50000}SERVER: {FFFFFF}Willkommen %s",loginname);
SendClientMessage(playerid,Rot,s);
GameTextForPlayer(playerid, "~b~Willkommen", 5000, 1);
sInfo[playerid][eingeloggt] = 1;
sInfo[playerid][level] = 0;
SetPlayerScore(playerid,sInfo[playerid][level]);
sInfo[playerid][pid] = cache_get_field_content_int(0,"id",dbhandle);
SetPlayerMoney(playerid,15000);
sInfo[playerid][adminlevel] = 0;
sInfo[playerid][fraktion] = 0;
sInfo[playerid][aduty] = 0;
sInfo[playerid][dienst] = 0;
sInfo[playerid][cuffed] = 0;
sInfo[playerid][registrierung] = 0;
sInfo[playerid][banned] = 0;
sInfo[playerid][supcar] = 0;
sInfo[playerid][realchat] = 1;
sInfo[playerid][tooc]= 0;
sInfo[playerid][bigear]= 0;
sInfo[playerid][muted]= 0;
sInfo[playerid][gun1] = 0;
sInfo[playerid][guna1] = 0;
sInfo[playerid][gun2] = 0;
sInfo[playerid][guna2] = 0;
sInfo[playerid][gun3] = 0;
sInfo[playerid][guna3] = 0;
sInfo[playerid][gun4] = 0;
sInfo[playerid][guna4] = 0;
sInfo[playerid][gun5] = 0;
sInfo[playerid][guna5] = 0;
sInfo[playerid][gun6] = 0;
sInfo[playerid][guna6] = 0;
sInfo[playerid][pwarn] = 0;
sInfo[playerid][crimes] = 0;
sInfo[playerid][friedhof] = 0;
sInfo[playerid][perso] = 0;
sInfo[playerid][bmoney] = 5000;
sInfo[playerid][fskin] = 0;
sInfo[playerid][rang] = 0;
sInfo[playerid][spawnchange] = 0;
sInfo[playerid][cars] = 0;
sInfo[playerid][paytime] = 0;
sInfo[playerid][premium] = 0;
sInfo[playerid][papagei] = 0;
APerso[playerid] = 0;
loadPlayerCars(playerid);
SendClientMessage(playerid,Gelb,"Du bekommst ein Startgeld von 20000$ (15000 Bar + 5000 Bank).");
SetSpawnInfo(playerid, 0, sInfo[playerid][skin], 1788.4104,-1297.7722,82.1459, 269.15, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
return 1;
}
else
{
new s[128];
new loginname[MAX_PLAYER_NAME];
GetPlayerName(playerid,loginname,MAX_PLAYER_NAME);
format(s,sizeof(s),"{F50000}SERVER: {FFFFFF}Willkommen %s",loginname);
SendClientMessage(playerid,Rot,s);
GameTextForPlayer(playerid, "~b~Willkommen", 5000, 1);
sInfo[playerid][eingeloggt] = 1;
sInfo[playerid][level] = cache_get_field_content_int(0,"level",dbhandle);
SetPlayerScore(playerid,sInfo[playerid][level]);
sInfo[playerid][pid] = cache_get_field_content_int(0,"id",dbhandle);
SetPlayerMoney(playerid,cache_get_field_content_int(0,"money",dbhandle));
sInfo[playerid][adminlevel] = cache_get_field_content_int(0,"adminlevel",dbhandle);
sInfo[playerid][fraktion] = cache_get_field_content_int(0,"fraktion",dbhandle);
sInfo[playerid][skin] = cache_get_field_content_int(0,"skin",dbhandle);
sInfo[playerid][aduty] = 0;
sInfo[playerid][dienst] = 0;
sInfo[playerid][cuffed] = 0;
sInfo[playerid][registrierung]=0;
sInfo[playerid][banned] = cache_get_field_content_int(0,"banned",dbhandle);
sInfo[playerid][supcar] = 0;
sInfo[playerid][realchat] = 1;
sInfo[playerid][tooc]=0;
sInfo[playerid][bigear]=0;
sInfo[playerid][muted]=0;
sInfo[playerid][gun1] = cache_get_field_content_int(0,"gun1",dbhandle);
sInfo[playerid][guna1] = cache_get_field_content_int(0,"guna1",dbhandle);
sInfo[playerid][gun2] = cache_get_field_content_int(0,"gun2",dbhandle);
sInfo[playerid][guna2] = cache_get_field_content_int(0,"guna2",dbhandle);
sInfo[playerid][gun3] = cache_get_field_content_int(0,"gun3",dbhandle);
sInfo[playerid][guna3] = cache_get_field_content_int(0,"guna3",dbhandle);
sInfo[playerid][gun4] = cache_get_field_content_int(0,"gun4",dbhandle);
sInfo[playerid][guna4] = cache_get_field_content_int(0,"guna4",dbhandle);
sInfo[playerid][gun5] = cache_get_field_content_int(0,"gun5",dbhandle);
sInfo[playerid][guna5] = cache_get_field_content_int(0,"guna5",dbhandle);
sInfo[playerid][gun6] = cache_get_field_content_int(0,"gun6",dbhandle);
sInfo[playerid][guna6] = cache_get_field_content_int(0,"guna6",dbhandle);
sInfo[playerid][pwarn] = cache_get_field_content_int(0,"pwarn",dbhandle);
sInfo[playerid][crimes] = cache_get_field_content_int(0,"crimes",dbhandle);
sInfo[playerid][friedhof] = 0;
sInfo[playerid][perso] = cache_get_field_content_int(0,"perso",dbhandle);
sInfo[playerid][geschlecht] = cache_get_field_content_int(0,"geschlecht",dbhandle);
sInfo[playerid][gbdatum] = cache_get_field_content_int(0,"gbdatum",dbhandle);
sInfo[playerid][bmoney] = cache_get_field_content_int(0,"bmoney",dbhandle);
sInfo[playerid][fskin] = cache_get_field_content_int(0,"fskin",dbhandle);
sInfo[playerid][rang] = cache_get_field_content_int(0,"rang",dbhandle);
sInfo[playerid][spawnchange] = cache_get_field_content_int(0,"spawnchange",dbhandle);
sInfo[playerid][cars] = cache_get_field_content_int(0,"cars",dbhandle);
sInfo[playerid][paytime] = cache_get_field_content_int(0,"paytime",dbhandle);
sInfo[playerid][premium] = cache_get_field_content_int(0,"premium",dbhandle);
sInfo[playerid][papagei] = cache_get_field_content_int(0,"papagei",dbhandle);
cache_get_field_content(0,"vname",sInfo[playerid][vname],dbhandle);
printf("%s",sInfo[playerid][vname]);
APerso[playerid] = 0;
loadPlayerCars(playerid);
SetSpawnInfo(playerid, 0, sInfo[playerid][skin], 1788.4104,-1297.7722,82.1459, 269.15, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
return 1;
}
}
else
{
//Passwort falsch
SendClientMessage(playerid,Rot,"Das eingegebende Passwort ist nicht korrekt!");
new s[256];
new loginname[MAX_PLAYER_NAME];
GetPlayerName(playerid,loginname,MAX_PLAYER_NAME);
format(s,sizeof(s),"{00F300}Dein Name wurde gefunden, bitte logg dich ein!\n\n{FF6E00}Benutzername: {FFFFFF}%s\n\nBitte gib dein Passwort ein:",loginname);
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Willkommen auf My City Dream",s,"Einloggen","Verlassen");
}
return 1;
}