SA-MP Forums Archive
[Include] Text Draw Menu by Zero_Cool - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] Text Draw Menu by Zero_Cool (/showthread.php?tid=446801)



Text Draw Menu by Zero_Cool - zero_cool - 27.06.2013

Text Draw Menu

Natives
Код:
native CreateTdMenu(menuid,menutitle[],Rows);
native AddTdMenuItem(menuid,row,menutext[],menuprices);
native ShowTdMenuForPlayer(playerid,menuid);
native HideTdMenuForPlayer(playerid,menuid);
native ShowTdMenuForAll(menuid);
native HideTdMenuForAll(menuid);
native DestroyTdMenu(menuid);
native GetPlayerTdMenu(playerid);
Download


Re: Text Draw Menu by Zero_Cool - KesaSport - 27.06.2013

Photos?


Re: Text Draw Menu by Zero_Cool - Littlehelper - 27.06.2013

Pics or no download.


AW: Text Draw Menu by Zero_Cool - BigETI - 27.06.2013

Does this really require any plugin? Because you've listed native functions.


Re: Text Draw Menu by Zero_Cool - SsHady - 27.06.2013

Post some Screenshots? or video?
And only two lines of information for your include isn't enough
Noone is gonna download it without Seeing how it Looks :P


Re: Text Draw Menu by Zero_Cool - DaRealShazz - 27.06.2013

No pics, no clicks.


AW: Text Draw Menu by Zero_Cool - eLiTe. - 27.06.2013

Please one photo or video^^


Re: Text Draw Menu by Zero_Cool - willsuckformoney - 27.06.2013

This actually looks nice. I'm going to test it's limits. Here is a picture for you above.



Re: Text Draw Menu by Zero_Cool - Pottus - 27.06.2013

You need a clickable textdraw option.

Also.... there is just way to much copy paste in this include. I don't think a switch makes sense here consider this. stock CreateTdMenu(menuid,menutitle[],Rows) has 2800 lines that is completely absurd and could be reduced to probably around 1/4 as many lines by coding everything only once.

Absolutely no need ever copy paste code for something like this can you imagine trying to update then having to update all your copy/paste code? That is absolute nonsense.

pawn Код:
if(Rows >= 1)
{
    MenuTd0[menuid][0] = TextDrawCreate(21.000000, 112.000000, "____________");
    TextDrawBackgroundColor(MenuTd0[menuid][0], 255);
    TextDrawFont(MenuTd0[menuid][0], 1);
    TextDrawLetterSize(MenuTd0[menuid][0], 0.000000, 7.500022);
    TextDrawColor(MenuTd0[menuid][0], -1);
    TextDrawSetOutline(MenuTd0[menuid][0], 0);
    TextDrawSetProportional(MenuTd0[menuid][0], 1);
    TextDrawSetShadow(MenuTd0[menuid][0], 1);
    TextDrawUseBox(MenuTd0[menuid][0], 1);
    TextDrawBoxColor(MenuTd0[menuid][0], 118);
    TextDrawTextSize(MenuTd0[menuid][0], 230.000000, 11.000000);
    TextDrawSetSelectable(MenuTd0[menuid][0], 0);

    MenuTd1[menuid][0] = TextDrawCreate(124.000000, 130.000000, menutitle);
    TextDrawAlignment(MenuTd1[menuid][0], 2);
    TextDrawBackgroundColor(MenuTd1[menuid][0], 255);
    TextDrawFont(MenuTd1[menuid][0], 1);
    TextDrawLetterSize(MenuTd1[menuid][0], 0.500000, 1.000000);
    TextDrawColor(MenuTd1[menuid][0], -1);
    TextDrawSetOutline(MenuTd1[menuid][0], 1);
    TextDrawSetProportional(MenuTd1[menuid][0], 1);
    TextDrawSetSelectable(MenuTd1[menuid][0], 0);

    MenuTd2[menuid][0] = TextDrawCreate(127.000000, 166.000000, "Prees ~y~F6 ~b~[T]~w~And Select Number~n~~w~Press ~y~LMB ~w~To Close This Box");
    TextDrawAlignment(MenuTd2[menuid][0], 2);
    TextDrawBackgroundColor(MenuTd2[menuid][0], 255);
    TextDrawFont(MenuTd2[menuid][0], 1);
    TextDrawLetterSize(MenuTd2[menuid][0], 0.289999, 0.799997);
    TextDrawColor(MenuTd2[menuid][0], -1);
    TextDrawSetOutline(MenuTd2[menuid][0], 1);
    TextDrawSetProportional(MenuTd2[menuid][0], 1);
    TextDrawSetSelectable(MenuTd2[menuid][0], 0);

    MenuTd3[menuid][1] = TextDrawCreate(25.000000, 150.000000, "");
    TextDrawBackgroundColor(MenuTd3[menuid][1], 255);
    TextDrawFont(MenuTd3[menuid][1], 1);
    TextDrawLetterSize(MenuTd3[menuid][1], 0.289999, 0.799996);
    TextDrawColor(MenuTd3[menuid][1], -1);
    TextDrawSetOutline(MenuTd3[menuid][1], 1);
    TextDrawSetProportional(MenuTd3[menuid][1], 1);
    TextDrawSetSelectable(MenuTd3[menuid][1], 0);

    MenuTd4[menuid][1] = TextDrawCreate(224.000000, 150.000000, "");
    TextDrawAlignment(MenuTd4[menuid][1], 3);
    TextDrawBackgroundColor(MenuTd4[menuid][1], 255);
    TextDrawFont(MenuTd4[menuid][1], 1);
    TextDrawLetterSize(MenuTd4[menuid][1], 0.289999, 0.799996);
    TextDrawColor(MenuTd4[menuid][1], -1);
    TextDrawSetOutline(MenuTd4[menuid][1], 1);
    TextDrawSetProportional(MenuTd4[menuid][1], 1);
    TextDrawSetSelectable(MenuTd4[menuid][1], 0);
}
else return print("[ERROR]:Min Rows 1"); DestroyTdMenu(menuid);

if(Rows >= 2)
{
    MenuTd3[menuid][2] = TextDrawCreate(25.000000, 160.000000, "");
    TextDrawBackgroundColor(MenuTd3[menuid][2], 255);
    TextDrawFont(MenuTd3[menuid][2], 1);
    TextDrawLetterSize(MenuTd3[menuid][2], 0.289999, 0.799996);
    TextDrawColor(MenuTd3[menuid][2], -1);
    TextDrawSetOutline(MenuTd3[menuid][2], 1);
    TextDrawSetProportional(MenuTd3[menuid][2], 1);
    TextDrawSetSelectable(MenuTd3[menuid][2], 0);

    MenuTd4[menuid][2] = TextDrawCreate(224.000000, 160.000000, "");
    TextDrawAlignment(MenuTd4[menuid][2], 3);
    TextDrawBackgroundColor(MenuTd4[menuid][2], 255);
    TextDrawFont(MenuTd4[menuid][2], 1);
    TextDrawLetterSize(MenuTd4[menuid][2], 0.289999, 0.799996);
    TextDrawColor(MenuTd4[menuid][2], -1);
    TextDrawSetOutline(MenuTd4[menuid][2], 1);
    TextDrawSetProportional(MenuTd4[menuid][2], 1);
    TextDrawSetSelectable(MenuTd4[menuid][2], 0);
}
else return 1;



Re: Text Draw Menu by Zero_Cool - MP2 - 27.06.2013

Looks terrible. Bad copy of CrazyBobs. Not only that, but the script is aaaaaaaaaaaaaaaaaaaaaawful.