A problem with textdraw
#1

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
Reply
#2

Help !

My frient has no problem,
But, I have this problem ...
Reply
#3

try to update your samp, or reinstall it
Reply
#4

Sorry,

The bug is for all
Reply
#5

In which callback are you creating the Textdraw?
Reply
#6

deleted
Reply
#7

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
Reply
#8

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]);
Reply
#9

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


Forum Jump:


Users browsing this thread: 1 Guest(s)