Raised This Month: $51 Target: $400
 12% 

[ANY] Advenced help menu


Post New Thread Reply   
 
Thread Tools Display Modes
Author
fafa_junhe
Junior Member
Join Date: Mar 2019
Location: Somewhere
Plugin ID:
8378
Plugin Version:
0.3
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    using json configs, and menus can be paralleled or nested.
    Old 02-02-2023 , 04:19   [ANY] Advenced help menu
    Reply With Quote #1

    Advanced Help Menu, using json configs, menus can be paralleled or nested.

    Cvar
    • advh_config - config file path (def:"configs/advhelpmenu.json")
    Command
    • sm_advhr - reload help menu (need adminflags_kick)
    Example Config
    Spoiler

    Changelog
    Spoiler

    Github: https://github.com/fafa-junhe/advhelpmenu
    You need sm-json to compile! https://github.com/clugg/sm-json(using version v4.1.3)

    IF YOU GET EXCEPTION FROM advhelpmenu.sp::SetupConfig FUNCTION, PLEASE RECOMPILE PLUGIN WITH HIGHER MAX_READ_BYTE
    Attached Files
    File Type: sp Get Plugin or Get Source (advhelpmenu.sp - 4 views - 8.1 KB)
    File Type: zip advhelpmenu-0.3.zip (26.0 KB, 17 views)

    Last edited by fafa_junhe; 03-01-2024 at 05:53. Reason: update 0.3
    fafa_junhe is offline
    MickaNoob
    Junior Member
    Join Date: Feb 2019
    Location: France
    Old 02-05-2023 , 07:20   Re: [ANY] Advenced help menu
    Reply With Quote #2

    Hi, good plugin,

    But I have a problem with the json file.

    I started to configure the file, but as soon as I want to add a new line the plugin crashes and as soon as I remove it the plugin works again.
    I checked the json conf, and it is valid...

    For example the first file is valid and works but if I add in rank menu 2 (l155) and I add a rank, the plugin crashes...
    Do you have an idea?

    This is a valide file
    Code:
    {
    	"advhelpmenu": [{
    			"[Absynthium - Menu]": {
    				"exit": "true",
    				"type": "menu",
    				"shortcut": "menu|!menu|commands|!commands",
    				"data": [{
    						"★ Vip Commands ★": {
    							"exit": "true",
    							"flags": "o",
    							"type": "menu",
    							"shortcut": "!vipmenu",
    							"data": [{
    									"!agents | Agents Models": {
    										"index": "1",
    										"type": "text",
    										"cmd": "sm_agents"
    									}
    								},
    								{
    									"!stickers | Weapons Stickers": {
    										"index": "2",
    										"type": "text",
    										"cmd": "sm_agents"
    									}
    								},
    								{
    									"!emotes/dances | Emotes and Dances Fortnite": {
    										"index": "3",
    										"type": "text",
    										"cmd": "sm_emotes"
    									}
    								},
    								{
    									"!rs | Reset Score": {
    										"index": "4",
    										"type": "text",
    										"cmd": "sm_rs"
    									}
    								}
    							]
    						}
    					},
    					{
    						"Commands": {
    							"exit": "true",
    							"type": "menu",
    							"shortcut": "!cmds",
    							"data": [{
    									"!ws | Weapons Menu": {
    										"index": "1",
    										"type": "text",
    										"cmd": "sm_emotes"
    									}
    								},
    								{
    									"!knife | Knifes Menu": {
    										"index": "2",
    										"type": "text",
    										"cmd": "sm_knifes"
    									}
    								},
    								{
    									"!gloves | Gloves Menu": {
    										"index": "3",
    										"type": "text",
    										"cmd": "sm_glove"
    									}
    								},
    								{
    									"!calladmin | Call an admin": {
    										"index": "4",
    										"type": "text",
    										"cmd": "sm_calladmin"
    									}
    								},
    								{
    									"!bug | Report bug": {
    										"index": "5",
    										"type": "text",
    										"cmd": "sm_bugs"
    									}
    								},
    								{
    									"!res | Round end Sound": {
    										"index": "6",
    										"type": "text",
    										"cmd": "sm_res"
    									}
    								},
    								{
    									"!rankme | Rank system": {
    										"index": "7",
    										"type": "text",
    										"cmd": "sm_rankme"
    									}
    								},
    								{
    									"!servers | Change servers": {
    										"index": "2",
    										"type": "text",
    										"cmd": "sm_servers"
    									}
    								}
    							]
    						}
    					},
    					{
    						"Links": {
    							"exit": "true",
    							"type": "menu",
    							"shortcut": "!links",
    							"data": [{
    									"!group | Group Steam": {
    										"index": "1",
    										"type": "text",
    										"cmd": "say !group"
    									}
    								},
    								{
    									"!discord | Discord Link": {
    										"index": "1",
    										"type": "text",
    										"cmd": "say !discord"
    									}
    								},
    								{
    									"!sbans | Sourcebans Reidection": {
    										"index": "1",
    										"type": "text",
    										"cmd": "sm_emotes"
    									}
    								},
    								{
    									"!stats | Player Analytics": {
    										"index": "1",
    										"type": "text",
    										"cmd": "say !stats"
    									}
    								},
    								{
    									"!recrutement | Forms admins": {
    										"index": "1",
    										"type": "text",
    										"cmd": "say !recrutement"
    									}
    								}
    							]
    						}
    					}
    				]
    			}
    		},
    		{
    			"Rank Menu2": 
    			{
    				"exit": "true",
    				"type": "menu",
    				"shortcut": "!rank|lrank",
    				"data": 
    				[
    					{
    						"★ Ranks ★": 
    						{
    							"exit": "true",
    							"type": "menu",
    							"shortcut": "!lranks",
    							"data": [{
    									"Silver I": {
    										"index": "1",
    										"type": "text",
    										"cmd": "sm_lranks"
    									}
    								},
    								{
    									"Silver II": {
    										"index": "2",
    										"type": "text",
    										"cmd": "sm_lranks"
    									}
    								},
    								{
    									"Silver III": {
    										"index": "4",
    										"type": "text",
    										"cmd": "sm_lranks"
    									}
    								}
    							]
    						}
    					}
    				]
    			}
    		}
    	]
    }
    When I add "silver 200" plugins steel crashing

    Code:
    {
    	"advhelpmenu": [{
    			"[Absynthium - Menu]": {
    				"exit": "true",
    				"type": "menu",
    				"shortcut": "menu|!menu|commands|!commands",
    				"data": [{
    						"★ Vip Commands ★": {
    							"exit": "true",
    							"flags": "o",
    							"type": "menu",
    							"shortcut": "!vipmenu",
    							"data": [{
    									"!agents | Agents Models": {
    										"index": "1",
    										"type": "text",
    										"cmd": "sm_agents"
    									}
    								},
    								{
    									"!stickers | Weapons Stickers": {
    										"index": "2",
    										"type": "text",
    										"cmd": "sm_agents"
    									}
    								},
    								{
    									"!emotes/dances | Emotes and Dances Fortnite": {
    										"index": "3",
    										"type": "text",
    										"cmd": "sm_emotes"
    									}
    								},
    								{
    									"!rs | Reset Score": {
    										"index": "4",
    										"type": "text",
    										"cmd": "sm_rs"
    									}
    								}
    							]
    						}
    					},
    					{
    						"Commands": {
    							"exit": "true",
    							"type": "menu",
    							"shortcut": "!cmds",
    							"data": [{
    									"!ws | Weapons Menu": {
    										"index": "1",
    										"type": "text",
    										"cmd": "sm_emotes"
    									}
    								},
    								{
    									"!knife | Knifes Menu": {
    										"index": "2",
    										"type": "text",
    										"cmd": "sm_knifes"
    									}
    								},
    								{
    									"!gloves | Gloves Menu": {
    										"index": "3",
    										"type": "text",
    										"cmd": "sm_glove"
    									}
    								},
    								{
    									"!calladmin | Call an admin": {
    										"index": "4",
    										"type": "text",
    										"cmd": "sm_calladmin"
    									}
    								},
    								{
    									"!bug | Report bug": {
    										"index": "5",
    										"type": "text",
    										"cmd": "sm_bugs"
    									}
    								},
    								{
    									"!res | Round end Sound": {
    										"index": "6",
    										"type": "text",
    										"cmd": "sm_res"
    									}
    								},
    								{
    									"!rankme | Rank system": {
    										"index": "7",
    										"type": "text",
    										"cmd": "sm_rankme"
    									}
    								},
    								{
    									"!servers | Change servers": {
    										"index": "2",
    										"type": "text",
    										"cmd": "sm_servers"
    									}
    								}
    							]
    						}
    					},
    					{
    						"Links": {
    							"exit": "true",
    							"type": "menu",
    							"shortcut": "!links",
    							"data": [{
    									"!group | Group Steam": {
    										"index": "1",
    										"type": "text",
    										"cmd": "say !group"
    									}
    								},
    								{
    									"!discord | Discord Link": {
    										"index": "1",
    										"type": "text",
    										"cmd": "say !discord"
    									}
    								},
    								{
    									"!sbans | Sourcebans Reidection": {
    										"index": "1",
    										"type": "text",
    										"cmd": "sm_emotes"
    									}
    								},
    								{
    									"!stats | Player Analytics": {
    										"index": "1",
    										"type": "text",
    										"cmd": "say !stats"
    									}
    								},
    								{
    									"!recrutement | Forms admins": {
    										"index": "1",
    										"type": "text",
    										"cmd": "say !recrutement"
    									}
    								}
    							]
    						}
    					}
    				]
    			}
    		},
    		{
    			"Rank Menu2": 
    			{
    				"exit": "true",
    				"type": "menu",
    				"shortcut": "!rank|lrank",
    				"data": 
    				[
    					{
    						"★ Ranks ★": 
    						{
    							"exit": "true",
    							"type": "menu",
    							"shortcut": "!lranks",
    							"data": [{
    									"Silver I": {
    										"index": "1",
    										"type": "text",
    										"cmd": "sm_lranks"
    									}
    								},
    								{
    									"Silver II": {
    										"index": "2",
    										"type": "text",
    										"cmd": "sm_lranks"
    									}
    								},
    								{
    									"Silver 200": {
    										"index": "2",
    										"type": "text",
    										"cmd": "sm_lranks"
    									}
    								},
    								{
    									"Silver III": {
    										"index": "4",
    										"type": "text",
    										"cmd": "sm_lranks"
    									}
    								}
    							]
    						}
    					}
    				]
    			}
    		}
    	]
    }

    Code plugins error

    Code:
    L 02/05/2023 - 13:12:16: [SM] Exception reported: Invalid Handle 0 (error 4)
    L 02/05/2023 - 13:12:16: [SM] Blaming: advhelpmenu.smx
    L 02/05/2023 - 13:12:16: [SM] Call stack trace:
    L 02/05/2023 - 13:12:16: [SM]   [0] StringMap.GetValue
    L 02/05/2023 - 13:12:16: [SM]   [1] Line 98, Z:\0_SOURCEMOD COMPILER\SM 1.11 (6924)\include\json\helpers\typedstringmap.inc::TypedStringMap.GetOptionalValue
    L 02/05/2023 - 13:12:16: [SM]   [2] Line 151, Z:\0_SOURCEMOD COMPILER\SM 1.11 (6924)\include\json\helpers\typedstringmap.inc::TypedStringMap.GetHandle
    L 02/05/2023 - 13:12:16: [SM]   [3] Line 71, Z:\0_SOURCEMOD COMPILER\SM 1.11 (6924)\include\json\helpers\metastringmap.inc::MetaStringMap.Data.get
    L 02/05/2023 - 13:12:16: [SM]   [4] Line 139, Z:\0_SOURCEMOD COMPILER\SM 1.11 (6924)\include\json\helpers\metastringmap.inc::MetaStringMap.GetHandle
    L 02/05/2023 - 13:12:16: [SM]   [5] Line 430, Z:\0_SOURCEMOD COMPILER\SM 1.11 (6924)\include\json\object.inc::JSON_Object.GetObject
    L 02/05/2023 - 13:12:16: [SM]   [6] Line 245, Z:\0_SOURCEMOD COMPILER\advhelpmenu.sp::SetupConfig
    L 02/05/2023 - 13:12:16: [SM]   [7] Line 285, Z:\0_SOURCEMOD COMPILER\advhelpmenu.sp::OnPluginStart
    [SM] Plugin advhelpmenu.smx failed to reload: Error detected in plugin startup (see error logs).
    [SM] Plugin advhelpmenu.smx reloaded successfully.
    __________________
    Owner/Founder of Absynthium Community

    Steam Group
    MickaNoob is offline
    fafa_junhe
    Junior Member
    Join Date: Mar 2019
    Location: Somewhere
    Old 02-05-2023 , 11:01   Re: [ANY] Advenced help menu
    Reply With Quote #3

    try this,
    and index is not required anymore.
    i forget to remove it.
    Attached Files
    File Type: sp Get Plugin or Get Source (advhelpmenu.sp - 103 views - 8.0 KB)
    fafa_junhe is offline
    MickaNoob
    Junior Member
    Join Date: Feb 2019
    Location: France
    Old 02-05-2023 , 12:30   Re: [ANY] Advenced help menu
    Reply With Quote #4

    It's working thx
    __________________
    Owner/Founder of Absynthium Community

    Steam Group
    MickaNoob is offline
    Reply



    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


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


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