SA-MP Forums Archive
A problem with textdraw - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: A problem with textdraw (/showthread.php?tid=293174)



A problem with textdraw - jcvag44800 - 27.10.2011

Hi guys,

I have a problem with my textdraw.
This is superimposed ....
Friend : ( http://imageshack.us/photo/my-images...011135241.png/ )
Me : ( http://imageshack.us/photo/my-images/832/samp002fn.png/ )

It's the script :

Код:
	new sString[64];

	format(sString, sizeof(sString), "Chargement des statistiques ....");

	Textdraw2 = TextDrawCreate(147.000000,388.000000, sString);

	TextDrawFont(Textdraw2,1);
	TextDrawSetShadow(Textdraw2,0);
	TextDrawSetOutline(Textdraw2,1);
	TextDrawBackgroundColor(Textdraw2,0x000000FF);
	TextDrawColor(Textdraw2,0xFFFFFFFF);
	TextDrawAlignment(Textdraw2,0);
	TextDrawLetterSize(Textdraw2,0.5 ,1);
	TextDrawSetProportional(Textdraw2,1);
   	TextDrawUseBox(Textdraw2, 0);
Код:
    new newtext[256];
    format(newtext, sizeof(newtext), "~w~DM1: ~r~%d   ~w~DM2: ~r~%d   ~w~DM3: ~r~%d~w~ TDM1 : ~r~%d", jdm1, jdm2, jdm3, jtdm1);
    TextDrawSetString(Textdraw2, newtext);
    TextDrawShowForPlayer(playerid, Textdraw2);
Cordially


Re : A problem with textdraw - jcvag44800 - 27.10.2011

Help !

My frient has no problem,
But, I have this problem ...


Re: A problem with textdraw - Micius - 27.10.2011

try to update your samp, or reinstall it


Re : A problem with textdraw - jcvag44800 - 27.10.2011

Sorry,

The bug is for all


Re: A problem with textdraw - woot - 27.10.2011

In which callback are you creating the Textdraw?


Re: A problem with textdraw - Pooh7 - 27.10.2011

deleted


Re: A problem with textdraw - park4bmx - 27.10.2011

by the looks of it, it looks like the textdraw is created twice(or more) but with different values in it.
check if you not creating the textdraw for one player estra.
EDIT
damm i didnt look at the code you showed ;P
what [MWR]Blood said is correct


Re: A problem with textdraw - [MWR]Blood - 27.10.2011

Firstly, I don't see why should you use a formatted string here.
Secondly, the problem comes from that you shouldn't make a global textdraw, as you want to show the kills for each player.

Top of script:
pawn Код:
new Text:Textdraw2[MAX_PLAYERS];
under OnPlayerConnect
pawn Код:
Textdraw2[playerid] = TextDrawCreate(147.000000,388.000000, "Chargement des statistiques ....");
    TextDrawFont(Textdraw2[playerid],1);
    TextDrawSetShadow(Textdraw2[playerid],0);
    TextDrawSetOutline(Textdraw2[playerid],1);
    TextDrawBackgroundColor(Textdraw2[playerid],0x000000FF);
    TextDrawColor(Textdraw2[playerid],0xFFFFFFFF);
    TextDrawAlignment(Textdraw2[playerid],0);
    TextDrawLetterSize(Textdraw2[playerid],0.5 ,1);
    TextDrawSetProportional(Textdraw2[playerid],1);
    TextDrawUseBox(Textdraw2[playerid], 0);

pawn Код:
new newtext[256];
    format(newtext, sizeof(newtext), "~w~DM1: ~r~%d   ~w~DM2: ~r~%d   ~w~DM3: ~r~%d~w~ TDM1 : ~r~%d", jdm1, jdm2, jdm3, jtdm1);
    TextDrawSetString(Textdraw2[playerid], newtext);
    TextDrawShowForPlayer(playerid, Textdraw2[playerid]);



Re : A problem with textdraw - jcvag44800 - 27.10.2011

Thank you, it works!
The English support really works!