18.06.2015, 18:52
Hi, i want to do a Textdraw with a list of players.
I want something like this: http://s20.postimg.org/ohwbu6njx/sa_mp_004.png
But player names are not added as above ( like a list )
Simply, the first player is replaced by the second , there isn"t a new line.
Here is my code:
What"s wrong?
I want something like this: http://s20.postimg.org/ohwbu6njx/sa_mp_004.png
But player names are not added as above ( like a list )
Simply, the first player is replaced by the second , there isn"t a new line.
Here is my code:
What"s wrong?
Код:
stock RefreshWantedList() { foreach(Player, i) { if(IsPlayerConnected(i)) { new suspectname[MAX_PLAYER_NAME], string[128]; foreach(Player, c) { if(IsPlayerConnected©) { if(WantedShow[c] > 0 && IsACop©) { PlayerTextDrawHide(c, WantedHeader[c]); //PlayerTextDrawHide(c, WantedList[c]); PlayerTextDrawShow(c, WantedHeader[c]); GetPlayerName(i, suspectname, sizeof(suspectname)); if(WantedLevel[i] >= 1) { PlayerTextDrawHide(c, WantedList[c]); format(string, sizeof(string), "ID: %d - Name: %s - WL: %d~n~",i,suspectname,WantedLevel[i]); PlayerTextDrawSetString(c, WantedList[c], string); PlayerTextDrawShow(c, WantedList[c]); } } } } } } }