07.06.2012, 01:56
Hi SA-MP Community,
Can you help me how to make some series of textdraws to get top 5 wanted players?
I tried Ryders script like this:
Its just showing in one textdraw, not in all. Even though I have created all TDs below it.
Help me.
Can you help me how to make some series of textdraws to get top 5 wanted players?
I tried Ryders script like this:
pawn Code:
{
new
playerWL[MAX_PLAYERS][Crime],
index
;
for(new i; i != MAX_PLAYERS; ++i) {
if(IsPlayerConnected(i) && !IsPlayerNPC(i)) {
playerWL[index][player_WantedLevel] = GetPlayerWantedLevel(i);
playerWL[index++][player_ID] = i;
}
}
GetPlayerHighestWantedLevel(playerWL, 0, index);
new player_Name[20], string[24+MAX_PLAYER_NAME+1], player_Level[256];
for(new i; i < 5; ++i) {
if(i < index) {
GetPlayerName(playerWL[i][player_ID], player_Name, sizeof(player_Name));
format(string, sizeof(string), "~w~%s", player_Name);
format(player_Level, sizeof(player_Level), "%d", playerWL[i][player_WantedLevel]);
}
else
format(string, sizeof(string), "~r~N/A", player_Name);
}
TextDrawSetString(Textdraw38, player_Level);
TextDrawShowForPlayer(playerid, Textdraw38);
TextDrawSetString(Textdraw7, player_Name);
TextDrawShowForPlayer(playerid, Textdraw7);
TextDrawSetSelectable(Textdraw7, true);
}
Help me.