Problema textdraw
#1

Am urmatoarele:
Code:
new Text:TextdrawSuspect[MAX_PLAYERS];
Code:
for(new i=0; i<MAX_PLAYERS; i++)
	{
                 TextdrawSuspect[i] = TextDrawCreate(606.000000, 160.000000, "");
		TextDrawAlignment(TextdrawSuspect[i], 3);
		TextDrawBackgroundColor(TextdrawSuspect[i], 255);
		TextDrawFont(TextdrawSuspect[i], 1);
		TextDrawLetterSize(TextdrawSuspect[i], 0.260000, 1.700000);
		TextDrawColor(TextdrawSuspect[i], 0xFFFFFFFF);
		TextDrawSetOutline(TextdrawSuspect[i], 0);
		TextDrawSetProportional(TextdrawSuspect[i], 1);
		TextDrawSetShadow(TextdrawSuspect[i], 1);
         }
Code:
PUBLIC: TimerPerSecond()
{
        for(new i = 0; i < MAX_PLAYERS; i++)
	{
	    if(IsPlayerConnected(i))
	    {
                    if(WantedLevel[i] > 0)
  			{
  			    new wstring[256];
  	    		format(wstring, sizeof(wstring), "[ID:%d] %s - [W%d]~n~", i,PlayerName(i),WantedLevel[i]);
    	    	        TextDrawSetString(TextdrawSuspect[i],wstring);
			}
              }
          }
}
Problema este ca nu imi afiseaza unu sub altu, unul peste altul. Ce as putea face ?
Reply
#2

Trebuie sa faci cate un textdraw separat, daca ai nevoie de ajutor da-mi pm cu id-ul tau de messenger si te voi ajuta.
Reply
#3

Pentru ca tu nu adaugi la textul precedent, noul text, ci il updatezi mereu cu un text diferit.

Foloseste strcat.
Reply
#4

Nu stiu sa folosesc strcat ...
Reply
#5

pawn Code:
new wstring[128],string2[128]
                format(string2, sizeof(string2), "[ID:%d] %s - [W%d]~n~", i,PlayerName(i),WantedLevel[i]);
                strcat(wstring,string2,sizeof(wstring);

                        TextDrawSetString(TextdrawSuspect[i],wstring);
Nu ma pricep la folosirea functiei strcat dar cred ca asa ar trebui...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)