Code:
CMD:list(playerid, params[])
{
new playerScores[MAX_PLAYERS][rankingEnum], index, p;
foreach(new i : Player)
{
if(PlayerInfo[i][pWasInArena])
{
playerScores[index][player_Score] = floatround(PlayerInfo[i][pDamage]);
playerScores[index++][player_ID] = i;
p++;
}
}
GetPlayerHighestScores(playerScores, 0, (index-1));
new AttList[256], AttKills[256], AttScore[256], AttDamage[256], DefList[256], DefKills[256], DefScore[256], DefDamage[256], TopScore[256];
for(new i = 0; i != p; i++)
{
if(IsPlayerAttacker(playerScores[i][player_ID]))
{
format(AttList, sizeof(AttList), "%s~r~~h~%s~n~", AttList, GetPlayerNameEx(playerScores[i][player_ID]));
format(AttKills, sizeof(AttKills), "%s~w~~h~~h~%d~n~", AttKills, PlayerInfo[playerScores[i][player_ID]][pRoundKills]);
format(AttScore, sizeof(AttScore), "%s~w~~h~~h~%d~n~", AttScore, PlayerInfo[playerScores[i][player_ID]][pRoundPoints]);
format(AttDamage, sizeof(AttDamage), "%s~w~~h~~h~%d~n~", AttDamage, playerScores[i][player_Score]);
}
else if(IsPlayerDefender(playerScores[i][player_ID]))
{
format(DefList, sizeof(DefList), "%s~b~~h~%s~n~", DefList, GetPlayerNameEx(playerScores[i][player_ID]));
format(DefKills, sizeof(DefKills), "%s~w~~h~~h~%d~n~", DefKills, PlayerInfo[playerScores[i][player_ID]][pRoundKills]);
format(DefScore, sizeof(DefScore), "%s~w~~h~~h~%d~n~", DefScore, PlayerInfo[playerScores[i][player_ID]][pRoundPoints]);
format(DefDamage, sizeof(DefDamage), "%s~w~~h~~h~%d~n~", DefDamage, playerScores[i][player_Score]);
}
if(i == 0) format(TopScore, sizeof(TopScore), "%s%s1. %s~n~", TopScore, IsPlayerAttacker(playerScores[i][player_ID]) ? ("~r~") : ("~b~"), GetPlayerNameEx(playerScores[i][player_ID]));
else if(i == 1) format(TopScore, sizeof(TopScore), "%s%s2. %s~n~", TopScore, IsPlayerAttacker(playerScores[i][player_ID]) ? ("~r~") : ("~b~"), GetPlayerNameEx(playerScores[i][player_ID]));
else if(i == 2) format(TopScore, sizeof(TopScore), "%s%s3. %s~n~", TopScore, IsPlayerAttacker(playerScores[i][player_ID]) ? ("~r~") : ("~b~"), GetPlayerNameEx(playerScores[i][player_ID]));
}
TextDrawSetString(attackerText[0], AttList);
TextDrawSetString(attackerText[2], AttKills);
TextDrawSetString(attackerText[1], AttScore);
TextDrawSetString(attackerText[3], AttDamage);
TextDrawSetString(defenderText[0], DefList);
TextDrawSetString(defenderText[2], DefKills);
TextDrawSetString(defenderText[1], DefScore);
TextDrawSetString(defenderText[3], DefDamage);
TextDrawSetString(topList, TopScore);
for(new i = 0; i < 15; i++)
{
TextDrawShowForAll(endText[i]);
}
for(new i = 0; i < 4; i++)
{
TextDrawShowForAll(attackerText[i]);
}
for(new i = 0; i < 4; i++)
{
TextDrawShowForAll(defenderText[i]);
}
TextDrawShowForAll(topList);
return 1;
}
Like I mentioned previously, by lowering the string size everything works, so I doubt that's the problem