CharacterInventorySlots[playerid][0] = TextDrawCreate(195.999877, 127.763008, "_");
TextDrawLetterSize(CharacterInventorySlots[playerid][0], 0.000000, 4.212957);
TextDrawTextSize(CharacterInventorySlots[playerid][0], 157.666580, 0.000000);
TextDrawUseBox(CharacterInventorySlots[playerid][0], true);
TextDrawFont(CharacterInventorySlots[playerid][0], TEXT_DRAW_FONT_MODEL_PREVIEW);
//TextDrawSetPreviewModel(CharacterInventorySlots[playerid][0], 411);
TextDrawBackgroundColor(CharacterInventorySlots[playerid][0], 0xDDA0DDFF);
CharacterInventorySlots[playerid][0] = TextDrawCreate(195.999877, 127.763008, "_");
TextDrawLetterSize(CharacterInventorySlots[playerid][0], 0.000000, 4.212957);
TextDrawTextSize(CharacterInventorySlots[playerid][0], 157.666580, 0.000000);
TextDrawUseBox(CharacterInventorySlots[playerid][0], true);
TextDrawFont(CharacterInventorySlots[playerid][0], TEXT_DRAW_FONT_MODEL_PREVIEW);
//TextDrawSetPreviewModel(CharacterInventorySlots[playerid][0], 411);
TextDrawBackgroundColor(CharacterInventorySlots[playerid][0], 0xDDA0DDFF);
CharacterInventorySlots[playerid][1] = TextDrawCreate(232.333419, 127.603828, "_");
TextDrawLetterSize(CharacterInventorySlots[playerid][1], 0.000000, 4.230658);
TextDrawTextSize(CharacterInventorySlots[playerid][1], 194.333389, 0.000000);
TextDrawUseBox(CharacterInventorySlots[playerid][1], true);
TextDrawFont(CharacterInventorySlots[playerid][1], TEXT_DRAW_FONT_MODEL_PREVIEW);
TextDrawSetPreviewModel(CharacterInventorySlots[playerid][1], 411);
TextDrawBackgroundColor(CharacterInventorySlots[playerid][1], 0xDDA0DDFF);
CharacterInventorySlots[playerid][2] = TextDrawCreate(268.666503, 127.762977, "_");
TextDrawLetterSize(CharacterInventorySlots[playerid][2], 0.000000, 4.224485);
TextDrawTextSize(CharacterInventorySlots[playerid][2], 230.666854, 0.000000);
TextDrawUseBox(CharacterInventorySlots[playerid][2], true);
TextDrawFont(CharacterInventorySlots[playerid][2], TEXT_DRAW_FONT_MODEL_PREVIEW);
TextDrawSetPreviewModel(CharacterInventorySlots[playerid][2], 411);
TextDrawBackgroundColor(CharacterInventorySlots[playerid][2], 0xDDA0DDFF);
CharacterInventorySlots[playerid][3] = TextDrawCreate(305.666839, 127.603645, "_");
TextDrawLetterSize(CharacterInventorySlots[playerid][3], 0.000000, 4.236420);
TextDrawTextSize(CharacterInventorySlots[playerid][3], 267.333526, 0.000000);
TextDrawUseBox(CharacterInventorySlots[playerid][3], true);
TextDrawFont(CharacterInventorySlots[playerid][3], TEXT_DRAW_FONT_MODEL_PREVIEW);
TextDrawSetPreviewModel(CharacterInventorySlots[playerid][3], 411);
TextDrawBackgroundColor(CharacterInventorySlots[playerid][3], 0xDDA0DDFF);
CharacterInventorySlots[playerid][4] = TextDrawCreate(342.333435, 127.762962, "_");
TextDrawLetterSize(CharacterInventorySlots[playerid][4], 0.000000, 4.196914);
TextDrawTextSize(CharacterInventorySlots[playerid][4], 304.136505, 0.000000);
TextDrawUseBox(CharacterInventorySlots[playerid][4], true);
TextDrawFont(CharacterInventorySlots[playerid][4], TEXT_DRAW_FONT_MODEL_PREVIEW);
TextDrawSetPreviewModel(CharacterInventorySlots[playerid][4], 411);
TextDrawBackgroundColor(CharacterInventorySlots[playerid][4], 0xDDA0DDFF);
CharacterInventorySlots[playerid][5] = TextDrawCreate(378.666534, 127.603614, "_");
TextDrawLetterSize(CharacterInventorySlots[playerid][5], 0.000000, 4.242177);
TextDrawTextSize(CharacterInventorySlots[playerid][5], 340.999908, 0.000000);
TextDrawUseBox(CharacterInventorySlots[playerid][5], true);
TextDrawFont(CharacterInventorySlots[playerid][5], TEXT_DRAW_FONT_MODEL_PREVIEW);
TextDrawSetPreviewModel(CharacterInventorySlots[playerid][5], 411);
TextDrawBackgroundColor(CharacterInventorySlots[playerid][5], 0xDDA0DDFF);
CharacterInventorySlots[playerid][6] = TextDrawCreate(195.666732, 170.329635, "_");
TextDrawLetterSize(CharacterInventorySlots[playerid][6], 0.000000, 4.325304);
TextDrawTextSize(CharacterInventorySlots[playerid][6], 157.666717, 0.000000);
TextDrawUseBox(CharacterInventorySlots[playerid][6], true);
TextDrawFont(CharacterInventorySlots[playerid][6], TEXT_DRAW_FONT_MODEL_PREVIEW);
TextDrawSetPreviewModel(CharacterInventorySlots[playerid][6], 411);
TextDrawBackgroundColor(CharacterInventorySlots[playerid][6], 0xDDA0DDFF);
CharacterInventorySlots[playerid][7] = TextDrawCreate(232.333465, 170.488815, "s8_");
TextDrawLetterSize(CharacterInventorySlots[playerid][7], 0.000000, 4.329837);
TextDrawTextSize(CharacterInventorySlots[playerid][7], 194.333328, 0.000000);
TextDrawUseBox(CharacterInventorySlots[playerid][7], true);
TextDrawFont(CharacterInventorySlots[playerid][7], TEXT_DRAW_FONT_MODEL_PREVIEW);
TextDrawSetPreviewModel(CharacterInventorySlots[playerid][7], 411);
TextDrawBackgroundColor(CharacterInventorySlots[playerid][7], 0xDDA0DDFF);
CharacterInventorySlots[playerid][8] = TextDrawCreate(268.666778, 170.329650, "s9_");
TextDrawLetterSize(CharacterInventorySlots[playerid][8], 0.000000, 4.320778);
TextDrawTextSize(CharacterInventorySlots[playerid][8], 230.666656, 0.000000);
TextDrawUseBox(CharacterInventorySlots[playerid][8], true);
TextDrawFont(CharacterInventorySlots[playerid][8], TEXT_DRAW_FONT_MODEL_PREVIEW);
TextDrawSetPreviewModel(CharacterInventorySlots[playerid][8], 411);
TextDrawBackgroundColor(CharacterInventorySlots[playerid][8], 0xDDA0DDFF);
CharacterInventorySlots[playerid][9] = TextDrawCreate(305.333557, 170.329666, "_");
TextDrawLetterSize(CharacterInventorySlots[playerid][9], 0.000000, 4.327365);
TextDrawTextSize(CharacterInventorySlots[playerid][9], 267.333404, 0.000000);
TextDrawUseBox(CharacterInventorySlots[playerid][9], true);
TextDrawFont(CharacterInventorySlots[playerid][9], TEXT_DRAW_FONT_MODEL_PREVIEW);
TextDrawSetPreviewModel(CharacterInventorySlots[playerid][9], 411);
TextDrawBackgroundColor(CharacterInventorySlots[playerid][9], 0xDDA0DDFF);
CharacterInventorySlots[playerid][10] = TextDrawCreate(342.333221, 170.488845, "_");
TextDrawLetterSize(CharacterInventorySlots[playerid][10], 0.000000, 4.308435);
TextDrawTextSize(CharacterInventorySlots[playerid][10], 304.333221, 0.000000);
TextDrawUseBox(CharacterInventorySlots[playerid][10], true);
TextDrawFont(CharacterInventorySlots[playerid][10], TEXT_DRAW_FONT_MODEL_PREVIEW);
TextDrawSetPreviewModel(CharacterInventorySlots[playerid][10], 411);
TextDrawBackgroundColor(CharacterInventorySlots[playerid][10], 0xDDA0DDFF);
CharacterInventorySlots[playerid][11] = TextDrawCreate(379.000122, 170.329528, "_");
TextDrawLetterSize(CharacterInventorySlots[playerid][11], 0.000000, 4.321605);
TextDrawTextSize(CharacterInventorySlots[playerid][11], 341.000030, 0.000000);
TextDrawUseBox(CharacterInventorySlots[playerid][11], true);
TextDrawFont(CharacterInventorySlots[playerid][11], TEXT_DRAW_FONT_MODEL_PREVIEW);
TextDrawSetPreviewModel(CharacterInventorySlots[playerid][11], 411);
TextDrawBackgroundColor(CharacterInventorySlots[playerid][11], 0xDDA0DDFF);
CharacterInventorySlots[playerid][12] = TextDrawCreate(195.666687, 214.044403, "_");
TextDrawLetterSize(CharacterInventorySlots[playerid][12], 0.000000, 4.212963);
TextDrawTextSize(CharacterInventorySlots[playerid][12], 157.666488, 0.000000);
TextDrawUseBox(CharacterInventorySlots[playerid][12], true);
TextDrawFont(CharacterInventorySlots[playerid][12], TEXT_DRAW_FONT_MODEL_PREVIEW);
TextDrawSetPreviewModel(CharacterInventorySlots[playerid][12], 411);
TextDrawBackgroundColor(CharacterInventorySlots[playerid][12], 0xDDA0DDFF);
CharacterInventorySlots[playerid][13] = TextDrawCreate(232.333297, 213.885192, "_");
TextDrawLetterSize(CharacterInventorySlots[playerid][13], 0.000000, 4.239297);
TextDrawTextSize(CharacterInventorySlots[playerid][13], 194.333251, 0.000000);
TextDrawUseBox(CharacterInventorySlots[playerid][13], true);
TextDrawFont(CharacterInventorySlots[playerid][13], TEXT_DRAW_FONT_MODEL_PREVIEW);
TextDrawSetPreviewModel(CharacterInventorySlots[playerid][13], 411);
TextDrawBackgroundColor(CharacterInventorySlots[playerid][13], 0xDDA0DDFF);
CharacterInventorySlots[playerid][14] = TextDrawCreate(268.666687, 213.885192, "_");
TextDrawLetterSize(CharacterInventorySlots[playerid][14], 0.000000, 4.225718);
TextDrawTextSize(CharacterInventorySlots[playerid][14], 230.666717, 0.000000);
TextDrawUseBox(CharacterInventorySlots[playerid][14], true);
TextDrawFont(CharacterInventorySlots[playerid][14], TEXT_DRAW_FONT_MODEL_PREVIEW);
TextDrawSetPreviewModel(CharacterInventorySlots[playerid][14], 411);
TextDrawBackgroundColor(CharacterInventorySlots[playerid][14], 0xDDA0DDFF);
CharacterInventorySlots[playerid][15] = TextDrawCreate(305.333312, 213.885147, "_");
TextDrawLetterSize(CharacterInventorySlots[playerid][15], 0.000000, 4.214200);
TextDrawTextSize(CharacterInventorySlots[playerid][15], 267.333312, 0.000000);
TextDrawUseBox(CharacterInventorySlots[playerid][15], true);
TextDrawFont(CharacterInventorySlots[playerid][15], TEXT_DRAW_FONT_MODEL_PREVIEW);
TextDrawSetPreviewModel(CharacterInventorySlots[playerid][15], 411);
TextDrawBackgroundColor(CharacterInventorySlots[playerid][15], 0xDDA0DDFF);
CharacterInventorySlots[playerid][16] = TextDrawCreate(342.333557, 213.885223, "_");
TextDrawLetterSize(CharacterInventorySlots[playerid][16], 0.000000, 4.178804);
TextDrawTextSize(CharacterInventorySlots[playerid][16], 304.333374, 0.000000);
TextDrawUseBox(CharacterInventorySlots[playerid][16], true);
TextDrawFont(CharacterInventorySlots[playerid][16], TEXT_DRAW_FONT_MODEL_PREVIEW);
TextDrawSetPreviewModel(CharacterInventorySlots[playerid][16], 411);
TextDrawBackgroundColor(CharacterInventorySlots[playerid][16], 0xDDA0DDFF);
CharacterInventorySlots[playerid][17] = TextDrawCreate(378.999969, 213.885101, "_");
TextDrawLetterSize(CharacterInventorySlots[playerid][17], 0.000000, 4.219956);
TextDrawTextSize(CharacterInventorySlots[playerid][17], 341.000000, 0.000000);
TextDrawUseBox(CharacterInventorySlots[playerid][17], true);
TextDrawFont(CharacterInventorySlots[playerid][17], TEXT_DRAW_FONT_MODEL_PREVIEW);
TextDrawSetPreviewModel(CharacterInventorySlots[playerid][17], 411);
TextDrawBackgroundColor(CharacterInventorySlots[playerid][17], 0xDDA0DDFF);
stock CharacterInventoryScreen(playerid, bool:show = true)
{
if(show)
{
// This section shows main part of the inventory textdraws (Visa Versa for Hiding)
for(new maintd = 0; maintd < 10; maintd ++)
{
TextDrawShowForPlayer(playerid, CharacterInventory[playerid][maintd]);
}
// This section shows the Inventory slots (Visa Versa for Hiding)
for(new slots = 0; slots < MAX_INVENTORY_SLOTS; slots ++)
{
TextDrawShowForPlayer(playerid, CharacterInventorySlots[playerid][slots]);
}
} else {
for(new maintd = 0; maintd < 10; maintd ++)
{
TextDrawHideForPlayer(playerid, CharacterInventory[playerid][maintd]);
}
for(new slots = 0; slots < MAX_INVENTORY_SLOTS; slots ++)
{
TextDrawHideForPlayer(playerid, CharacterInventorySlots[playerid][slots]);
}
}
}
Loops can cause the issue but you already wrote it in a way which avoids the loop causing the issue.
Can you look if you recreate/destroy the textdraws somewhere in your code? Also (since you didn't answer me before); is this being written in a filterscript? |