Ich verwende das G-Stylez R6 aber die Werte werden nicht in die Datenbank gespeichert.
stock SavePlayer(playerid)
{
if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid))
{
if(GetPVarInt(playerid,"Eingeloggt") == 1)
{
mysql_SetInt("accounts", "level", pInfo[playerid][level], "name", pInfo[playerid][pName]);
mysql_SetInt("accounts", "money", GetPlayerMoney(playerid), "name", pInfo[playerid][pName]);
mysql_SetInt("accounts", "kills", pInfo[playerid][kills], "name", pInfo[playerid][pName]);
mysql_SetInt("accounts", "deaths", pInfo[playerid][deaths], "name", pInfo[playerid][pName]);
print("DEBUG SavePlayer");
}
}
return 1;
}
Die Werte beim erstellen eines Accounts werden aber gespeichert? Was ist da los?
stock CreateAccount(playerid, pass[])
{
new query[256],Name[MAX_PLAYER_NAME];
GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
mysql_real_escape_string(Name,Name);
mysql_real_escape_string(pass,pass);
format(query, sizeof(query), "INSERT INTO `accounts` (`Name`, `Passwort`) VALUES ('%s', '%s')", Name, pass);
mysql_query(query);
return true;
}
Hier noch der SetInt Stock
stock mysql_SetInt(Table[], Field[], To, Where[], Where2[])
{
new query[128];
mysql_real_escape_string(Table, Table);
mysql_real_escape_string(Field, Field);
mysql_real_escape_string(Where, Where);
mysql_real_escape_string(Where2, Where2);
format(query, 128, "UPDATE `%s` SET `%s` = '%d' WHERE `%s` = '%s'", Table, Field, To, Where, Where2);
mysql_query(query);
return true;
}
Navicat:
Warum funktioniert das nicht?