if(dialogid==DIALOG_LOGIN)
{
if(response)
{
new name[MAX_PLAYER_NAME],query[128],passwort[35];
GetPlayerName(playerid,name,sizeof(name));
if(strlen(inputtext)>0)
{
mysql_escape_string(inputtext,passwort,dbhandle);
format(query,sizeof(query),"SELECT * FROM user WHERE username='%s' AND password='%s'",name,passwort);
mysql_function_query(dbhandle,query,true,"OnPasswordResponse","i",playerid);
}
else
{
SendClientMessage(playerid,ROT,"Gib bitte dein Passwort ein.");
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Willkommen auf Red-Game0v3r-Reallife,\n\n\n\n Bitte logge dich nun ein!\n\n\n","Login","Abbrechen");
printf("3");
public OnPasswordResponse(playerid)
{
new num_fields,num_rows;
cache_get_data(num_rows,num_fields,dbhandle);
if(num_rows==1)
{
//Spieler laden
sInfo[playerid][eingeloggt] = 1;
sInfo[playerid][level] = cache_get_field_content_int(0,"level",dbhandle);
SetPlayerScore(playerid,sInfo[playerid][level]);
sInfo[playerid][Skin] = cache_get_field_content_int(0,"skin",dbhandle);
SetPlayerSkin(playerid,sInfo[playerid][Skin]);
sInfo[playerid][db_id] = cache_get_field_content_int(0,"id",dbhandle);
SetPlayerMoney(playerid,cache_get_field_content_int(0,"money",dbhandle));
sInfo[playerid][alevel] = cache_get_field_content_int(0,"alevel",dbhandle);
sInfo[playerid][slevel] = cache_get_field_content_int(0,"slevel",dbhandle);
sInfo[playerid][fraktion] = cache_get_field_content_int(0,"fraktion",dbhandle);
sInfo[playerid][rang] = cache_get_field_content_int(0,"rang",dbhandle);
sInfo[playerid][spawnchange] = cache_get_field_content_int(0,"spawnchange",dbhandle);
SendClientMessage(playerid,ROT,"*Erfolgreich eingeloggt.");
SendClientMessage(playerid,weiß,"===============|WILLKOMMEN|===============");
SendClientMessage(playerid,Orange,"!!! Playpoint-Reallife - we are the Gamer!!!");
SendClientMessage(playerid,Orange,"!!! Das Orginale...alles andere ist eine Kopie !!!");
SendClientMessage(playerid,weiß,"===============|WILLKOMMEN|===============");
loadPlayerCars(playerid);
}
else
{
SendClientMessage(playerid,ROT,"Das eigegeben Passwort ist fasch");
printf("1");
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Willkommen auf Playpoint-Reallife,\n\n\n\n Bitte logge dich nun ein!\n\n\n","Login","Abbrechen");
}
return 1;
}
[14:01:24] Incoming connection: 127.0.0.1:57175
[14:01:24] [join] [RGR]Snake has joined the server (0:127.0.0.1)
[14:01:30] 1
[14:01:32] 1