Moinsen,
folgnder Code:
public OnPlayerDeath(playerid, killerid, reason)
{
new oldkills=mysql_GetInt("accounts","kills","name",SpielerName(killerid));
mysql_SetInt("accounts","kills",oldkills+1,"name",SpielerName(killerid));
new olddeaths=mysql_GetInt("accounts","deaths","name",SpielerName(playerid));
mysql_SetInt("accounts","deaths",olddeaths+1,"name",SpielerName(playerid));
new str1[1000];
format(str1,sizeof(str1),"Kills: %i - Deaths: %i",mysql_GetInt("accounts","kills","name",SpielerName(killerid)),mysql_GetInt("accounts","deaths","name",SpielerName(killerid)));
PlayerTextDrawSetString(killerid,stats[killerid],str1);
new str2[1000];
format(str2,sizeof(str2),"Kills: %i - Deaths: %i",mysql_GetInt("accounts","kills","name",SpielerName(playerid)),mysql_GetInt("accounts","deaths","name",SpielerName(playerid)));
PlayerTextDrawSetString(playerid,stats[playerid],str2);
return 1;
}
Beim ersten Kill und Death, aktualisiert es sich, doch beim zweiten überlappen sich alter und neuer Textdraw.
Ich versuche nun seit knapp 3 Stunden den Fehler zu lokalisieren, doch ich finde ihn einfach nicht.
Was mache ich falsch?
Grüße