Guten Abend,
Es liest immer nur 1 aus aber in der daten bank ist was anderes:(
#
hier der server log;
Code
----------Loaded log file: "server_log.txt".----------SA-MP Dedicated Server----------------------v0.3z, (C)2005-2014 SA-MP Team[18:04:14] [18:04:14] Server Plugins[18:04:14] --------------[18:04:14] Loading plugin: mysql[18:04:14] > MySQL plugin R7 successfully loaded.[18:04:14] Loaded.[18:04:14] Loaded 1 plugins.[18:04:14] [18:04:14] Filterscripts[18:04:14] ---------------[18:04:14] Loading filterscript 'gl_realtime.amx'...[18:04:14] Unable to load filterscript 'gl_realtime.amx'.[18:04:14] Loaded 0 filterscripts.[18:04:14] Number of vehicle models: 0[18:04:33] Incoming connection: 127.0.0.1:59835[18:04:33] [join] Fabi.StaR has joined the server (0:127.0.0.1)[18:04:51] NAME: Fabi.StaR | SQLiD: 1 | ADMIN: 1 [18:04:51] Char: 1 | Money: 1 | Score: 1
Hier der quell code:
public OnPlayerResponse(playerid)
{
new num_rows,num_fields;
cache_get_data(num_rows,num_fields,SQLCONNECTION);
if(num_rows == 1)
{
pInfo[playerid][SQLid] = cache_get_field(0,"ID",SQLCONNECTION);
pInfo[playerid][pAdmin] = cache_get_field(0,"AdminScore",SQLCONNECTION);
pInfo[playerid][pChar] = cache_get_field(0,"Char",SQLCONNECTION);
pInfo[playerid][pMoney] = cache_get_field(0,"Money",SQLCONNECTION);
pInfo[playerid][pScore] = cache_get_field(0,"Score",SQLCONNECTION);
SetPlayerScore(playerid,pInfo[playerid][pScore]);
GivePlayerMoney(playerid,pInfo[playerid][pMoney]);
GivePlayerMoney(playerid,pInfo[playerid][pMoney]);
if(pInfo[playerid][pChar] <= 0) pInfo[playerid][pChar] = 101;
pInfo[playerid][pLoggedin] = 1;
SpawnPlayer(playerid);
printf("\nNAME: %s | SQLiD: %i | ADMIN: %i ",pInfo[playerid][pName], pInfo[playerid][SQLid], pInfo[playerid][pAdmin]);
printf("Char: %i | Money: %i | Score: %i \n",pInfo[playerid][pChar], pInfo[playerid][pMoney], pInfo[playerid][pScore]);
return 1;
}
else
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Passwort Falsch!\n\nBitte gebe dein Passwort an","Einloggen","Abbrechen");
return 1;
}
SpawnPlayer(playerid);
printf("\nNAME: %s | SQLiD: %i | ADMIN: %i ",pInfo[playerid][pName], pInfo[playerid][SQLid], pInfo[playerid][pAdmin]);
printf("Char: %i | Money: %i | Score: %i \n",pInfo[playerid][pChar], pInfo[playerid][pMoney], pInfo[playerid][pScore]);
return 1;
}
else
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Passwort Falsch!\n\nBitte gebe dein Passwort an","Einloggen","Abbrechen");
return 1;
}