AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   New Plugin Submissions (https://forums.alliedmods.net/forumdisplay.php?f=26)
-   -   Simple Menu Builder (https://forums.alliedmods.net/showthread.php?t=284324)

Porcay 09-23-2018 17:13

Re: Simple Menu Builder
 
Is it possible to make a menu that opens automatically when spawn ?

OciXCrom 09-24-2018 07:42

Re: Simple Menu Builder
 
Quote:

Originally Posted by Porcay (Post 2616511)
Is it possible to make a menu that opens automatically when spawn ?

Not at the moment without using another plugin for the job. I may add such a feature at some point.

Quote:

Originally Posted by Snake. (Post 2609408)
Best plugin i had ever used. Anyway, I have a suggestion for this plugin and i need it. Is is possible to add languages support for the settings or even items ? Example:

Code:

[New Menu = Menu Sample]

[Menu Settings]
MENU_OPEN = say /menu
MENU_ITEMS_PER_PAGE = 2
MENU_TITLE = TITLE_TRANSLATION
MENU_TITLE_PAGE = TITLE_PAGE_TRANSLATION
MENU_BACK = BACK_TRANSLATION
MENU_NEXT = NEXT_TRANSLATION
MENU_EXIT = EXIT_TRANSLATION
MENU_NOACCESS = MENU_NOACCESS_TRANSLATION
MENU_NOTEAM = MENU_NOTEAM_TRANSLATION
MENU_ALIVE = MENU_ALIVE_TRANSLATION
MENU_DEAD = MENU_DEAD_TRANSLATION
MENU_LANG_PATH = menusample.txt

[Menu Items]
"%L" "FIRST_TRANSLATION"
"%L" "SECOND_TRANSLATION"


Multilingual menus will be available in AMXX 1.9/1.10 (click). I don't plan on adding such a feature earlier.

iceeedr 09-24-2018 09:08

Re: Simple Menu Builder
 
@Ocix, he can use a task 1.0 on spawnpost, no?

OciXCrom 09-24-2018 12:43

Re: Simple Menu Builder
 
There's no need for a task.

PHP Code:

#include <amxmodx>
#include <hamsandwich>

public plugin_init()
{
    
register_plugin("Menu on Spawn""1.0""OciXCrom")
    
RegisterHam(Ham_Spawn"player""OnPlayerSpawn"1)
}

public 
OnPlayerSpawn(id)
{
    if(
is_user_alive(id))
        
client_cmd(id"say /menu_command")



iceeedr 09-24-2018 15:05

Re: Simple Menu Builder
 
Quote:

Originally Posted by OciXCrom (Post 2616599)
There's no need for a task.

PHP Code:

#include <amxmodx>
#include <hamsandwich>

public plugin_init()
{
    
register_plugin("Menu on Spawn""1.0""OciXCrom")
    
RegisterHam(Ham_Spawn"player""OnPlayerSpawn"1)
}

public 
OnPlayerSpawn(id)
{
    if(
is_user_alive(id))
        
client_cmd(id"say /menu_command")



I like the task, because the menu does not open quickly after the spawn, a second gives a feeling of comfort, but you are correct.

Snake. 01-19-2019 00:26

Re: Simple Menu Builder
 
Can you add two feature to this like that ?

Code:

There'll be MENU_EXIT_TO option.With this, menu will exit to another menus or items.

For example

MENU_EXIT_TO = say /mainmenu, mainmenu

Code:

New ignore bots flag in the menu.

OciXCrom 01-19-2019 07:27

Re: Simple Menu Builder
 
Good idea, I'll have it mind for the next update.

luciaus18 01-21-2019 10:23

Re: Simple Menu Builder
 
I get this when I press something on the menu: Server tried to get invalid command: "say /reg"
This is my .ini file:
Code:

[Default Settings]
;These are the default settings for each menu created.
;You can add certain options in [Menu Settings] if you want to change them.
;Please note that every menu needs to have a different MENU_OPEN settings, therefore there's no default one.

MENU_TITLE = Useful Commands
MENU_TITLE_PAGE = %newline%Page:\d
MENU_BACK = \yPrevious Page
MENU_NEXT = \yNext Page
MENU_EXIT = \rClose
;MENU_OPEN = say /menu, say_team /menu, amx_mymenu -- This must be set with a different value on every menu!
MENU_FLAG = 0
MENU_TEAM = 0
MENU_ALIVEONLY = 0
MENU_ITEMS_PER_PAGE = 7
MENU_REOPEN = 0
MENU_ITEM_FORMAT = %item%
MENU_PREFIX = !g[Useful Commands]!n
MENU_NOACCESS = You have no access to this menu.
MENU_NOTEAM = Your team isn't allowed to use this menu.
MENU_ALIVE = You need to be alive to use this menu.
MENU_DEAD = You need to be dead to use this menu.
MENU_SOUND =

[New Menu = Menu Sample]

[Menu Settings]
;<settings> = <value>

MENU_OPEN = say /menu, say_team /menu, amx_mymenu
MENU_REOPEN = 1

[Menu Items]
;<Item Name> <Command> [Flag] [Team]

"Register System" "say /reg"
"XP Ranks" "say /xplist"
"Played Time" "say /pm"
"Switch team" "say /change"
"Go Spectator" "say /spec"
"Back to game" "say /back"
"Parachute" "say /para"
"Show Rules" "say /rules"
"How to get VIP" "/wantvip"
"VIP'S Online" "say /vips"
"Boost for VIP" "say /boost"
"Admin Price" "say /admininfo"


One more thing: How to add a motd too? I have a lot of commands with say but I also have some motd to open

OciXCrom 01-21-2019 13:34

Re: Simple Menu Builder
 
Your game has some protection that is blocking the server from executing "say" commands on your client. I can't do anything to bypass that. About the MOTD, use this - https://forums.alliedmods.net/showthread.php?t=297627

luciaus18 01-21-2019 14:51

Re: Simple Menu Builder
 
Oh you talk about the client protection. That was the problem

Sugestion: how about a key bind for this menu? for example i, is near y and u and you can acces it to open the menu automatically


All times are GMT -4. The time now is 06:06.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.