Jump to content

Popup problem

Pending 1.1.3

Carl Gustav
Carl Gustav

Posted

Hi i want to make new popups for my customised layout, how do i do that exactly? I saw someone asking about it, and you reffered them to the config, but how exactly do i do that, cause the old popups are still encoded in the config, which seems quite complicated and honestly i dont know how im supposed to link them propperly. I have sadly deleted the old popups in the belief that i could just create new ones... Please help

Mevent

Posted

On 3/2/2025 at 2:41 PM, Carl Gustav said:

Hi i want to make new popups for my customised layout, how do i do that exactly? I saw someone asking about it, and you reffered them to the config, but how exactly do i do that, cause the old popups are still encoded in the config, which seems quite complicated and honestly i dont know how im supposed to link them propperly. I have sadly deleted the old popups in the belief that i could just create new ones... Please help

Hey Carl Gustav,

To create new pop-ups, you'll need to add a new entry in the Pop Ups section of your ServerPanelPopUps.json config file. Here’s a quick guide:

  1. Copy an Existing Pop-Up: Start by copying an existing pop-up configuration that's similar to what you want.
  2. Modify the ID: Change the ID to a unique number. This ID should not match any other pop-up IDs.
  3. Customize the Content: Update the Text, Commands, and other settings to match your new pop-up. Make sure the Name fields are unique and descriptive.
  4. Enable the Pop-Up: Ensure the Enabled field is set to true.
  5. Save and Reload: After making your changes, save the config file and reload the plugin to apply the new pop-up.

 

