09.03.2011, 15:07
This code does not display the MAX SCORERS properly
pawn Код:
forward checkplayerscore();
public checkplayerscore(){
new /*strx[256],*/string[456],string2[456],tname[256],count;
for(new p;p<MAX_PLAYERS;p++){
if(IsPlayerConnected(p)){
GetPlayerName(p,"tname",sizeof(tname));
string2 = string;
//format(strx,sizeof(strx),"%s with %d Score" ,tname,GetPlayerScore(p));
if(GetPlayerScore(p) < count){ //see
format(string ,sizeof(string),"%s\n%s %d Score",string2,tname,GetPlayerScore(p));
}
else{
count = GetPlayerScore(p);
format(string ,sizeof(string),"%s %d Score\n%s", tname,GetPlayerScore(p),string2);
}
}
}
for(new p2;p2<MAX_PLAYERS;p2++){
ShowPlayerDialog(p2, 706, DIALOG_STYLE_MSGBOX, "HIGHEST SCORE", string, "OK", "ClOSE");
}
}