Textdraw Model Preview [Dont show up]
#1

First my Code:

Код:
new Text:Skinauwahl_Background;
new Text:Skinauswahl_Uberschrift;
new Text:Skinauswahl_Right;
new Text:Skinauswahl_Left;
new Text:Skinauswahl_Right_Background;
new Text:Skinauswahl_Left_Background;
new PlayerText:Skinauswahl_Box1[MAX_PLAYERS];
new PlayerText:Skinauswahl_Box2[MAX_PLAYERS];
new PlayerText:Skinauswahl_Box3[MAX_PLAYERS];
new PlayerText:Skinauswahl_Box4[MAX_PLAYERS];
in OnGameModeInit:
Код:
	Skinauwahl_Background = TextDrawCreate(554.000305, 279.750061, "usebox");
	TextDrawLetterSize(Skinauwahl_Background, 0.000000, 12.192590);
	TextDrawTextSize(Skinauwahl_Background, 128.823532, 0.000000);
	TextDrawAlignment(Skinauwahl_Background, 1);
	TextDrawColor(Skinauwahl_Background, 0);
	TextDrawUseBox(Skinauwahl_Background, true);
	TextDrawBoxColor(Skinauwahl_Background, 102);
	TextDrawSetShadow(Skinauwahl_Background, 0);
	TextDrawSetOutline(Skinauwahl_Background, 0);
	TextDrawFont(Skinauwahl_Background, 0);

	Skinauswahl_Right_Background = TextDrawCreate(554.000000, 396.416717, "usebox");
	TextDrawLetterSize(Skinauswahl_Right_Background, 0.000000, 1.562958);
	TextDrawTextSize(Skinauswahl_Right_Background, 498.705993, 0.000000);
	TextDrawAlignment(Skinauswahl_Right_Background, 1);
	TextDrawColor(Skinauswahl_Right_Background, 0);
	TextDrawUseBox(Skinauswahl_Right_Background, true);
	TextDrawBoxColor(Skinauswahl_Right_Background, 102);
	TextDrawSetShadow(Skinauswahl_Right_Background, 0);
	TextDrawSetOutline(Skinauswahl_Right_Background, 0);
	TextDrawFont(Skinauswahl_Right_Background, 0);

	Skinauswahl_Left_Background = TextDrawCreate(500.823730, 415.083312, "usebox");
	TextDrawLetterSize(Skinauswahl_Left_Background, 0.000000, -2.585180);
	TextDrawTextSize(Skinauswahl_Left_Background, 445.529663, 0.000000);
	TextDrawAlignment(Skinauswahl_Left_Background, 1);
	TextDrawColor(Skinauswahl_Left_Background, 0);
	TextDrawUseBox(Skinauswahl_Left_Background, true);
	TextDrawBoxColor(Skinauswahl_Left_Background, 102);
	TextDrawSetShadow(Skinauswahl_Left_Background, 0);
	TextDrawSetOutline(Skinauswahl_Left_Background, 0);
	TextDrawFont(Skinauswahl_Left_Background, 0);

	Skinauswahl_Uberschrift = TextDrawCreate(136.470581, 266.000000, "Skinauwahl");
	TextDrawLetterSize(Skinauswahl_Uberschrift, 0.668823, 2.136667);
	TextDrawAlignment(Skinauswahl_Uberschrift, 1);
	TextDrawColor(Skinauswahl_Uberschrift, -1);
	TextDrawSetShadow(Skinauswahl_Uberschrift, 0);
	TextDrawSetOutline(Skinauswahl_Uberschrift, 1);
	TextDrawBackgroundColor(Skinauswahl_Uberschrift, 51);
	TextDrawFont(Skinauswahl_Uberschrift, 1);
	TextDrawSetProportional(Skinauswahl_Uberschrift, 1);

	Skinauswahl_Right = TextDrawCreate(527.058593, 395.500030, ">>>");
	TextDrawLetterSize(Skinauswahl_Right, 0.449999, 1.600000);
	TextDrawAlignment(Skinauswahl_Right, 2);
	TextDrawColor(Skinauswahl_Right, -1);
	TextDrawSetShadow(Skinauswahl_Right, 0);
	TextDrawSetOutline(Skinauswahl_Right, 1);
	TextDrawBackgroundColor(Skinauswahl_Right, 51);
	TextDrawFont(Skinauswahl_Right, 1);
	TextDrawSetProportional(Skinauswahl_Right, 1);
	TextDrawSetSelectable(Skinauswahl_Right, true);

	Skinauswahl_Left = TextDrawCreate(472.941253, 395.500000, "<<<");
	TextDrawLetterSize(Skinauswahl_Left, 0.449999, 1.600000);
	TextDrawAlignment(Skinauswahl_Left, 2);
	TextDrawColor(Skinauswahl_Left, -1);
	TextDrawSetShadow(Skinauswahl_Left, 0);
	TextDrawSetOutline(Skinauswahl_Left, 1);
	TextDrawBackgroundColor(Skinauswahl_Left, 51);
	TextDrawFont(Skinauswahl_Left, 1);
	TextDrawSetProportional(Skinauswahl_Left, 1);
	TextDrawSetSelectable(Skinauswahl_Left, true);
