Ich habe ein Prob mit meiner Statsbox, die zeigt nacheinander alle Stats von connecteden Usern
stock ShowStatsBox(playerid)
{
TextDrawShowForPlayer(playerid,StatsDraw[0]);
TextDrawShowForPlayer(playerid,StatsDraw[1]);
TextDrawShowForPlayer(playerid,StatsDraw[2]);
TextDrawShowForPlayer(playerid,StatsDraw[3]);
TextDrawShowForPlayer(playerid,StatsDraw[4]);
TextDrawShowForPlayer(playerid,StatsDraw[5]);
}
stock HideStatsBox(playerid)
{
TextDrawHideForPlayer(playerid,StatsDraw[0]);
TextDrawHideForPlayer(playerid,StatsDraw[1]);
TextDrawHideForPlayer(playerid,StatsDraw[2]);
TextDrawHideForPlayer(playerid,StatsDraw[3]);
TextDrawHideForPlayer(playerid,StatsDraw[4]);
TextDrawHideForPlayer(playerid,StatsDraw[5]);
}
stock UpdateStats(playerid)
{
new mstring[64],lstring[20], pstring[50], bstring[50];
format(mstring,sizeof(mstring),"Bargeld: $%d",GetPlayerMoney(playerid));
format(bstring,sizeof(bstring),"Bankkonto: $%d",Spieler[playerid][sBankkonto]);
format(pstring,sizeof(pstring),"Punkte in SA %d",Spieler[playerid][sPunkte]);
format(lstring,sizeof(lstring),"Level: %d",Spieler[playerid][sLevel]);
TextDrawSetString(StatsDraw[2], mstring);
TextDrawSetString(StatsDraw[3], bstring);
TextDrawSetString(StatsDraw[4], pstring);
TextDrawSetString(StatsDraw[5], lstring);
}
OnPlayerUpdate:
UpdateStats(playerid);
{
TextDrawShowForPlayer(playerid,StatsDraw[0]);
TextDrawShowForPlayer(playerid,StatsDraw[1]);
TextDrawShowForPlayer(playerid,StatsDraw[2]);
TextDrawShowForPlayer(playerid,StatsDraw[3]);
TextDrawShowForPlayer(playerid,StatsDraw[4]);
TextDrawShowForPlayer(playerid,StatsDraw[5]);
}
stock HideStatsBox(playerid)
{
TextDrawHideForPlayer(playerid,StatsDraw[0]);
TextDrawHideForPlayer(playerid,StatsDraw[1]);
TextDrawHideForPlayer(playerid,StatsDraw[2]);
TextDrawHideForPlayer(playerid,StatsDraw[3]);
TextDrawHideForPlayer(playerid,StatsDraw[4]);
TextDrawHideForPlayer(playerid,StatsDraw[5]);
}
stock UpdateStats(playerid)
{
new mstring[64],lstring[20], pstring[50], bstring[50];
format(mstring,sizeof(mstring),"Bargeld: $%d",GetPlayerMoney(playerid));
format(bstring,sizeof(bstring),"Bankkonto: $%d",Spieler[playerid][sBankkonto]);
format(pstring,sizeof(pstring),"Punkte in SA %d",Spieler[playerid][sPunkte]);
format(lstring,sizeof(lstring),"Level: %d",Spieler[playerid][sLevel]);
TextDrawSetString(StatsDraw[2], mstring);
TextDrawSetString(StatsDraw[3], bstring);
TextDrawSetString(StatsDraw[4], pstring);
TextDrawSetString(StatsDraw[5], lstring);
}
OnPlayerUpdate:
UpdateStats(playerid);