Problema textdraw - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Română/Romanian (
https://sampforum.blast.hk/forumdisplay.php?fid=40)
+---- Thread: Problema textdraw (
/showthread.php?tid=526478)
Problema textdraw -
jamal1992 - 17.07.2014
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 ?
Re: Problema textdraw -
DyduShxD - 17.07.2014
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.
Re: Problema textdraw -
Mihaitza97 - 18.07.2014
Pentru ca tu nu adaugi la textul precedent, noul text, ci il updatezi mereu cu un text diferit.
Foloseste strcat.
Re: Problema textdraw -
jamal1992 - 18.07.2014
Nu stiu sa folosesc strcat ...
Re: Problema textdraw -
Psyhophatic - 18.07.2014
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...