the Command
Код:
	if(strcmp("/skintest", cmdtext, true, 9) == 0)
	{
		skinauswahl(playerid, 1);
    	return 1;
	}
and the method skinauswahl(playerid, frakid)
Код:
skinauswahl(playerid, frakid)
{
	if(frakid == 1)
	{
		Skinauswahl_Box1[playerid] = CreatePlayerTextDraw(playerid, 228.587768, 294.333557, "");
		PlayerTextDrawLetterSize(playerid, Skinauswahl_Box1[playerid], 0.000000, 8.917206);
		PlayerTextDrawTextSize(playerid, Skinauswahl_Box1[playerid], 147.293975, 0.000000);
		PlayerTextDrawAlignment(playerid, Skinauswahl_Box1[playerid], 1);
		PlayerTextDrawColor(playerid, Skinauswahl_Box1[playerid], 0);
		PlayerTextDrawUseBox(playerid, Skinauswahl_Box1[playerid], true);
		PlayerTextDrawBoxColor(playerid, Skinauswahl_Box1[playerid], 102);
		PlayerTextDrawSetShadow(playerid, Skinauswahl_Box1[playerid], 0);
		PlayerTextDrawSetOutline(playerid, Skinauswahl_Box1[playerid], 0);
		PlayerTextDrawFont(playerid, Skinauswahl_Box1[playerid], TEXT_DRAW_FONT_MODEL_PREVIEW);
		PlayerTextDrawSetSelectable(playerid, Skinauswahl_Box1[playerid], true);
		PlayerTextDrawSetPreviewModel(playerid, Skinauswahl_Box1[playerid], 32);
		PlayerTextDrawSetPreviewRot(playerid,Skinauswahl_Box1[playerid], -16.0, 0.0, 0.0);


		Skinauswahl_Box2[playerid] = CreatePlayerTextDraw(playerid, 329.999542, 294.333465, "");
		PlayerTextDrawLetterSize(playerid, Skinauswahl_Box2[playerid], 0.000000, 8.922659);
		PlayerTextDrawTextSize(playerid, Skinauswahl_Box2[playerid], 247.999679, 0.000000);
		PlayerTextDrawAlignment(playerid, Skinauswahl_Box2[playerid], 1);
		PlayerTextDrawColor(playerid, Skinauswahl_Box2[playerid], 0);
		PlayerTextDrawUseBox(playerid, Skinauswahl_Box2[playerid], true);
		PlayerTextDrawBoxColor(playerid, Skinauswahl_Box2[playerid], 102);
		PlayerTextDrawSetShadow(playerid, Skinauswahl_Box2[playerid], 0);
		PlayerTextDrawSetOutline(playerid, Skinauswahl_Box2[playerid], 0);
		PlayerTextDrawFont(playerid, Skinauswahl_Box2[playerid], TEXT_DRAW_FONT_MODEL_PREVIEW);
		PlayerTextDrawSetSelectable(playerid, Skinauswahl_Box2[playerid], true);
		PlayerTextDrawSetPreviewModel(playerid, Skinauswahl_Box2[playerid], 33);
		PlayerTextDrawSetPreviewRot(playerid,Skinauswahl_Box2[playerid], -16.0, 0.0, 0.0);

		Skinauswahl_Box3[playerid] = CreatePlayerTextDraw(playerid, 431.645965, 294.333404, "");
		PlayerTextDrawLetterSize(playerid, Skinauswahl_Box3[playerid], 0.000000, 8.874617);
		PlayerTextDrawTextSize(playerid, Skinauswahl_Box3[playerid], 349.528320, 0.000000);
		PlayerTextDrawAlignment(playerid, Skinauswahl_Box3[playerid], 1);
		PlayerTextDrawColor(playerid, Skinauswahl_Box3[playerid], 0);
		PlayerTextDrawUseBox(playerid, Skinauswahl_Box3[playerid], true);
		PlayerTextDrawBoxColor(playerid, Skinauswahl_Box3[playerid], 102);
		PlayerTextDrawSetShadow(playerid, Skinauswahl_Box3[playerid], 0);
		PlayerTextDrawSetOutline(playerid, Skinauswahl_Box3[playerid], 0);
		PlayerTextDrawFont(playerid, Skinauswahl_Box3[playerid], TEXT_DRAW_FONT_MODEL_PREVIEW);
		PlayerTextDrawSetSelectable(playerid, Skinauswahl_Box3[playerid], true);
		PlayerTextDrawSetPreviewModel(playerid, Skinauswahl_Box3[playerid], 34);
		PlayerTextDrawSetPreviewRot(playerid,Skinauswahl_Box3[playerid], -16.0, 0.0, 0.0);

		Skinauswahl_Box4[playerid] = CreatePlayerTextDraw(playerid, 534.705322, 294.333221, "");
		PlayerTextDrawLetterSize(playerid, Skinauswahl_Box4[playerid], 0.000000, 8.862201);
		PlayerTextDrawTextSize(playerid, Skinauswahl_Box4[playerid], 453.058319, 0.000000);
		PlayerTextDrawAlignment(playerid, Skinauswahl_Box4[playerid], 1);
		PlayerTextDrawColor(playerid, Skinauswahl_Box4[playerid], 0);
		PlayerTextDrawUseBox(playerid, Skinauswahl_Box4[playerid], true);
		PlayerTextDrawBoxColor(playerid, Skinauswahl_Box4[playerid], 102);
		PlayerTextDrawSetShadow(playerid, Skinauswahl_Box4[playerid], 0);
		PlayerTextDrawSetOutline(playerid, Skinauswahl_Box4[playerid], 0);
		PlayerTextDrawFont(playerid, Skinauswahl_Box4[playerid], TEXT_DRAW_FONT_MODEL_PREVIEW);
		PlayerTextDrawSetSelectable(playerid, Skinauswahl_Box4[playerid], true);
		PlayerTextDrawSetPreviewModel(playerid, Skinauswahl_Box4[playerid], 35);
		PlayerTextDrawSetPreviewRot(playerid,Skinauswahl_Box4[playerid], -16.0, 0.0, 0.0);

		PlayerTextDrawShow(playerid,Skinauswahl_Box1[playerid]);
		PlayerTextDrawShow(playerid,Skinauswahl_Box2[playerid]);
		PlayerTextDrawShow(playerid,Skinauswahl_Box3[playerid]);
		PlayerTextDrawShow(playerid,Skinauswahl_Box4[playerid]);

		TextDrawShowForPlayer(playerid,Skinauwahl_Background);
                TextDrawShowForPlayer(playerid,Skinauswahl_Uberschrift);
                TextDrawShowForPlayer(playerid,Skinauswahl_Right);
                TextDrawShowForPlayer(playerid,Skinauswahl_Left);
                TextDrawShowForPlayer(playerid,Skinauswahl_Right_Background);
                TextDrawShowForPlayer(playerid,Skinauswahl_Left_Background);

                SelectTextDraw(playerid, 0xdb7d03ff);
	}
}
To the problem:

Somehow
new PlayerText:Skinauswahl_Box1[MAX_PLAYERS];
new PlayerText:Skinauswahl_Box2[MAX_PLAYERS];
new PlayerText:Skinauswahl_Box3[MAX_PLAYERS];
new PlayerText:Skinauswahl_Box4[MAX_PLAYERS];

Dont show up. What is wrong?
Reply
#2

push
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)