30.10.2016, 22:20
(
Последний раз редактировалось Jelly23; 27.05.2017 в 18:23.
)
TextDraw Menu v1.1
You might have seen textdraw menus in some servers, specially cops and robbers (Crazybob's), so i decided to make something similar.
Pictures:
No items
With items
Functions:
Callbacks:
Example:
Download:
Pastebin
You might have seen textdraw menus in some servers, specially cops and robbers (Crazybob's), so i decided to make something similar.
Pictures:
No items
With items
Functions:
PHP код:
TextMenuShowForPlayer(playerid,menuid,header[],content[],items=0)
TextMenuHideForPlayer(playerid)
PHP код:
forward OnTextMenuResponse(playerid,menuid,listitem);
PHP код:
CMD:test(playerid)
{
new Test[600],bool:necessary = true;
if(necessary)
{
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");
necessary = false;
}
TextMenuShowForPlayer(playerid,0,"Items",Test,6);
return 1;
}
public OnTextMenuResponse(playerid,menuid,listitem)
{
if(menuid == 0)
{
switch(listitem)
{
case 1:
{
//Your stuff
}
case 2:
{
//Your stuff
}
case 3:
{
//Your stuff
}
case 4:
{
//Your stuff
}
case 5:
{
//Your stuff
}
case 6:
{
//Your stuff
}
}
}
return 1;
}
Pastebin