14.04.2016, 18:58
I can't find the issue here. Is it me failing or me failing?
Help Dora find the issue plz.
NOTE: TD's worked fine BEFORE I made them via this CreateTD thing, so it's not TD's being bad.
LoadTDs() are used in OnGameModeInit public.
When I use /inv CMD it only does first TD.
Help will be much appreciated.
I personally feel that I made some dumb mistake in CreateTD, but I was unable to detect the problem.
Help Dora find the issue plz.
NOTE: TD's worked fine BEFORE I made them via this CreateTD thing, so it's not TD's being bad.
LoadTDs() are used in OnGameModeInit public.
When I use /inv CMD it only does first TD.
Help will be much appreciated.
Код:
CMD:inv(playerid) // CMD for opening your inventory - TextDraws { for (new i = 0; i < 21; i++) { TextDrawShowForPlayer(playerid, InvTD[i]); } SelectTextDraw(playerid, 0x009600FF); PInv[playerid] = 1; return 1; } public LoadTDs() { //Main inventory window. // TD x y txt LetX LetY TxtX TxtY Algn Col OuL BGC F P S IsSel PM PRX PRY PRZ PZ UseBox BoxColor CreateTD(InvTD[0], 400.0, 260.0, "LD_SPAC:white", 0.0, 0.0, 183.0, 128.0, 1, 842150655, 0, 255, 4, 0, 0, false, 0, 0, 0, 0, 0, 0, 0); CreateTD(InvTD[1], 402.5, 262.087493, "intro1:intro1", 0.0, 0.0, 178.0, 124.0, 1, 0, 0, 255, 4, 0, 0, false, 0, 0, 0, 0, 0, 0, 0); CreateTD(InvTD[2], 463.0, 261.0, "LD_SPAC:white", 0.0, 0.0, 3.0, 126.0, 1, 842150655, 0, 255, 4, 0, 0, false, 0, 0, 0, 0, 0, 0, 0); CreateTD(InvTD[3], 404.0, 369.0, "ld_chat:thumbup", 0.0, 0.0, 19.0, 16.0, 1, -1, 0, 255, 4, 0, 0, false, 0, 0, 0, 0, 0, 0, 0); CreateTD(InvTD[4], 443.0, 369.0, "ld_chat:thumbdn", 0.0, 0.0, 19.0, 16.0, 1, -1, 0, 255, 4, 0, 0, false, 0, 0, 0, 0, 0, 0, 0); CreateTD(InvTD[5], 432.0, 262.625, "Inventory", 0.4, 1.6, 0.0, 58.0, 2, -1, -1, 255, 1, 1, 0, false, 0, 0, 0, 0, 0, 0, 0); CreateTD(InvTD[6], 404.0, 280.0, "ld_otb2:butnc", 0.0, 0.0, 57.0, 25.0, 1, -1, 0, 255, 4, 0, 0, true, 0, 0, 0, 0, 0, 0, 0);//Consumables btn CreateTD(InvTD[7], 404.0, 313.0, "ld_otb2:butnc", 0.0, 0.0, 57.0, 25.0, 1, -1, 0, 255, 4, 0, 0, true, 0, 0, 0, 0, 0, 0, 0);//Belongings btn CreateTD(InvTD[8], 404.0, 346.0, "ld_otb2:butnc", 0.0, 0.0, 57.0, 25.0, 1, -1, 0, 255, 4, 0, 0, true, 0, 0, 0, 0, 0, 0, 0);//Misc. btn CreateTD(InvTD[9], 413.0, 283.0, "Consumables", 0.209490, 0.768746, 0, 0, 1, -1, -1, 255, 1, 1, 0, false, 0, 0, 0, 0, 0, 0, 0); CreateTD(InvTD[10], 416.0, 316.0, "Belongings", 0.209490, 0.768746, 0, 0, 1, -1, -1, 255, 1, 1, 0, false, 0, 0, 0, 0, 0, 0, 0); CreateTD(InvTD[11], 412.0, 349.0, "Miscellaneous", 0.209490, 0.768746, 0, 0, 1, -1, -1, 255, 1, 1, 0, false, 0, 0, 0, 0, 0, 0, 0); CreateTD(InvTD[12], 467.0, 348.0, "ld_otb2:butnc", 0.0, 0.0, 54.0, 27.0, 1, -1, 0, 255, 4, 0, 0, true, 0, 0, 0, 0, 0, 0, 0);//USE btn CreateTD(InvTD[13], 525.0, 348.0, "ld_otb2:butnc", 0.0, 0.0, 54.0, 27.0, 1, -1, 0, 255, 4, 0, 0, true, 0, 0, 0, 0, 0, 0, 0);//GIVE btn CreateTD(InvTD[14], 467.0, 367.0, "ld_otb2:butnc", 0.0, 0.0, 54.0, 27.0, 1, -1, 0, 255, 4, 0, 0, true, 0, 0, 0, 0, 0, 0, 0);//THROW btn CreateTD(InvTD[15], 525.0, 367.0, "ld_otb2:butnc", 0.0, 0.0, 54.0, 27.0, 1, -1, 0, 255, 4, 0, 0, true, 0, 0, 0, 0, 0, 0, 0);//INFO btn CreateTD(InvTD[16], 485.0, 350.0, "Use", 0.319498, 1.079375, 0, 0, 1, -1, -1, 255, 1, 1, 0, false, 0, 0, 0, 0, 0, 0, 0); CreateTD(InvTD[17], 484.0, 370.0, "Give", 0.319498, 1.079375, 0, 0, 1, -1, -1, 255, 1, 1, 0, false, 0, 0, 0, 0, 0, 0, 0); CreateTD(InvTD[18], 537.0, 350.0, "Throw", 0.319498, 1.079375, 0, 0, 1, -1, -1, 255, 1, 1, 0, false, 0, 0, 0, 0, 0, 0, 0); CreateTD(InvTD[19], 543.0, 369.0, "Info", 0.319498, 1.079375, 0, 0, 1, -1, -1, 255, 1, 1, 0, false, 0, 0, 0, 0, 0, 0, 0); CreateTD(InvTD[20], 563.0, 331.0, "ld_beat:right", 0.0, 0.0, 16.0, 15.0, 1, -1, 0, 255, 4, 0, 0, true, 0, 0, 0, 0, 0, 0, 0); CreateTD(InvTD[21], 469.0, 331.0, "ld_beat:left", 0.0, 0.0, 16.0, 15.0, 1, -1, 0, 255, 4, 0, 0, true, 0, 0, 0, 0, 0, 0, 0); //Inventory section 1 page 1. // TD x y txt LetX LetY TxtX TxtY Algn Col OuL BGC F P S IsSel PM PRX PRY PRZ PZ UseBox BoxColor CreateTD(InvTD1_1[0],478.0, 262.0, "", 0.0, 0.0, 37.0, 29.0, 1, -1, 0, 0, 5, 0, 0, true, 1578, -35.0, 0.0, 35.0, 1.0, 0, 0); CreateTD(InvTD1_1[1],530.0, 262.0, "", 0.0, 0.0, 37.0, 29.0, 1, -1, 0, 0, 5, 0, 0, true, 1575, -35.0, 0.0, 35.0, 1.0, 0, 0); CreateTD(InvTD1_1[2],474.0, 295.0, "", 0.0, 0.0, 43.0, 29.0, 1, -1, 0, 0, 5, 0, 0, true, 1241, 0.0, 45.0, 90.0, 1.0, 0, 0); CreateTD(InvTD1_1[3],525.0, 296.0, "", 0.0, 0.0, 43.0, 29.0, 1, -15461121, 0, 0, 5, 0, 0, true, 1241, 0.0, 45.0, 90.0, 1.0, 0, 0); return print("TextDraws are loaded!"); } public CreateTD(Text:TD, Float:x,Float:y,txt[],Float:LetX,Float:LetY,Float:TxtX, Float:TxtY, Algn, Col, Outline, BGCol, Font, Proport, Shadow, bool:IsSelectable, PrevMod, Float:PrevRX, Float:PrevRY, Float:PrevRZ, Float: PrevZoom, UseBox, BoxColor) { TD = TextDrawCreate(x,y,txt); TextDrawLetterSize(TD, LetX, LetY); TextDrawTextSize(TD, TxtX, TxtY); TextDrawAlignment(TD, Algn); TextDrawColor(TD, Col); TextDrawSetOutline(TD, Outline); TextDrawBackgroundColor(TD, BGCol); TextDrawFont(TD, Font); TextDrawSetProportional(TD, Proport); TextDrawSetShadow(TD, Shadow); TextDrawSetSelectable(TD, IsSelectable); TextDrawSetPreviewModel(TD, PrevMod); TextDrawSetPreviewRot(TD, PrevRX, PrevRY, PrevRZ, PrevZoom); TextDrawUseBox(TD, UseBox); TextDrawBoxColor(TD, BoxColor); return 1; }