11.01.2015, 04:01
(
Последний раз редактировалось ABKPot; 11.01.2015 в 04:36.
)
Can anyone figure out why these three model preview textdraws aren't showing? The code seems correct, I can't seem to figure out the mistake. I tried a lotta shit lol. I need to figure this out asap so I can continue work on my server. Thanks.
(ClothesItemBG[0-2]) are the ID's of the textdraws not working. They show, then disappear right after.
The other 2 normal textdraws (ClothesTitle[0-1]) are working and show up fine when using the test/debug command.
EDIT: https://sampwiki.blast.hk/wiki/PlayerTex...etPreviewModel
(ClothesItemBG[0-2]) are the ID's of the textdraws not working. They show, then disappear right after.
The other 2 normal textdraws (ClothesTitle[0-1]) are working and show up fine when using the test/debug command.
EDIT: https://sampwiki.blast.hk/wiki/PlayerTex...etPreviewModel
pawn Код:
#include <a_samp>
#include <zcmd>
#include <sscanf2>
new Text:ClothesItemBG[3]; //Box textdraws to preview the object models.
new Text:ClothesTitle[2]; //Title BG + Text
public OnFilterScriptInit()
{
ClothesItemBG[0] = TextDrawCreate(186.345520, 195.750000, "usebox");
TextDrawFont(ClothesItemBG[0], TEXT_DRAW_FONT_MODEL_PREVIEW);
TextDrawLetterSize(ClothesItemBG[0], 0.000000, 0.000000);
TextDrawTextSize(ClothesItemBG[0], 186.345520, 0.000000);
TextDrawAlignment(ClothesItemBG[0], 1);
TextDrawColor(ClothesItemBG[0], 0);
TextDrawUseBox(ClothesItemBG[0], true);
TextDrawBoxColor(ClothesItemBG[0], 102);
TextDrawSetShadow(ClothesItemBG[0], 0);
TextDrawSetOutline(ClothesItemBG[0], 0);
ClothesItemBG[1] = TextDrawCreate(359.013031, 168.916671, "usebox");
TextDrawFont(ClothesItemBG[1], TEXT_DRAW_FONT_MODEL_PREVIEW);
TextDrawLetterSize(ClothesItemBG[1], 0.000000, 9.052591);
TextDrawTextSize(ClothesItemBG[1], 279.112609, 0.000000);
TextDrawAlignment(ClothesItemBG[1], 1);
TextDrawColor(ClothesItemBG[1], 0);
TextDrawUseBox(ClothesItemBG[1], true);
TextDrawBoxColor(ClothesItemBG[1], 102);
ClothesItemBG[2] = TextDrawCreate(437.724914, 168.916671, "usebox");
TextDrawFont(ClothesItemBG[2], TEXT_DRAW_FONT_MODEL_PREVIEW);
TextDrawLetterSize(ClothesItemBG[2], 0.000000, 9.063519);
TextDrawTextSize(ClothesItemBG[2], 355.950134, 0.000000);
TextDrawAlignment(ClothesItemBG[2], 1);
TextDrawColor(ClothesItemBG[2], 0);
TextDrawUseBox(ClothesItemBG[2], true);
TextDrawBoxColor(ClothesItemBG[2], 102);
ClothesTitle[0] = TextDrawCreate(437.256225, 153.166656, "_"); //Title backround
TextDrawUseBox(ClothesTitle[0], true);
TextDrawBoxColor(ClothesTitle[0], 102);
TextDrawTextSize(ClothesTitle[0], 201.338226, 0.000000);
ClothesTitle[1] = TextDrawCreate(208.960479, 150.500015, "Customize Player"); //Title text
TextDrawLetterSize(ClothesTitle[1], 0.156705, 1.419166);
TextDrawAlignment(ClothesTitle[1], 1);
TextDrawColor(ClothesTitle[1], 65535);
TextDrawSetShadow(ClothesTitle[1], 0);
TextDrawSetOutline(ClothesTitle[1], 0);
TextDrawBackgroundColor(ClothesTitle[1], 51);
TextDrawFont(ClothesTitle[1], 1);
TextDrawSetProportional(ClothesTitle[1], 1);
return 1;
}
public OnFilterScriptExit()
{
TextDrawDestroy(ClothesItemBG[0]);
TextDrawDestroy(ClothesItemBG[1]);
TextDrawDestroy(ClothesItemBG[2]);
TextDrawDestroy(ClothesTitle[0]);
TextDrawDestroy(ClothesTitle[1]);
return 1;
}
CMD:clothes3(playerid, params[]) //temporary testing/debug command useful for showing/hiding textdraws
{
new cid;
if(sscanf(params, "d", cid)) return 1;
else if(cid == -1) //Hide textdraw whenever u want
{
TextDrawHideForPlayer(playerid, ClothesItemBG[0]);
TextDrawHideForPlayer(playerid, ClothesItemBG[1]);
TextDrawHideForPlayer(playerid, ClothesItemBG[2]);
TextDrawHideForPlayer(playerid, ClothesTitle[0]);
TextDrawHideForPlayer(playerid, ClothesTitle[1]);
}
//Type /clothes3 (number) to show textdraw.. this command is just for testing/debug
TextDrawSetPreviewModel(ClothesItemBG[0], 18891);
TextDrawSetPreviewModel(ClothesItemBG[1], 18891);
TextDrawSetPreviewModel(ClothesItemBG[2], 18891);
TextDrawShowForPlayer(playerid, ClothesItemBG[0]);
TextDrawShowForPlayer(playerid, ClothesItemBG[1]);
TextDrawShowForPlayer(playerid, ClothesItemBG[2]);
TextDrawShowForPlayer(playerid, ClothesTitle[0]);
TextDrawShowForPlayer(playerid, ClothesTitle[1]);
return 1;
}