Guten Tag,
ich arbeite an meinem Geldsystem, jedoch wenn ich mir per MySQL '2500€' gebe, habe ich Ingame '5000€', an was kann es liegen?
Hier Code:
stock GivePlayerEuro(playerid,euros)
{
AccountInfo[playerid][sGeld] += euros;
new geld[64];
format(geldtext,64,"%d",AccountInfo[playerid][sGeld]);
TextDrawSetString(GeldZahl[playerid],geld);
}
stock GetPlayerEuro(playerid)
{
return AccountInfo[playerid][sGeld];
}
Laden:
AccountInfo[playerid][sGeld] = mysql_GetInt("accounts","Geld","Name",AccountInfo[playerid][sName]);
GivePlayerEuro(playerid,AccountInfo[playerid][sGeld]);
Speichern:
mysql_SetInt("accounts","Geld",GetPlayerEuro(playerid),"Name",AccountInfo[playerid][sName]);
mysql_SetInt("accounts","Geld",AccountInfo[playerid][sGeld],"Name",AccountInfo[playerid][sName]);
Ich bedanke mich im vorraus!