[Include] acMenu.inc || Create circulars menus with only one line.
#1

Video
[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
);
* 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:

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**)
);
** image


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;
}
Credits
adri1

Download (SolidFiles) V2.0 fixed.
Download (SolidFiles) V1.0
Reply
#2

It is pretty awesome!
Reply
#3

This is one of the most unique things I saw there, great job !

I love the callback.
Reply
#4

Quote:
Originally Posted by IstuntmanI
View Post
This is one of the most unique things I saw there, great job !
Indeed.
After all those shity includes I finally see something unique!
Reply
#5

You should round some of the creation position values to whole numbers otherwise it might look bad on lower resolutions.

Why is there the need for Pvars? Why bother?
Reply
#6

Great job! Pastebin link? I want to view the source :P

By the looks in the code, you can't move the position mhm. Very nice idea for a survival server.
Reply
#7

pastebin?
Reply
#8

Quote:
Originally Posted by Kar
View Post
pastebin?
http://pastebin.com/w88Y8wMq

___
Edit: Updated to 1.5...
Repair errors:
pawn Code:
.pwn() : error 021: symbol already defined: "AC_OPC"
.pwn() : error 021: symbol already defined: "AC_OPDC"
Reply
#9

From your filterscript version:
Quote:
Quote:
Originally Posted by BigETI
View Post
This is a nice idea, but this could be done much more dynamic for example you can add "n" amount of items into the circle, and use the "in front of point" calculation to calculate the positions of each item around the circle.
Quote:
Originally Posted by [uL]Pottus
View Post
That would be the best way to do it, I was actually thinking this before you mentioned it also it would be nice if you could specify ring styles, position, size.
I haven't check your include version yet, but can I make a version from scratch which supports loading and saving menu templates, showing menus with n amount of items, if you don't mind?
You will be included into the credits for the initial idea.
Reply
#10

Seems nice, good job.
Reply
#11

Quote:
Originally Posted by BigETI
Посмотреть сообщение
From your filterscript version:


I haven't check your include version yet, but can I make a version from scratch which supports loading and saving menu templates, showing menus with n amount of items, if you don't mind?
You will be included into the credits for the initial idea.
No problem
Reply
#12

OMG
here start a new era i guess this just started giveing me new ideas
Reply
#13

Wow man , great job ! It is awesome :]
Reply
#14

Amazing script ! Keep up.
Reply
#15

just beautiful, great idea.....
Reply
#16

Very awesome! :O
Reply
#17

Ayoooooooooo adri. Woooooooooooooooooooooo You fucked it this time. Dammit. Insane work man. Loved it. Rep+4

Try making auto moving menus now or some sliders or etc.
Reply
#18

i will try to convert my gps into this nyc job very very unique
Reply
#19

fail
Reply
#20

aWESOME SCRIPT
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)