[Include] TextDraw Menu v1.0
#3

There are a lot of people who will copy your example code and use it.

Код:
    new Test[600];
    strcat(Test,"~y~1-~w~ Message 1~n~");
    strcat(Test,"~y~2-~w~ Message 2~n~");
    strcat(Test,"~y~3-~w~ Message 3~n~");
    strcat(Test,"~y~4-~w~ Message 4~n~");
    strcat(Test,"~y~5-~w~ Message 5~n~");
    strcat(Test,"~y~6-~w~ Message 6");
    TextMenuShowForPlayer(playerid,0,"Items",Test,6);
Bad practice.

Код:
    TextMenuShowForPlayer(playerid,0,"Items","~y~1-~w~ Message 1~n~~y~2-~w~ Message 2~n~~y~3-~w~ Message 3~n~~y~4-~w~ Message 4~n~~y~5-~w~ Message 5~n~~y~6-~w~ Message 6",6);
or at least

Код:
static Test[600], bool:need_format = true;
if(need_format)
{
    strcat(Test,"~y~1-~w~ Message 1~n~");
    strcat(Test,"~y~2-~w~ Message 2~n~");
    strcat(Test,"~y~3-~w~ Message 3~n~");
    strcat(Test,"~y~4-~w~ Message 4~n~");
    strcat(Test,"~y~5-~w~ Message 5~n~");
    strcat(Test,"~y~6-~w~ Message 6");
    need_format = false;
}
TextMenuShowForPlayer(playerid,0,"Items",Test,6);
Reply


Messages In This Thread
TextDraw Menu v1.1 - by Jelly23 - 30.10.2016, 22:20
Re: TextDraw Menu v1.0 - by Jelly23 - 01.11.2016, 11:19
Re: TextDraw Menu v1.0 - by Yashas - 01.11.2016, 11:26
Re: TextDraw Menu v1.0 - by MikeB - 01.11.2016, 11:41
Re: TextDraw Menu v1.0 - by Jelly23 - 01.11.2016, 12:40
Re: TextDraw Menu v1.0 - by Yashas - 01.11.2016, 13:13
Re: TextDraw Menu v1.0 - by Jelly23 - 01.11.2016, 13:21
Re: TextDraw Menu v1.0 - by Eoussama - 02.11.2016, 17:26
Re: TextDraw Menu v1.0 - by NealPeteros - 18.11.2016, 09:17
Re: TextDraw Menu v1.0 - by Zorono - 18.11.2016, 09:46

Forum Jump:


Users browsing this thread: 1 Guest(s)