HeiHo Breadfish Com,
Ich bräuchte mal eben Hilfe, und zwar werden meine Account Daten leider nicht gespeichert, der Name und das Passwort werden aber Komischerweise gespeichert...
Ebenso wird nur der Name das Passwort und das Adminlevel ausgelesen...
Hier mal mein "SavePlayerData":
stock SavePlayerData(playerid)
{
new query[100 + MAX_PLAYER_NAME];
mysql_format(mycon,query, sizeof(query), "UPDATE `accounts` SET `Geld` = '%d' WHERE `Name` = '%s'",User[playerid][Geld]);
mysql_function_query(mycon,query,false,"","");
mysql_format(mycon,query, sizeof(query), "UPDATE `accounts` SET `banned` = '%d' WHERE `Name` = '%s'",User[playerid][banned]);
mysql_function_query(mycon,query,false,"","");
mysql_format(mycon,query, sizeof(query), "UPDATE `accounts` SET `Bank` = '%d' WHERE `Name` = '%s'",User[playerid][Bank]);
mysql_function_query(mycon,query,false,"","");
mysql_format(mycon,query, sizeof(query), "UPDATE `accounts` SET `Level` = '%d' WHERE `Name` = '%s'",User[playerid][Level]);
mysql_function_query(mycon,query,false,"","");
mysql_format(mycon,query, sizeof(query), "UPDATE `accounts` SET `Adminlevel` = '%d' WHERE `Name` = '%s'",User[playerid][Adminlevel]);
mysql_function_query(mycon,query,false,"","");
mysql_format(mycon,query, sizeof(query), "UPDATE `accounts` SET `Userrat` = '%d' WHERE `Name` = '%s'",User[playerid][Userrat]);
mysql_function_query(mycon,query,false,"","");
mysql_format(mycon,query, sizeof(query), "UPDATE `accounts` SET `UserratLeader` = '%d' WHERE `Name` = '%s'",User[playerid][UserratLeader]);
mysql_function_query(mycon,query,false,"","");
mysql_format(mycon,query, sizeof(query), "UPDATE `accounts` SET `ExistenzLeader` = '%d' WHERE `Name` = '%s'",User[playerid][ExistenzLeader]);
mysql_function_query(mycon,query,false,"","");
mysql_format(mycon,query, sizeof(query), "UPDATE `accounts` SET `Existenz` = '%d' WHERE `Name` = '%s'",User[playerid][Existenz]);
mysql_function_query(mycon,query,false,"","");
mysql_format(mycon,query, sizeof(query), "UPDATE `accounts` SET `CMDallow` = '%d' WHERE `Name` = '%s'",User[playerid][CMDallow]);
mysql_function_query(mycon,query,false,"","");
mysql_format(mycon,query, sizeof(query), "UPDATE `accounts` SET `Werkzeugkasten` = '%d' WHERE `Name` = '%s'",User[playerid][Werkzeugkasten]);
mysql_function_query(mycon,query,false,"","");
mysql_format(mycon,query, sizeof(query), "UPDATE `accounts` SET `HangarKey` = '%d' WHERE `Name` = '%s'",User[playerid][HangarKey]);
mysql_function_query(mycon,query,false,"","");
mysql_format(mycon,query, sizeof(query), "UPDATE `accounts` SET `Leader` = '%d' WHERE `Name` = '%s'",User[playerid][Leader]);
mysql_function_query(mycon,query,false,"","");
mysql_format(mycon,query, sizeof(query), "UPDATE `accounts` SET `Member` = '%d' WHERE `Name` = '%s'",User[playerid][Member]);
mysql_function_query(mycon,query,false,"","");
mysql_format(mycon,query, sizeof(query), "UPDATE `accounts` SET `Rang` = '%d' WHERE `Name` = '%s'",User[playerid][Rang]);
mysql_function_query(mycon,query,false,"","");
mysql_format(mycon,query, sizeof(query), "UPDATE `accounts` SET `Skin` = '%d' WHERE `Name` = '%s'",User[playerid][Skin]);
mysql_function_query(mycon,query,false,"","");
mysql_format(mycon,query, sizeof(query), "UPDATE `accounts` SET `InPrison` = '%d' WHERE `Name` = '%s'",User[playerid][InPrison]);
mysql_function_query(mycon,query,false,"","");
mysql_format(mycon,query, sizeof(query), "UPDATE `accounts` SET `PrisonCPsgegeben` = '%d' WHERE `Name` = '%s'",User[playerid][PrisonCPsgegeben]);
mysql_function_query(mycon,query,false,"","");
mysql_format(mycon,query, sizeof(query), "UPDATE `accounts` SET `PrisonCPsgelaufen` = '%d' WHERE `Name` = '%s'",User[playerid][PrisonCPsgelaufen]);
mysql_function_query(mycon,query,false,"","");
mysql_format(mycon,query, sizeof(query), "UPDATE `accounts` SET `Skilllevel` = '%d' WHERE `Name` = '%s'",User[playerid][Skilllevel]);
mysql_function_query(mycon,query,false,"","");
mysql_format(mycon,query, sizeof(query), "UPDATE `accounts` SET `Skillpunkte` = '%d' WHERE `Name` = '%s'",User[playerid][Skillpunkte]);
mysql_function_query(mycon,query,false,"","");
mysql_format(mycon,query, sizeof(query), "UPDATE `accounts` SET `ZeitzumSkillpunkt` = '%d' WHERE `Name` = '%s'",User[playerid][ZeitzumSkillpunkt]);
mysql_function_query(mycon,query,false,"","");
mysql_format(mycon,query, sizeof(query), "UPDATE `accounts` SET `ZeitseidSkillpunkt` = '%d' WHERE `Name` = '%s'",User[playerid][ZeitseidSkillpunkt]);
mysql_function_query(mycon,query,false,"","");
return 1;
}
Hatte zuvor auf rat von Pablo Borsellino: %s in %d geändert... ohne erfolg.
Und hier mein "LoadPlayerDataSequenze":
public LoadPlayerDataSequence(playerid, l_step)
{
switch(l_step)
{
case 1:
{
new count = cache_get_field_content_int(0,"count");
if(count)
{
ShowPlayerDialog(playerid, Dialog_Login, DIALOG_STYLE_PASSWORD, "{00FF00}[Just-Roleplay - Login]","{FFFFFF}Bitte geben Sie Ihr Passwort ein!","Login","Abbrechen");
return 1;
}
else
{
ShowPlayerDialog(playerid, Dialog_Reg, DIALOG_STYLE_PASSWORD, "{00FF00}[Just-Roleplay - Registrierung]","{FFFFFF}Bitte geben Sie Ihr gewünschtes Passwort ein!","Register","Abbrechen");
return 1;
}
}
case 2:
{
new count = cache_get_field_content_int(0,"count");
if(count)
{
new query[60 + MAX_PLAYER_NAME];
mysql_format(mycon,query, sizeof(query), "SELECT * FROM `accounts` WHERE `Name` = '%e'",User[playerid][Name]);
mysql_function_query(mycon,query,true,"LoadPlayerDataSequence","dd",playerid,3);
return 1;
}
else
{
ShowPlayerDialog(playerid, Dialog_Login, DIALOG_STYLE_PASSWORD, "{00FF00}[Passwort Eingabe - Loginsequenz]","{FFFFFF}Bitte geben Sie Ihr richtiges Passwort ein!\n{FF0000}Die vorherige Eingabe war falsch!","Login","Abbrechen");
return 1;
}
}
case 3:
{
User[playerid][Geld] = cache_get_field_content_int(0,"Geld");
User[playerid][banned] = cache_get_field_content_int(0,"banned");
User[playerid][Bank] = cache_get_field_content_int(0,"Bank");
User[playerid][Level] = cache_get_field_content_int(0,"Level");
User[playerid][Adminlevel] = cache_get_field_content_int(0,"Adminlevel");
User[playerid][Userrat] = cache_get_field_content_int(0,"Userrat");
User[playerid][UserratLeader] = cache_get_field_content_int(0,"UserratLeader");
User[playerid][ExistenzLeader] = cache_get_field_content_int(0,"ExistenzLeader");
User[playerid][Existenz] = cache_get_field_content_int(0,"Existenz");
User[playerid][CMDallow] = cache_get_field_content_int(0,"CMDallow");
User[playerid][Werkzeugkasten] = cache_get_field_content_int(0,"Werkzeugkasten");
User[playerid][HangarKey] = cache_get_field_content_int(0,"HangarKey");
User[playerid][Leader] = cache_get_field_content_int(0,"Leader");
User[playerid][Member] = cache_get_field_content_int(0,"Member");
User[playerid][InPrison] = cache_get_field_content_int(0,"InPrison");
User[playerid][PrisonCPsgelaufen] = cache_get_field_content_int(0,"PrisonCPsgelaufen");
User[playerid][PrisonCPsgegeben] = cache_get_field_content_int(0,"PrisonCPsgegeben");
User[playerid][Rang] = cache_get_field_content_int(0,"Rang");
User[playerid][Skin] = cache_get_field_content_int(0,"Skin");
User[playerid][Skilllevel] = cache_get_field_content_int(0,"Skilllevel");
User[playerid][Skillpunkte] = cache_get_field_content_int(0,"Skillpunkte");
User[playerid][ZeitzumSkillpunkt] = cache_get_field_content_int(0,"ZeitzumSkillpunkt");
User[playerid][ZeitseidSkillpunkt] = cache_get_field_content_int(0,"ZeitseidSkillpunkt");
SpawnPlayer(playerid);
return 1;
}
default:
{
SendClientMessage(playerid,0xFF0000FF,"Es könnte ein Bug aufgetreten sein! Bitte reconnecten Sie!");
SetTimerEx("KickPlayer",250,0,"i",playerid);
return 1;
}
}
return 1;
}