Here’s a basic example of what a new pop-up entry might look like:

    },
    {
      "Enabled": true,
      "ID": 100783110,
      "Commands": [
        "pop.server.commands"
      ],
      "Background": {
        "Parent Layer (Overlay/Hud)": "Overlay",
        "Background": {
          "Enabled?": true,
          "Visible": true,
          "Name": "Panel_b4f9a01d02",
          "Type (Label/Panel/Button/Image)": "Panel",
          "Color": {
            "HEX": "#000000",
            "Opacity (0 - 100)": 90.0
          },
          "Text": [],
          "Font Size": 14,
          "Font": 0,
          "Align": "UpperLeft",
          "Text Color": {
            "HEX": "#FFFFFF",
            "Opacity (0 - 100)": 100.0
          },
          "Command ({user} - user steamid)": "",
          "Image": "",
          "Cursor Enabled": false,
          "Keyboard Enabled": false,
          "Sprite": "assets/content/ui/ui.background.transparent.radial.psd",
          "Material": "assets/content/ui/uibackgroundblur.mat",
          "AnchorMin (X)": 0.0,
          "AnchorMin (Y)": 0.0,
          "AnchorMax (X)": 1.0,
          "AnchorMax (Y)": 1.0,
          "OffsetMin (X)": 0.0,
          "OffsetMin (Y)": 0.0,
          "OffsetMax (X)": 0.0,
          "OffsetMax (Y)": 0.0
        },
        "Close after click?": true
      },
      "Close Button": {
        "Background": {
          "Enabled?": true,
          "Visible": true,
          "Name": "Panel_5144a48e02",
          "Type (Label/Panel/Button/Image)": "Panel",
          "Color": {
            "HEX": "#000000",
            "Opacity (0 - 100)": 0.0
          },
          "Text": [],
          "Font Size": 14,
          "Font": 0,
          "Align": "UpperLeft",
          "Text Color": {
            "HEX": "#FFFFFF",
            "Opacity (0 - 100)": 100.0
          },
          "Command ({user} - user steamid)": "",
          "Image": "",
          "Cursor Enabled": false,
          "Keyboard Enabled": false,
          "Sprite": "",
          "Material": "",
          "AnchorMin (X)": 1.0,
          "AnchorMin (Y)": 1.0,
          "AnchorMax (X)": 1.0,
          "AnchorMax (Y)": 1.0,
          "OffsetMin (X)": -49.0,
          "OffsetMin (Y)": -49.0,
          "OffsetMax (X)": -9.0,
          "OffsetMax (Y)": -9.0
        },
        "Title": {
          "Enabled?": true,
          "Visible": true,
          "Name": "Image_add5038c6c",
          "Type (Label/Panel/Button/Image)": "Image",
          "Color": {
            "HEX": "#FFFFFF",
            "Opacity (0 - 100)": 100.0
          },
          "Text": [],
          "Font Size": 14,
          "Font": 0,
          "Align": "UpperLeft",
          "Text Color": {
            "HEX": "#FFFFFF",
            "Opacity (0 - 100)": 100.0
          },
          "Command ({user} - user steamid)": "",
          "Image": "assets/icons/close.png",
          "Cursor Enabled": false,
          "Keyboard Enabled": false,
          "Sprite": "",
          "Material": "",
          "AnchorMin (X)": 0.5,
          "AnchorMin (Y)": 0.5,
          "AnchorMax (X)": 0.5,
          "AnchorMax (Y)": 0.5,
          "OffsetMin (X)": -10.0,
          "OffsetMin (Y)": -10.0,
          "OffsetMax (X)": 10.0,
          "OffsetMax (Y)": 10.0
        }
      },
      "Content": {
        "Background": {
          "Enabled?": true,
          "Visible": true,
          "Name": "PopUp.ServerCommands.Background",
          "Type (Label/Panel/Button/Image)": "Panel",
          "Color": {
            "HEX": "#000000",
            "Opacity (0 - 100)": 100.0
          },
          "Text": [],
          "Font Size": 14,
          "Font": 0,
          "Align": "UpperLeft",
          "Text Color": {
            "HEX": "#FFFFFF",
            "Opacity (0 - 100)": 100.0
          },
          "Command ({user} - user steamid)": "",
          "Image": "",
          "Cursor Enabled": false,
          "Keyboard Enabled": false,
          "Sprite": "",
          "Material": "",
          "AnchorMin (X)": 0.5,
          "AnchorMin (Y)": 0.5,
          "AnchorMax (X)": 0.5,
          "AnchorMax (Y)": 0.5,
          "OffsetMin (X)": -450.0,
          "OffsetMin (Y)": -175.0,
          "OffsetMax (X)": 450.0,
          "OffsetMax (Y)": 175.0
        },
        "Content Elements": [
          {
            "Enabled?": true,
            "Visible": true,
            "Name": "PopUp.ServerCommands.Banner",
            "Type (Label/Panel/Button/Image)": "Image",
            "Color": {
              "HEX": "#FFFFFF",
              "Opacity (0 - 100)": 100.0
            },
            "Text": [],
            "Font Size": 14,
            "Font": 0,
            "Align": "UpperLeft",
            "Text Color": {
              "HEX": "#FFFFFF",
              "Opacity (0 - 100)": 100.0
            },
            "Command ({user} - user steamid)": "",
            "Image": "https://gitlab.com/TheMevent/PluginsStorage/raw/main/Images/ServerPanel/serverpanel-popups-banner-commands.png",
            "Cursor Enabled": false,
            "Keyboard Enabled": false,
            "Sprite": "",
            "Material": "",
            "AnchorMin (X)": 0.0,
            "AnchorMin (Y)": 1.0,
            "AnchorMax (X)": 0.0,
            "AnchorMax (Y)": 1.0,
            "OffsetMin (X)": 4.0,
            "OffsetMin (Y)": -346.0,
            "OffsetMax (X)": 394.0,
            "OffsetMax (Y)": -4.0
          },
          {
            "Enabled?": true,
            "Visible": true,
            "Name": "PopUp.ServerCommands.HeaderIcon",
            "Type (Label/Panel/Button/Image)": "Image",
            "Color": {
              "HEX": "#FFFFFF",
              "Opacity (0 - 100)": 100.0
            },
            "Text": [],
            "Font Size": 14,
            "Font": 0,
            "Align": "UpperLeft",
            "Text Color": {
              "HEX": "#FFFFFF",
              "Opacity (0 - 100)": 100.0
            },
            "Command ({user} - user steamid)": "",
            "Image": "https://gitlab.com/TheMevent/PluginsStorage/raw/main/Images/ServerPanel/serverpanel-icon-commands.png",
            "Cursor Enabled": false,
            "Keyboard Enabled": false,
            "Sprite": "",
            "Material": "",
            "AnchorMin (X)": 0.0,
            "AnchorMin (Y)": 1.0,
            "AnchorMax (X)": 0.0,
            "AnchorMax (Y)": 1.0,
            "OffsetMin (X)": 410.0,
            "OffsetMin (Y)": -54.0,
            "OffsetMax (X)": 438.0,
            "OffsetMax (Y)": -26.0
          },
          {
            "Enabled?": true,
            "Visible": true,
            "Name": "PopUp.ServerCommands.HeaderTitle",
            "Type (Label/Panel/Button/Image)": "Label",
            "Color": {
              "HEX": "#FFFFFF",
              "Opacity (0 - 100)": 100.0
            },
            "Text": [
              "SERVER COMMANDS"
            ],
            "Font Size": 32,
            "Font": 0,
            "Align": "UpperLeft",
            "Text Color": {
              "HEX": "#CF432D",
              "Opacity (0 - 100)": 90.0
            },
            "Command ({user} - user steamid)": "",
            "Image": "",
            "Cursor Enabled": false,
            "Keyboard Enabled": false,
            "Sprite": "",
            "Material": "",
            "AnchorMin (X)": 0.0,
            "AnchorMin (Y)": 1.0,
            "AnchorMax (X)": 1.0,
            "AnchorMax (Y)": 1.0,
            "OffsetMin (X)": 448.0,
            "OffsetMin (Y)": -62.5,
            "OffsetMax (X)": -22.0,
            "OffsetMax (Y)": -17.5
          },
          {
            "Enabled?": true,
            "Visible": true,
            "Name": "PopUp.ServerCommands.Outline.1",
            "Type (Label/Panel/Button/Image)": "Panel",
            "Color": {
              "HEX": "#CF432D",
              "Opacity (0 - 100)": 100.0
            },
            "Text": [],
            "Font Size": 14,
            "Font": 0,
            "Align": "UpperLeft",
            "Text Color": {
              "HEX": "#FFFFFF",
              "Opacity (0 - 100)": 100.0
            },
            "Command ({user} - user steamid)": "",
            "Image": "",
            "Cursor Enabled": false,
            "Keyboard Enabled": false,
            "Sprite": "",
            "Material": "",
            "AnchorMin (X)": 0.0,
            "AnchorMin (Y)": 1.0,
            "AnchorMax (X)": 1.0,
            "AnchorMax (Y)": 1.0,
            "OffsetMin (X)": 0.0,
            "OffsetMin (Y)": -4.0,
            "OffsetMax (X)": 0.0,
            "OffsetMax (Y)": 0.0
          },
          {
            "Enabled?": true,
            "Visible": true,
            "Name": "PopUp.ServerCommands.Outline.2",
            "Type (Label/Panel/Button/Image)": "Panel",
            "Color": {
              "HEX": "#CF432D",
              "Opacity (0 - 100)": 100.0
            },
            "Text": [],
            "Font Size": 14,
            "Font": 0,
            "Align": "UpperLeft",
            "Text Color": {
              "HEX": "#FFFFFF",
              "Opacity (0 - 100)": 100.0
            },
            "Command ({user} - user steamid)": "",
            "Image": "",
            "Cursor Enabled": false,
            "Keyboard Enabled": false,
            "Sprite": "",
            "Material": "",
            "AnchorMin (X)": 0.0,
            "AnchorMin (Y)": 0.0,
            "AnchorMax (X)": 1.0,
            "AnchorMax (Y)": 0.0,
            "OffsetMin (X)": 0.0,
            "OffsetMin (Y)": 0.0,
            "OffsetMax (X)": 0.0,
            "OffsetMax (Y)": 4.0
          },
          {
            "Enabled?": true,
            "Visible": true,
            "Name": "PopUp.ServerCommands.Outline.3",
            "Type (Label/Panel/Button/Image)": "Panel",
            "Color": {
              "HEX": "#CF432D",
              "Opacity (0 - 100)": 100.0
            },
            "Text": [],
            "Font Size": 14,
            "Font": 0,
            "Align": "UpperLeft",
            "Text Color": {
              "HEX": "#FFFFFF",
              "Opacity (0 - 100)": 100.0
            },
            "Command ({user} - user steamid)": "",
            "Image": "",
            "Cursor Enabled": false,
            "Keyboard Enabled": false,
            "Sprite": "",
            "Material": "",
            "AnchorMin (X)": 0.0,
            "AnchorMin (Y)": 0.0,
            "AnchorMax (X)": 0.0,
            "AnchorMax (Y)": 1.0,
            "OffsetMin (X)": 0.0,
            "OffsetMin (Y)": 4.0,
            "OffsetMax (X)": 4.0,
            "OffsetMax (Y)": -4.0
          },
          {
            "Enabled?": true,
            "Visible": true,
            "Name": "PopUp.ServerCommands.Outline.4",
            "Type (Label/Panel/Button/Image)": "Panel",
            "Color": {
              "HEX": "#CF432D",
              "Opacity (0 - 100)": 100.0
            },
            "Text": [],
            "Font Size": 14,
            "Font": 0,
            "Align": "UpperLeft",
            "Text Color": {
              "HEX": "#FFFFFF",
              "Opacity (0 - 100)": 100.0
            },
            "Command ({user} - user steamid)": "",
            "Image": "",
            "Cursor Enabled": false,
            "Keyboard Enabled": false,
            "Sprite": "",
            "Material": "",
            "AnchorMin (X)": 1.0,
            "AnchorMin (Y)": 0.0,
            "AnchorMax (X)": 1.0,
            "AnchorMax (Y)": 1.0,
            "OffsetMin (X)": -4.0,
            "OffsetMin (Y)": 4.0,
            "OffsetMax (X)": 0.0,
            "OffsetMax (Y)": -4.0
          }
        ],
        "Use scrolling?": true,
        "Scroll Settings": {
          "Scroll": {
            "Scroll Type": "Vertical",
            "Movement Type": "Elastic",
            "Elasticity": 0.25,
            "Deceleration Rate": 0.3,
            "Scroll Sensitivity": 24.0,
            "Scrollbar Settings": {
              "Invert": false,
              "Auto Hide": false,
              "Handle Sprite": null,
              "Size": 3.0,
              "Handle Color": {
                "HEX": "#D74933",
                "Opacity (0 - 100)": 100.0
              },
              "Highlight Color": {
                "HEX": "#D74933",
                "Opacity (0 - 100)": 100.0
              },
              "Pressed Color": {
                "HEX": "#D74933",
                "Opacity (0 - 100)": 100.0
              },
              "Track Sprite": null,
              "Track Color": {
                "HEX": "#373737",
                "Opacity (0 - 100)": 100.0
              }
            },
            "AnchorMin (X)": 0.0,
            "AnchorMin (Y)": 0.0,
            "AnchorMax (X)": 1.0,
            "AnchorMax (Y)": 1.0,
            "OffsetMin (X)": 410.0,
            "OffsetMin (Y)": 20.0,
            "OffsetMax (X)": -22.0,
            "OffsetMax (Y)": -80.0
          },
          "Scroll Elements": [
            {
              "Enabled?": true,
              "Visible": true,
              "Name": "PopUp.ServerCommands.Description",
              "Type (Label/Panel/Button/Image)": "Label",
              "Color": {
                "HEX": "#FFFFFF",
                "Opacity (0 - 100)": 100.0
              },
              "Text": [
                "<color=#CF432D>/info</color> – open this menu",
                "<color=#CF432D>/trade player_name</color> – safe trade with other players",
                "<color=#CF432D>/online</color> – see how many players online",
                "<color=#CF432D>/shop</color> – open in-game shop",
                "<color=#CF432D>/kits</color> – open kits menu",
                "<color=#CF432D>/clan</color> – open clans menu",
                "<color=#CF432D>/tpr player_name</color> – send teleport request to other player",
                "<color=#CF432D>/tpa</color> – accept player teleport request",
                "<color=#CF432D>/tpc</color> – cancel player teleport request",
                "<color=#CF432D>/sethome home_name</color> – set your home location",
                "<color=#CF432D>/home home_name</color> – teleport to your home"
              ],
              "Font Size": 14,
              "Font": 1,
              "Align": "UpperLeft",
              "Text Color": {
                "HEX": "#E2DBD3",
                "Opacity (0 - 100)": 100.0
              },
              "Command ({user} - user steamid)": "",
              "Image": "",
              "Cursor Enabled": false,
              "Keyboard Enabled": false,
              "Sprite": "",
              "Material": "",
              "AnchorMin (X)": 0.0,
              "AnchorMin (Y)": 1.0,
              "AnchorMax (X)": 1.0,
              "AnchorMax (Y)": 1.0,
              "OffsetMin (X)": 0.0,
              "OffsetMin (Y)": -350.0,
              "OffsetMax (X)": 0.0,
              "OffsetMax (Y)": 0.0
            }
          ],
          "Scroll Height": 350.0
        }
      }
    }

 

Just add this new entry to the Pop Ups array in your config file.

 

Best regards,
Mevent

 

 

1.6m

Downloads

Total number of downloads.

7.7k

Customers

Total customers served.

116.2k

Files Sold

Total number of files sold.

2.4m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.