Mód elején.:new Text:CarBuyTD[MAX_PLAYERS][6];stock TextdrawokBetoltese(playerid){CarBuyTD[playerid][0] = TextDrawCreate(290.000000, 399.000000, \"_\");TextDrawBackgroundColor(CarBuyTD[playerid][0], 255);TextDrawFont(CarBuyTD[playerid][0], 1);TextDrawLetterSize(CarBuyTD[playerid][0], 0.500000, 2.000000);TextDrawColor(CarBuyTD[playerid][0], -1);TextDrawSetOutline(CarBuyTD[playerid][0], 0);TextDrawSetProportional(CarBuyTD[playerid][0], 1);TextDrawSetShadow(CarBuyTD[playerid][0], 1);TextDrawUseBox(CarBuyTD[playerid][0], 1);TextDrawBoxColor(CarBuyTD[playerid][0], -16777063);TextDrawTextSize(CarBuyTD[playerid][0], 380.000000, 30.000000);TextDrawSetSelectable(CarBuyTD[playerid][0], 0);CarBuyTD[playerid][1] = TextDrawCreate(290.000000, 349.000000, \"_\");TextDrawBackgroundColor(CarBuyTD[playerid][1], 255);TextDrawFont(CarBuyTD[playerid][1], 1);TextDrawLetterSize(CarBuyTD[playerid][1], 0.500000, 2.000000);TextDrawColor(CarBuyTD[playerid][1], -1);TextDrawSetOutline(CarBuyTD[playerid][1], 0);TextDrawSetProportional(CarBuyTD[playerid][1], 1);TextDrawSetShadow(CarBuyTD[playerid][1], 1);TextDrawUseBox(CarBuyTD[playerid][1], 1);TextDrawBoxColor(CarBuyTD[playerid][1], 16712857);TextDrawTextSize(CarBuyTD[playerid][1], 380.000000, 30.000000);TextDrawSetSelectable(CarBuyTD[playerid][1], 0);CarBuyTD[playerid][2] = TextDrawCreate(288.000000, 347.000000, \"Vásárlás\");TextDrawTextSize(CarBuyTD[playerid][2], 30, 30);TextDrawBackgroundColor(CarBuyTD[playerid][2], 255);TextDrawFont(CarBuyTD[playerid][2], 1);TextDrawLetterSize(CarBuyTD[playerid][2], 0.659999, 2.399999);TextDrawColor(CarBuyTD[playerid][2], -1);TextDrawSetOutline(CarBuyTD[playerid][2], 0);TextDrawSetProportional(CarBuyTD[playerid][2], 1);TextDrawSetShadow(CarBuyTD[playerid][2], 2);TextDrawSetSelectable(CarBuyTD[playerid][2], true);CarBuyTD[playerid][3] = TextDrawCreate(298.000000, 395.000000, \"Kilépés\");TextDrawTextSize(CarBuyTD[playerid][3], 30, 30);TextDrawBackgroundColor(CarBuyTD[playerid][3], 255);TextDrawFont(CarBuyTD[playerid][3], 1);TextDrawLetterSize(CarBuyTD[playerid][3], 0.659999, 2.399999);TextDrawColor(CarBuyTD[playerid][3], -1);TextDrawSetOutline(CarBuyTD[playerid][3], 0);TextDrawSetProportional(CarBuyTD[playerid][3], 1);TextDrawSetShadow(CarBuyTD[playerid][3], 2);TextDrawSetSelectable(CarBuyTD[playerid][3], true);CarBuyTD[playerid][4] = TextDrawCreate(180.000000, 337.000000, \"~<~\");TextDrawTextSize(CarBuyTD[playerid][4], 30, 30);TextDrawBackgroundColor(CarBuyTD[playerid][4], 255);TextDrawFont(CarBuyTD[playerid][4], 1);TextDrawLetterSize(CarBuyTD[playerid][4], 1.100000, 4.000000);TextDrawColor(CarBuyTD[playerid][4], -1);TextDrawSetOutline(CarBuyTD[playerid][4], 0);TextDrawSetProportional(CarBuyTD[playerid][4], 1);TextDrawSetShadow(CarBuyTD[playerid][4], 1);TextDrawTextSize(CarBuyTD[playerid][4], 10.0, 10.0);TextDrawSetSelectable(CarBuyTD[playerid][4], true);CarBuyTD[playerid][5] = TextDrawCreate(448.000000, 337.000000, \"~>~\");TextDrawTextSize(CarBuyTD[playerid][5], 30, 30);TextDrawBackgroundColor(CarBuyTD[playerid][5], 255);TextDrawFont(CarBuyTD[playerid][5], 1);TextDrawLetterSize(CarBuyTD[playerid][5], 1.100000, 4.000000);TextDrawColor(CarBuyTD[playerid][5], -1);TextDrawSetOutline(CarBuyTD[playerid][5], 0);TextDrawSetProportional(CarBuyTD[playerid][5], 1);TextDrawSetShadow(CarBuyTD[playerid][5], 1);TextDrawSetSelectable(CarBuyTD[playerid][5], true);}public OnPlayerConnect(playerid) { TextdrawokBetoltese(playerid); return 1; } ** Parancs hatására.:for(new i = 0; i < 6; i++){TextDrawShowForPlayer(playerid, CarBuyTD[playerid]);}SelectTextDraw(playerid, 0xAAAAAA50); [ /code]A textdrawot megjeleníti hibátlanul, viszont nem lehet rá kattintani.OnPlayerClickTextdraw függvényem.:[code=pawn]public OnPlayerClickTextDraw(playerid, Text:clickedid){PlayerPlaySound(playerid,1054,0.0,0.0,0.0); if(clickedid == CarBuyTD[playerid][2]) // Vásárlás{Msg(playerid, COLOR_LRED, \"LEFUTOTT\",1);return 1;}if(clickedid == CarBuyTD[playerid][3]) // Kilépés{Msg(playerid, COLOR_LRED, \"LEFUTOTT\",1);return 1;}if(clickedid == CarBuyTD[playerid][4]) // Balra{Msg(playerid, COLOR_LRED, \"LEFUTOTT\",1);return 1;}if(clickedid == CarBuyTD[playerid][5]) // Jobbra{Msg(playerid, COLOR_LRED, \"LEFUTOTT\",1);return 1;}return 1;}[ /code]
Bele írtam a pawn kódokat a leírásba. Mit helyezzek ki? :unsure:
[code=pawn] [ /code]
Sziasztok.Lenne egy kis problémám, az elmúlt időben ezen töröm a fejem, hogy miért nem lehet rákattintani a textdrawra, minden lehetséges hiba forrást ellenőriztem, és már tehetetlen vagyok az ügyben, így hozzátok fordulok, hát ha valaki észre veszi a hibát. :wavecry: Mód elején.:new Text:CarBuyTD[MAX_PLAYERS][6];stock TextdrawokBetoltese(playerid){CarBuyTD[playerid][0] = TextDrawCreate(290.000000, 399.000000, \"_\");TextDrawBackgroundColor(CarBuyTD[playerid][0], 255);TextDrawFont(CarBuyTD[playerid][0], 1);TextDrawLetterSize(CarBuyTD[playerid][0], 0.500000, 2.000000);TextDrawColor(CarBuyTD[playerid][0], -1);TextDrawSetOutline(CarBuyTD[playerid][0], 0);TextDrawSetProportional(CarBuyTD[playerid][0], 1);TextDrawSetShadow(CarBuyTD[playerid][0], 1);TextDrawUseBox(CarBuyTD[playerid][0], 1);TextDrawBoxColor(CarBuyTD[playerid][0], -16777063);TextDrawTextSize(CarBuyTD[playerid][0], 380.000000, 30.000000);TextDrawSetSelectable(CarBuyTD[playerid][0], 0);CarBuyTD[playerid][1] = TextDrawCreate(290.000000, 349.000000, \"_\");TextDrawBackgroundColor(CarBuyTD[playerid][1], 255);TextDrawFont(CarBuyTD[playerid][1], 1);TextDrawLetterSize(CarBuyTD[playerid][1], 0.500000, 2.000000);TextDrawColor(CarBuyTD[playerid][1], -1);TextDrawSetOutline(CarBuyTD[playerid][1], 0);TextDrawSetProportional(CarBuyTD[playerid][1], 1);TextDrawSetShadow(CarBuyTD[playerid][1], 1);TextDrawUseBox(CarBuyTD[playerid][1], 1);TextDrawBoxColor(CarBuyTD[playerid][1], 16712857);TextDrawTextSize(CarBuyTD[playerid][1], 380.000000, 30.000000);TextDrawSetSelectable(CarBuyTD[playerid][1], 0);CarBuyTD[playerid][2] = TextDrawCreate(288.000000, 347.000000, \"Vásárlás\");TextDrawTextSize(CarBuyTD[playerid][2], 30, 30);TextDrawBackgroundColor(CarBuyTD[playerid][2], 255);TextDrawFont(CarBuyTD[playerid][2], 1);TextDrawLetterSize(CarBuyTD[playerid][2], 0.659999, 2.399999);TextDrawColor(CarBuyTD[playerid][2], -1);TextDrawSetOutline(CarBuyTD[playerid][2], 0);TextDrawSetProportional(CarBuyTD[playerid][2], 1);TextDrawSetShadow(CarBuyTD[playerid][2], 2);TextDrawSetSelectable(CarBuyTD[playerid][2], true);CarBuyTD[playerid][3] = TextDrawCreate(298.000000, 395.000000, \"Kilépés\");TextDrawTextSize(CarBuyTD[playerid][3], 30, 30);TextDrawBackgroundColor(CarBuyTD[playerid][3], 255);TextDrawFont(CarBuyTD[playerid][3], 1);TextDrawLetterSize(CarBuyTD[playerid][3], 0.659999, 2.399999);TextDrawColor(CarBuyTD[playerid][3], -1);TextDrawSetOutline(CarBuyTD[playerid][3], 0);TextDrawSetProportional(CarBuyTD[playerid][3], 1);TextDrawSetShadow(CarBuyTD[playerid][3], 2);TextDrawSetSelectable(CarBuyTD[playerid][3], true);CarBuyTD[playerid][4] = TextDrawCreate(180.000000, 337.000000, \"~<~\");TextDrawTextSize(CarBuyTD[playerid][4], 30, 30);TextDrawBackgroundColor(CarBuyTD[playerid][4], 255);TextDrawFont(CarBuyTD[playerid][4], 1);TextDrawLetterSize(CarBuyTD[playerid][4], 1.100000, 4.000000);TextDrawColor(CarBuyTD[playerid][4], -1);TextDrawSetOutline(CarBuyTD[playerid][4], 0);TextDrawSetProportional(CarBuyTD[playerid][4], 1);TextDrawSetShadow(CarBuyTD[playerid][4], 1);TextDrawTextSize(CarBuyTD[playerid][4], 10.0, 10.0);TextDrawSetSelectable(CarBuyTD[playerid][4], true);CarBuyTD[playerid][5] = TextDrawCreate(448.000000, 337.000000, \"~>~\");TextDrawTextSize(CarBuyTD[playerid][5], 30, 30);TextDrawBackgroundColor(CarBuyTD[playerid][5], 255);TextDrawFont(CarBuyTD[playerid][5], 1);TextDrawLetterSize(CarBuyTD[playerid][5], 1.100000, 4.000000);TextDrawColor(CarBuyTD[playerid][5], -1);TextDrawSetOutline(CarBuyTD[playerid][5], 0);TextDrawSetProportional(CarBuyTD[playerid][5], 1);TextDrawSetShadow(CarBuyTD[playerid][5], 1);TextDrawSetSelectable(CarBuyTD[playerid][5], true);}public OnPlayerConnect(playerid) { TextdrawokBetoltese(playerid); return 1; } ** Parancs hatására.:for(new i = 0; i < 6; i++){TextDrawShowForPlayer(playerid, CarBuyTD[playerid]);}SelectTextDraw(playerid, 0xAAAAAA50); A textdrawot megjeleníti hibátlanul, viszont nem lehet rá kattintani.OnPlayerClickTextdraw függvényem.:[code=pawn]public OnPlayerClickTextDraw(playerid, Text:clickedid){PlayerPlaySound(playerid,1054,0.0,0.0,0.0); if(clickedid == CarBuyTD[playerid][2]) // Vásárlás{Msg(playerid, COLOR_LRED, \"LEFUTOTT\",1);return 1;}if(clickedid == CarBuyTD[playerid][3]) // Kilépés{Msg(playerid, COLOR_LRED, \"LEFUTOTT\",1);return 1;}if(clickedid == CarBuyTD[playerid][4]) // Balra{Msg(playerid, COLOR_LRED, \"LEFUTOTT\",1);return 1;}if(clickedid == CarBuyTD[playerid][5]) // Jobbra{Msg(playerid, COLOR_LRED, \"LEFUTOTT\",1);return 1;}return 1;}[ /code]
Mód elején.:new Text:CarBuyTD[MAX_PLAYERS][6];stock TextdrawokBetoltese(playerid){CarBuyTD[playerid][0] = TextDrawCreate(290.000000, 399.000000, \"_\");TextDrawBackgroundColor(CarBuyTD[playerid][0], 255);TextDrawFont(CarBuyTD[playerid][0], 1);TextDrawLetterSize(CarBuyTD[playerid][0], 0.500000, 2.000000);TextDrawColor(CarBuyTD[playerid][0], -1);TextDrawSetOutline(CarBuyTD[playerid][0], 0);TextDrawSetProportional(CarBuyTD[playerid][0], 1);TextDrawSetShadow(CarBuyTD[playerid][0], 1);TextDrawUseBox(CarBuyTD[playerid][0], 1);TextDrawBoxColor(CarBuyTD[playerid][0], -16777063);TextDrawTextSize(CarBuyTD[playerid][0], 380.000000, 30.000000);TextDrawSetSelectable(CarBuyTD[playerid][0], 0);CarBuyTD[playerid][1] = TextDrawCreate(290.000000, 349.000000, \"_\");TextDrawBackgroundColor(CarBuyTD[playerid][1], 255);TextDrawFont(CarBuyTD[playerid][1], 1);TextDrawLetterSize(CarBuyTD[playerid][1], 0.500000, 2.000000);TextDrawColor(CarBuyTD[playerid][1], -1);TextDrawSetOutline(CarBuyTD[playerid][1], 0);TextDrawSetProportional(CarBuyTD[playerid][1], 1);TextDrawSetShadow(CarBuyTD[playerid][1], 1);TextDrawUseBox(CarBuyTD[playerid][1], 1);TextDrawBoxColor(CarBuyTD[playerid][1], 16712857);TextDrawTextSize(CarBuyTD[playerid][1], 380.000000, 30.000000);TextDrawSetSelectable(CarBuyTD[playerid][1], 0);CarBuyTD[playerid][2] = TextDrawCreate(288.000000, 347.000000, \"Vásárlás\");TextDrawTextSize(CarBuyTD[playerid][2], 30, 30);TextDrawBackgroundColor(CarBuyTD[playerid][2], 255);TextDrawFont(CarBuyTD[playerid][2], 1);TextDrawLetterSize(CarBuyTD[playerid][2], 0.659999, 2.399999);TextDrawColor(CarBuyTD[playerid][2], -1);TextDrawSetOutline(CarBuyTD[playerid][2], 0);TextDrawSetProportional(CarBuyTD[playerid][2], 1);TextDrawSetShadow(CarBuyTD[playerid][2], 2);TextDrawSetSelectable(CarBuyTD[playerid][2], true);CarBuyTD[playerid][3] = TextDrawCreate(298.000000, 395.000000, \"Kilépés\");TextDrawTextSize(CarBuyTD[playerid][3], 30, 30);TextDrawBackgroundColor(CarBuyTD[playerid][3], 255);TextDrawFont(CarBuyTD[playerid][3], 1);TextDrawLetterSize(CarBuyTD[playerid][3], 0.659999, 2.399999);TextDrawColor(CarBuyTD[playerid][3], -1);TextDrawSetOutline(CarBuyTD[playerid][3], 0);TextDrawSetProportional(CarBuyTD[playerid][3], 1);TextDrawSetShadow(CarBuyTD[playerid][3], 2);TextDrawSetSelectable(CarBuyTD[playerid][3], true);CarBuyTD[playerid][4] = TextDrawCreate(180.000000, 337.000000, \"~<~\");TextDrawTextSize(CarBuyTD[playerid][4], 30, 30);TextDrawBackgroundColor(CarBuyTD[playerid][4], 255);TextDrawFont(CarBuyTD[playerid][4], 1);TextDrawLetterSize(CarBuyTD[playerid][4], 1.100000, 4.000000);TextDrawColor(CarBuyTD[playerid][4], -1);TextDrawSetOutline(CarBuyTD[playerid][4], 0);TextDrawSetProportional(CarBuyTD[playerid][4], 1);TextDrawSetShadow(CarBuyTD[playerid][4], 1);TextDrawTextSize(CarBuyTD[playerid][4], 10.0, 10.0);TextDrawSetSelectable(CarBuyTD[playerid][4], true);CarBuyTD[playerid][5] = TextDrawCreate(448.000000, 337.000000, \"~>~\");TextDrawTextSize(CarBuyTD[playerid][5], 30, 30);TextDrawBackgroundColor(CarBuyTD[playerid][5], 255);TextDrawFont(CarBuyTD[playerid][5], 1);TextDrawLetterSize(CarBuyTD[playerid][5], 1.100000, 4.000000);TextDrawColor(CarBuyTD[playerid][5], -1);TextDrawSetOutline(CarBuyTD[playerid][5], 0);TextDrawSetProportional(CarBuyTD[playerid][5], 1);TextDrawSetShadow(CarBuyTD[playerid][5], 1);TextDrawSetSelectable(CarBuyTD[playerid][5], true);}public OnPlayerConnect(playerid) { TextdrawokBetoltese(playerid); return 1; } ** Parancs hatására.:for(new i = 0; i < 6; i++){TextDrawShowForPlayer(playerid, CarBuyTD[playerid]);}SelectTextDraw(playerid, 0xAAAAAA50); A textdrawot megjeleníti hibátlanul, viszont nem lehet rá kattintani.OnPlayerClickTextdraw függvényem.:[code=pawn]public OnPlayerClickTextDraw(playerid, Text:clickedid){PlayerPlaySound(playerid,1054,0.0,0.0,0.0); if(clickedid == CarBuyTD[playerid][2]) // Vásárlás{Msg(playerid, COLOR_LRED, \"LEFUTOTT\",1);return 1;}if(clickedid == CarBuyTD[playerid][3]) // Kilépés{Msg(playerid, COLOR_LRED, \"LEFUTOTT\",1);return 1;}if(clickedid == CarBuyTD[playerid][4]) // Balra{Msg(playerid, COLOR_LRED, \"LEFUTOTT\",1);return 1;}if(clickedid == CarBuyTD[playerid][5]) // Jobbra{Msg(playerid, COLOR_LRED, \"LEFUTOTT\",1);return 1;}return 1;}[ /code]