Textdraw issue.
#1

Okay so i have made a textdraw and it works ig but nothing shows up on the textdraw this is the textdraw code.


Код:
Textdraw0 = TextDrawCreate(640.476196, 308.273315, "usebox");
	TextDrawLetterSize(Textdraw0, 0.000000, 11.298151);
	TextDrawTextSize(Textdraw0, 528.666625, 0.000000);
	TextDrawAlignment(Textdraw0, 1);
	TextDrawColor(Textdraw0, 0);
	TextDrawUseBox(Textdraw0, true);
	TextDrawBoxColor(Textdraw0, 102);
	TextDrawSetShadow(Textdraw0, 0);
	TextDrawSetOutline(Textdraw0, 0);
	TextDrawFont(Textdraw0, 0);

	Textdraw1 = TextDrawCreate(528.380859, 310.613342, "CL:RP");
	TextDrawLetterSize(Textdraw1, 0.449999, 1.600000);
	TextDrawTextSize(Textdraw1, -47.618865, 458.666748);
	TextDrawAlignment(Textdraw1, 1);
	TextDrawColor(Textdraw1, -1);
	TextDrawSetShadow(Textdraw1, 0);
	TextDrawSetOutline(Textdraw1, 1);
	TextDrawBackgroundColor(Textdraw1, 51);
	TextDrawFont(Textdraw1, 1);
	TextDrawSetProportional(Textdraw1, 1);

	Textdraw2 = TextDrawCreate(580.666625, 330.459991, "usebox");
	TextDrawLetterSize(Textdraw2, 0.000000, 3.665555);
	TextDrawTextSize(Textdraw2, 529.047607, 0.000000);
	TextDrawAlignment(Textdraw2, 1);
	TextDrawColor(Textdraw2, 0);
	TextDrawUseBox(Textdraw2, true);
	TextDrawBoxColor(Textdraw2, 102);
	TextDrawSetShadow(Textdraw2, 0);
	TextDrawSetOutline(Textdraw2, 0);
	TextDrawFont(Textdraw2, 0);

	Textdraw3 = TextDrawCreate(531.047607, 335.786651, "Stats");
	TextDrawLetterSize(Textdraw3, 0.261427, 1.151998);
	TextDrawTextSize(Textdraw3, -169.523803, 61.866672);
	TextDrawAlignment(Textdraw3, 1);
	TextDrawColor(Textdraw3, -1);
	TextDrawSetShadow(Textdraw3, 0);
	TextDrawSetOutline(Textdraw3, 1);
	TextDrawBackgroundColor(Textdraw3, 51);
	TextDrawFont(Textdraw3, 1);
	TextDrawSetProportional(Textdraw3, 1);

	Textdraw4 = TextDrawCreate(531.809448, 350.293304, "Hours:");
	TextDrawLetterSize(Textdraw4, 0.225237, 1.002665);
	TextDrawAlignment(Textdraw4, 1);
	TextDrawColor(Textdraw4, -1);
	TextDrawSetShadow(Textdraw4, 0);
	TextDrawSetOutline(Textdraw4, 1);
	TextDrawBackgroundColor(Textdraw4, 51);
	TextDrawFont(Textdraw4, 1);
	TextDrawSetProportional(Textdraw4, 1);
	TextDrawSetSelectable(Textdraw4, true);
Код:
	format(str, sizeof(str), "Hours: %s", pPlayingHours);
			PlayerTextDrawSetString(playerid, PlayerData[playerid][Textdraw4], str);
Reply
#2

it shows Hours in values right?

try this:

Код:
format(str, sizeof(str), "Hours: %d", pPlayingHours);
			PlayerTextDrawSetString(playerid, PlayerData[playerid][Textdraw4], str);
Reply
#3

Come to think about it i am just testing that out myself :P
Reply
#4

this should be change to
PHP код:
    format(strsizeof(str), "Hours: %s"pPlayingHours);
            
PlayerTextDrawSetString(playeridPlayerData[playerid][Textdraw4], str); 
to this

PHP код:

format
(strsizeof(str), "Hours: %s"pPlayingHours);
TextDrawSetString(Textdraw4str);
TextDrawShowForPlayer(playeridTextdraw4); 
Reply
#5

error 017: undefined symbol "MoneyBagtext"
Reply
#6

Use this

PHP код:
format(strsizeof(str), "Hours: %s"pPlayingHours); 
TextDrawSetString(Textdraw4str); 
TextDrawShowForPlayer(playeridTextdraw4); 
Reply
#7

It now says my name as Hours :S
Reply
#8

Try this
PHP код:

format
(strsizeof(str), "Hours: %i"pPlayingHours);  
TextDrawSetString(Textdraw4str);  
TextDrawShowForPlayer(playeridTextdraw4); 
Reply
#9

Okay now it says i have 360 hours when I have 480.
Reply
#10

Quote:
Originally Posted by alexanderjb918
Посмотреть сообщение
Okay now it says i have 360 hours when I have 480.
Don't understand can you explain?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)