Guten Tag,
Mein Script Speichert den Spieler nicht -.-
Hier der Mysql-Log:
Code
[14:57:13] Passing query UPDATE DcR_accounts SET Online='0',Money='5000',Score='1',AdminLevel='4',Fraktion='1',Rang='6' WHERE Name = `Fabi.StaR` | [14:57:13] CMySQLHandler::ProcessQueryThread() - Error will be triggered to OnQueryError()
Stock SaveAccount:
stock SaveAccount(playerid)
{
if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid) && GetPVarInt(playerid,"Eingeloggt") == 1)
{
new mainquery[500],query[100],Float:Pos[3];
GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
format(query,sizeof(query),"UPDATE "#SERVER_TAG"_accounts SET Online='0',Money='%i',Score='%i',AdminLevel='%i',Fraktion='%i',Rang='%i'",
PlayerInfo[playerid][pMoney],PlayerInfo[playerid][pScore],PlayerInfo[playerid][pAdmin],PlayerInfo[playerid][pFraktion],PlayerInfo[playerid][pRang]);
strcat(mainquery,query);
strdel(query,0,sizeof(query));
format(query,sizeof(query)," WHERE Name = `%s`",PlayerName(playerid));
strcat(mainquery,query);
strdel(query,0,sizeof(query));
mysql_function_query(MySqlConnection,mainquery,false,"","");
strdel(mainquery,0,sizeof(mainquery));
}
return 1;
}
{
if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid) && GetPVarInt(playerid,"Eingeloggt") == 1)
{
new mainquery[500],query[100],Float:Pos[3];
GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
format(query,sizeof(query),"UPDATE "#SERVER_TAG"_accounts SET Online='0',Money='%i',Score='%i',AdminLevel='%i',Fraktion='%i',Rang='%i'",
PlayerInfo[playerid][pMoney],PlayerInfo[playerid][pScore],PlayerInfo[playerid][pAdmin],PlayerInfo[playerid][pFraktion],PlayerInfo[playerid][pRang]);
strcat(mainquery,query);
strdel(query,0,sizeof(query));
format(query,sizeof(query)," WHERE Name = `%s`",PlayerName(playerid));
strcat(mainquery,query);
strdel(query,0,sizeof(query));
mysql_function_query(MySqlConnection,mainquery,false,"","");
strdel(mainquery,0,sizeof(mainquery));
}
return 1;
}