Ich werde es mal versuchen btw die "id" ist das AUTO_INCREMENT aus der Tabelle und ich habe es zur genauen Identifizierung benutzt 
Ps: Ich habe schon was zu der Login Funktion hinzugefügt stock mysql_LoadAccount(playerid, hash[])
{
new query[1000];
mysql_real_escape_string(PlayerName(playerid), PlayerName(playerid));
mysql_real_escape_string(hash, hash);
if(strcmp(mysql_GetPlayerPassword(playerid), hash, false))
{
SendClientMessage(playerid, COLOR_ERROR, "* Das eingegebene Passwort ist falsch!");
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "{28DC28}Login", "{FFFFFF}Der Account ist registriert.\nUm dich anzumelden,\ngib bitte dein Passwort ein", "Einloggen", "Abbrechen");
}
else
{
mysql_format(query, sizeof(query), "SELECT `Password`, `Level`, `RegisterDate`, `Experience`, `Health`, `Armour`, `Money`, `Kills`, `Deaths`, `KontoCard`, `VehicleSlot`, `MaxVehicles`, `Warnings`, `Banns`, `Hunger`, `Thirst`, `Desire`, `PremiumTime`, `PremiumPoints`, `AdminRank`, `SkinID`, `SkinID`, `Job`, `PaydayTime`, `Faction`, `FactionSkinID`, `Wanteds`, `Minutes`, `Hours`, `BikeLicense`, `BoatLicense`, `CarLicense`, `ChopperLicense`, `FishingLicense`, `PlaneLicense`, `TruckLicense`, `TollLicense`, `WeaponLicense` FROM `db_accounts` WHERE `pName` = '%s' AND `Password` = '%s'", PlayerName(playerid), hash);
mysql_function_query(MySQLHandle, query, true, "OnPlayerLoad", "i", playerid);
}
return 1;
}
Er soll eben prüfen ob das Passwort übereinstimmt und wenn ja dann soll er den query erst ausführen hoffe ich habe das richtig gemacht muss halt später noch die GetPlayerPassword funktion umändern aber sonst
joah
forward OnPlayerLoad(playerid);
public OnPlayerLoad(playerid)
{
new rows, fields;
cache_get_data(rows, fields);
if(rows)
{
new temp[12];
cache_get_row(0, 0, temp);
pInfo[playerid][Level] = strval(temp);
cache_get_row(0, 1, temp);
pInfo[playerid][Experience] = strval(temp);
cache_get_row(0, 2, temp);
pInfo[playerid][Health] = strval(temp);
cache_get_row(0, 3, temp);
pInfo[playerid][Armour] = strval(temp);
cache_get_row(0, 4, temp);
pInfo[playerid][Money] = strval(temp);
cache_get_row(0, 5, temp);
pInfo[playerid][Kills] = strval(temp);
cache_get_row(0, 6, temp);
pInfo[playerid][Deaths] = strval(temp);
cache_get_row(0, 7, temp);
pInfo[playerid][Kontocard] = strval(temp);
cache_get_row(0, 8, temp);
pInfo[playerid][Vehicleslot] = strval(temp);
cache_get_row(0, 9, temp);
pInfo[playerid][Maxvehicles] = strval(temp);
cache_get_row(0, 10, temp);
pInfo[playerid][Warnings] = strval(temp);
cache_get_row(0, 11, temp);
pInfo[playerid][Banns] = strval(temp);
cache_get_row(0, 12, temp);
pInfo[playerid][Hunger] = strval(temp);
cache_get_row(0, 13, temp);
pInfo[playerid][Thirst] = strval(temp);
cache_get_row(0, 14, temp);
pInfo[playerid][Desire] = strval(temp);
cache_get_row(0, 15, temp);
pInfo[playerid][Premiumtime] = strval(temp);
cache_get_row(0, 16, temp);
pInfo[playerid][Premiumpoints] = strval(temp);
cache_get_row(0, 17, temp);
pInfo[playerid][Adminrank] = strval(temp);
cache_get_row(0, 18, temp);
pInfo[playerid][SkinID] = strval(temp);
cache_get_row(0, 19, temp);
pInfo[playerid][Job] = strval(temp);
cache_get_row(0, 20, temp);
pInfo[playerid][Paydaytime] = strval(temp);
cache_get_row(0, 21, temp);
pInfo[playerid][Faction] = strval(temp);
cache_get_row(0, 22, temp);
pInfo[playerid][FactionskinID] = strval(temp);
cache_get_row(0, 23, temp);
pInfo[playerid][Wanteds] = strval(temp);
cache_get_row(0, 24, temp);
pInfo[playerid][Minutes] = strval(temp);
cache_get_row(0, 25, temp);
pInfo[playerid][Hours] = strval(temp);
cache_get_row(0, 26, temp);
pInfo[playerid][Bikelicense] = strval(temp);
cache_get_row(0, 27, temp);
pInfo[playerid][Boatlicense] = strval(temp);
cache_get_row(0, 28, temp);
pInfo[playerid][Carlicense] = strval(temp);
cache_get_row(0, 29, temp);
pInfo[playerid][Chopperlicense] = strval(temp);
cache_get_row(0, 30, temp);
pInfo[playerid][Fishinglicense] = strval(temp);
cache_get_row(0, 31, temp);
pInfo[playerid][Planelicense] = strval(temp);
cache_get_row(0, 32, temp);
pInfo[playerid][Trucklicense] = strval(temp);
cache_get_row(0, 33, temp);
pInfo[playerid][Tolllicense] = strval(temp);
cache_get_row(0, 34, temp);
pInfo[playerid][Weaponlicense] = strval(temp);
}
SetPlayerEuro(playerid, mysql_GetInt("db_accounts", "Money", "pName", PlayerName(playerid)));
SetPlayerSkin(playerid, pInfo[playerid][SkinID]);
SetPlayerScore(playerid, pInfo[playerid][Level]);
SetTimerEx("UpdateProgressBar", 0, false, "d", playerid);
vLoad(playerid, pInfo[playerid][VehicleSlot]);
SetPVarInt(playerid, "Login", 1);
SpawnPlayer(playerid);
return 1;
}
Ich hoffe mal das das richtig ist 