Sprite & TD select menu! [USABLE FOR WEAPONS, OPTIONS, ETC] -
RajatPawar - 10.10.2013
Hi.
This is how it looks like:
The distances between the arrows and options is a bit messed up due to varying lengths, I can't do anything about that.
You can choose any option because it enables your cursor.
Functions:
pawn Code:
native CreateSelectMenu( playerid, MENU_ID, string[] );
native ShowSelectMenu( playerid, MENU_ID );
native HideSelectMenu( playerid );
All options must be included in the string 'string'. The separator (delimiter) must be ' | '.
So if you want to show these eight options:
- Hello
- Hi
- Namaste
- Welcome
- XYZ
- ABC
- MY
- HI
The string parameter must be:
pawn Code:
#define MY_MENU 1
CreateSelectMenu( playerid, MY_MENU, "Hello|Hi|Namaste|Welcome|XYZ|ABC|My|HI");
ShowSelectMenu is self explanatory.
Callback:
pawn Code:
forward public OnPlayerClickSelectMenu( playerid, const MENU_ID, OPTION_TYPE );
* Option type returns these values:
OPTION_1, OPTION_2, OPTION_3, ...... OPTION_8.
Example:
pawn Code:
public OnPlayerClickSelectMenu( playerid, const MENU_ID, OPTION_TYPE )
{
if(OPTION_TYPE == OPTION_1)
{
SendClientMessage(playerid, -1, "You clicked option 1");
}
return 1;
}
[COMMAND FS]
Download filterscript
[REQUIRED]
Download include 'select_menu_definition' required for filterscript
Thanks, cheers, report any bugs you find.
Re: Sprite & TD select menu! [USABLE FOR WEAPONS, OPTIONS, ETC] -
Mckarlis - 10.10.2013
Nice job i will surley use this .
Re: Sprite & TD select menu! [USABLE FOR WEAPONS, OPTIONS, ETC] - Nofear192 - 10.10.2013
Awesome Filter-Script
Re: Sprite & TD select menu! [USABLE FOR WEAPONS, OPTIONS, ETC] -
iZN - 10.10.2013
Nice Rajat.
Re: Sprite & TD select menu! [USABLE FOR WEAPONS, OPTIONS, ETC] -
vyper - 10.10.2013
Pretty nice idea
Re: Sprite & TD select menu! [USABLE FOR WEAPONS, OPTIONS, ETC] -
-Prodigy- - 10.10.2013
First of all, the GUI is ugly. It could be designed much better with better selecting style, etc.. Also, the menu MUST have 8 options? What if I just want 2? You should make it more dynamic. Eg: # of options = # of options to select from.
Re: Sprite & TD select menu! [USABLE FOR WEAPONS, OPTIONS, ETC] -
iFiras - 10.10.2013
Good job making this

+Rep
Re: Sprite & TD select menu! [USABLE FOR WEAPONS, OPTIONS, ETC] -
x96664 - 10.10.2013
Does namaste mean cheers ?
Re: Sprite & TD select menu! [USABLE FOR WEAPONS, OPTIONS, ETC] -
Juandawson - 11.10.2013
nice bro
Re: Sprite & TD select menu! [USABLE FOR WEAPONS, OPTIONS, ETC] -
RajatPawar - 12.10.2013
Quote:
Originally Posted by -Prodigy-
First of all, the GUI is ugly. It could be designed much better with better selecting style, etc.. Also, the menu MUST have 8 options? What if I just want 2? You should make it more dynamic. Eg: # of options = # of options to select from.
|
Alright, you don't find the design cool, personal opinion, w/e. But options? Isn't that exceptionally stupid? Because allowing that would just break the symmetry and this no longer would be a good idea then..! Thanks for viewing this topic!