25.05.2013, 19:00
(
Last edited by adri1; 26/05/2013 at 07:20 AM.
)
Video
[ame="http://www.youtube.com/watch?v=DTV5tC_gFUE"]*******[/ame]
With this you can create circulars menus , with only one line.
* Note that by default you can only create 10 menu per player , so if you create more than 10 menus or id puts more than 10 will not work, not being to change 'MAX_CM_DIALOGS'
Callback
OnCircularMenuResponse is called when there is something on the menu:
** image
Example code:
Credits
adri1
Download (SolidFiles) V2.0 fixed.
Download (SolidFiles) V1.0
[ame="http://www.youtube.com/watch?v=DTV5tC_gFUE"]*******[/ame]
With this you can create circulars menus , with only one line.
Code:
ShowCircularMenu( playerid, = Player ID circularmenuid, = Circular Menu ID (See*) off[], = Button OFF text txd1[]="", line1[]="", = Line 1 sprite & text txd2[]="", line2[]="", = Line 2 sprite & text txd3[]="", line3[]="", = Line 3 sprite & text txd4[]="", line4[]="", = Line 4 sprite & text txd5[]="", line5[]="", = Line 5 sprite & text txd6[]="", line6[]="", = Line 6 sprite & text txd7[]="", line7[]="", = Line 7 sprite & text txd8[]="", line8[]="" = Line 8 sprite & text );
Callback
OnCircularMenuResponse is called when there is something on the menu:
Code:
OnCircularMenuResponse( playerid, = Player ID response, = if false, it means I press the OFF button, or pressed ESC circularmenuid, = Circular menu id listitem = Listitem ... direction clockwise (See**) );
Example code:
Code:
#include <aCMenu> public OnPlayerCommandText(playerid, cmdtext[]) { if(!strcmp(cmdtext, "/b", true)) { ShowCircularMenu(playerid, 0, "close", "hud:radar_qmark", "1", "hud:radar_qmark", "2", "hud:radar_qmark", "3", "hud:radar_qmark", "4", "hud:radar_qmark", "5", "hud:radar_qmark", "6", "hud:radar_qmark", "7", "hud:radar_qmark", "8"); return 1; } if(!strcmp(cmdtext, "/c", true)) { ShowCircularMenu(playerid, 1, "cerrar", "hud:radar_gangB", "cuenta", "hud:radar_LocoSyndicate", "dni", "hud:arrow", "localizacion", "hud:radar_modGarage", "ajustes", "hud:radar_qmark", "info", "hud:radar_enemyAttack", "creditos", "hud:radar_dateFood", "lugares", "hud:radar_race", "premios"); return 1; } return 0; } public OnCircularMenuResponse(playerid, response, circularmenuid, listitem) { switch(circularmenuid) { case 0: { if(response) { switch(listitem) { case 0: SendClientMessage(playerid, -1, "Has presionado en {00CCFF}1"); case 1: SendClientMessage(playerid, -1, "Has presionado en {00CCFF}2"); case 2: SendClientMessage(playerid, -1, "Has presionado en {00CCFF}3"); case 3: SendClientMessage(playerid, -1, "Has presionado en {00CCFF}4"); case 4: SendClientMessage(playerid, -1, "Has presionado en {00CCFF}5"); case 5: SendClientMessage(playerid, -1, "Has presionado en {00CCFF}6"); case 6: SendClientMessage(playerid, -1, "Has presionado en {00CCFF}7"); case 7: SendClientMessage(playerid, -1, "Has presionado en {00CCFF}8"); } } else SendClientMessage(playerid, -1, "Has cerrado el menъ {00CCFF}#0"); } case 1: { if(response) { switch(listitem) { case 0: SendClientMessage(playerid, -1, "Has presionado en {00CCFF}cuenta"); case 1: SendClientMessage(playerid, -1, "Has presionado en {00CCFF}dni"); case 2: SendClientMessage(playerid, -1, "Has presionado en {00CCFF}localizaciуn"); case 3: SendClientMessage(playerid, -1, "Has presionado en {00CCFF}ajustes"); case 4: SendClientMessage(playerid, -1, "Has presionado en {00CCFF}info"); case 5: SendClientMessage(playerid, -1, "Has presionado en {00CCFF}crйditos"); case 6: SendClientMessage(playerid, -1, "Has presionado en {00CCFF}lugares"); case 7: SendClientMessage(playerid, -1, "Has presionado en {00CCFF}premios"); } } else SendClientMessage(playerid, -1, "Has cerrado el menъ {00CCFF}#1"); } } return 1; }
adri1
Download (SolidFiles) V2.0 fixed.
Download (SolidFiles) V1.0