Textdraw crashing server
#1

ongamemodeinit
Код:
	Textdraw4 = TextDrawCreate(314.000000, 437.000000, "");
	TextDrawBackgroundColor(Textdraw4, 255);
	TextDrawFont(Textdraw4, 1);
	TextDrawLetterSize(Textdraw4, 0.500000, 1.000000);
	TextDrawColor(Textdraw4, -1);
	TextDrawSetOutline(Textdraw4, 1);
	TextDrawSetProportional(Textdraw4, 1);
onplayerspawn
Код:
	new scores[128];
 	format(scores, sizeof(scores), "Rank:[%s]",RankInfo[playerid][RName]);
 	TextDrawSetString(Textdraw4, scores);
 	TextDrawShowForPlayer(playerid, Textdraw4);
It crashes my server when i turn it on...
Reply
#2

Dude,
Quote:
Important Note: text[] must NOT be empty or the server will crash! If you need a textdraw that shows nothing, use " " (a space) or _ (underscore)
Try
Код:
 Textdraw4 = TextDrawCreate(314.000000, 437.000000, " ");
	TextDrawBackgroundColor(Textdraw4, 255);
	TextDrawFont(Textdraw4, 1);
	TextDrawLetterSize(Textdraw4, 0.500000, 1.000000);
	TextDrawColor(Textdraw4, -1);
	TextDrawSetOutline(Textdraw4, 1);
	TextDrawSetProportional(Textdraw4, 1);
Reply
#3

Quote:
Originally Posted by Sinyavski
Dude,
Quote:
Important Note: text[] must NOT be empty or the server will crash! If you need a textdraw that shows nothing, use " " (a space) or _ (underscore)
Try
Код:
 Textdraw4 = TextDrawCreate(314.000000, 437.000000, " ");
	TextDrawBackgroundColor(Textdraw4, 255);
	TextDrawFont(Textdraw4, 1);
	TextDrawLetterSize(Textdraw4, 0.500000, 1.000000);
	TextDrawColor(Textdraw4, -1);
	TextDrawSetOutline(Textdraw4, 1);
	TextDrawSetProportional(Textdraw4, 1);
oh that was stupid of me...
Thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)