Servus...
Nunja, das einzige was er dann ausspuckt ist 3x der selbe clan... :x
Eventuell ist es nur ein denkfehler welchen ich nicht checke weil ich total hundemüde bin xD
Naja, schaut es euch mal bitte an
dcmd_ranking(playerid,params[])
{
#pragma unused params
new CN1[128],CN2[128],CN3[128],CP1,CP2,CP3,string[256],cstring[128],ccstring[128],merken,merken2,merken3;
for(new c=0;c<MAX_CLANS;c++)
{
format(ccstring,sizeof(ccstring),"pkt%d",c);
if(merken < dini_Int("Clans/ranking.txt",ccstring))
{
merken=dini_Int("Clans/ranking.txt",ccstring);
CP1=dini_Int("Clans/ranking.txt",ccstring);
format(cstring,sizeof(cstring),"name%d",c);
strmid(CN1, dini_Get("Clans/ranking.txt", cstring), false, strlen(dini_Get("Clans/ranking.txt", cstring)), 128);
}
if(merken2 < merken)
{
merken2=dini_Int("Clans/ranking.txt",ccstring);
CP2=dini_Int("Clans/ranking.txt",ccstring);
format(cstring,sizeof(cstring),"name%d",c);
strmid(CN2, dini_Get("Clans/ranking.txt", cstring), false, strlen(dini_Get("Clans/ranking.txt", cstring)), 128);
}
if(merken3 < merken2)
{
merken3=dini_Int("Clans/ranking.txt",ccstring);
CP3=dini_Int("Clans/ranking.txt",ccstring);
format(cstring,sizeof(cstring),"name%d",c);
strmid(CN3, dini_Get("Clans/ranking.txt", cstring), false, strlen(dini_Get("Clans/ranking.txt", cstring)), 128);
}
}
format(string, sizeof(string),"Top 3 Clan's:\n \n1. Name: %s - Punkte: %d\n2. Name: %s - Punkte: %d\n3. Name: %s - Punkte: %d",CN1,CP1,CN2,CP2,CN3,CP3);
ShowPlayerDialog(playerid, DIALOG_RANKING, DIALOG_STYLE_MSGBOX,".:: Clan Ranking ::.",string,"Schließen","");
return 1;
}
Greetings