Help with a Textdraw
#1

Hi SA-MP Community,

I made a most wanted player code. So when I have more than 1 players, I only get the first Textdraw filled with a persons name. Eg:- If I and my friends are playing and all have wanted levels, only the first Textdraw will have a name. How can I add more Textdraws to have name of 1st wanted player, 2nd wanted player.....
Here is my code:
pawn Код:
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);// level TD
            TextDrawShowForPlayer(playerid, Textdraw38);
            TextDrawSetString(Textdraw7, player_Name);//name TD
            TextDrawShowForPlayer(playerid, Textdraw7);
Reply


Messages In This Thread
Help with a Textdraw - by Faisal_khan - 23.05.2012, 20:39
Re: Help with a Textdraw - by Faisal_khan - 25.05.2012, 05:30
Re: Help with a Textdraw - by sampmark05 - 25.05.2012, 05:36
Re: Help with a Textdraw - by Ballu Miaa - 25.05.2012, 16:53
Re: Help with a Textdraw - by Faisal_khan - 25.05.2012, 16:58
Re: Help with a Textdraw - by Faisal_khan - 27.05.2012, 07:08
Re: Help with a Textdraw - by Faisal_khan - 27.05.2012, 13:39

Forum Jump:


Users browsing this thread: 2 Guest(s)