UZ Scripts
Pause Menu

Custom Pages

Create interactive custom page buttons in Taintless Pause Menu with events and visual customization.

Overview

Custom pages allow you to create interactive buttons that link to specific features or events in your server.

Customize.lua

1. Defining Custom Pages in Customize.lua

You can define custom pages by editing the CustomPage section in the Customize.lua file.

CustomPage = {  -- event (client side)
    { color = '#FBCA79', text = 'GAME SHOP',   background = 'GameShop.png',   event = '' },
    { color = '#00f37a', text = 'Vip Cars',    background = 'VipCarShop.png', event = '' },
    { color = '#77CDCC', text = 'Weapon Shop', background = 'WeaponShop.png', event = '' },
}

Configuration Parameters

ParameterTypeDescription
colorStringHex color code for the button text
textStringLabel displayed on the button
backgroundStringBackground image filename (stored in resources/images/CustomPage)
eventStringClient-side event name to trigger when clicked

Important: Background images must be placed in the resources/images/CustomPage directory.


2. Adding Events for Custom Pages

To make these buttons interactive, you need to add a client-side event. For example, if you want the GAME SHOP button to open the game shop interface, you should define an event in your client-side script.

Example Client-Side Event

RegisterNetEvent('OpenGameShop', function()
    -- Code to open the game shop interface
    print('Game Shop opened')
    -- Add your custom logic here
end)

Updated Configuration

CustomPage = {
    { color = '#FBCA79', text = 'GAME SHOP', background = 'GameShop.png', event = 'OpenGameShop' },
    { color = '#00f37a', text = 'Vip Cars', background = 'VipCarShop.png', event = 'OpenVipCars' },
    { color = '#77CDCC', text = 'Weapon Shop', background = 'WeaponShop.png', event = 'OpenWeaponShop' },
}

Pro Tip: Event names must match exactly between your configuration and your client-side event handlers!


3. Customizing Button Appearance

Color Selection

The color attribute allows you to define how each button looks, enabling visual differentiation between custom pages. Choose colors that fit well with your overall design for better user experience.

Background Images

Background images can be customized to visually represent the purpose of each button:

  • Use shopping-related imagery for Game Shop
  • Use car imagery for VIP Cars
  • Use weapon imagery for Weapon Shop

Path: resources/images/CustomPage/ Examples:

  • GameShop.png
  • VipCarShop.png
  • WeaponShop.png

4. Testing Your Custom Pages

After making changes, verify each button works correctly:

Restart the Resource

Restart the resource after any configuration changes.

Check Console

Look for any Lua errors in the server console.

Test Each Button

Test each button individually to verify the correct event is triggered.

Verify Visuals

Ensure colors, background images, and interactive elements render properly.

On this page