UZ Scripts
Pause Menu

Player Details

Configure custom player information display in Taintless Pause Menu.

Overview

Player details allow you to display custom information about players in the pause menu. This feature is highly customizable and can show various player statistics.

Customize.lua
function.lua

1. Defining Player Details in Customize.lua

Edit the PlayerDetails section in the Customize.lua file to adjust how you want to display player details.

PlayerDetails = {
    icon = 'money.svg',  -- icon file path (resources/images/PlayerDetails)
    header = 'Money',    -- header (e.g., "Money")
    event = 'GetMoney'   -- event to be called (defined in server/function.lua)
}

Configuration Parameters

Prop

Type

Important: The event name in PlayerDetails must match the function name in server/function.lua exactly.


2. Defining the Function in server/function.lua

Add the relevant function to the server/function.lua file to define how to obtain player details on the server side.

GetMoney = function(Player, data)
    return '$ ' .. Player?.PlayerData?.money?.cash
end

Function Parameters

Prop

Type

Example Functions

GetMoney = function(Player, data)
    return '$ ' .. Player?.PlayerData?.money?.cash
end
GetBank = function(Player, data)
    return '$ ' .. Player?.PlayerData?.money?.bank
end
GetJob = function(Player, data)
    return Player?.PlayerData?.job?.label or 'Unemployed'
end
GetLevel = function(Player, data)
    return 'Level ' .. (Player?.PlayerData?.metadata?.level or 1)
end

3. Multiple Player Details

You can display multiple player details by creating an array of detail objects:

PlayerDetails = {
    {
        icon = 'money.svg',
        header = 'Cash',
        event = 'GetMoney'
    },
    {
        icon = 'bank.svg',
        header = 'Bank',
        event = 'GetBank'
    },
    {
        icon = 'job.svg',
        header = 'Job',
        event = 'GetJob'
    }
}

Pro Tip: You can add as many player details as needed. Each will be displayed as a separate section in the pause menu.


4. Icon Customization

Icon Requirements

  • Format: SVG (recommended) or PNG
  • Size: 24x24 pixels or larger
  • Location: resources/images/PlayerDetails/
  • Style: Simple, clean icons work best

Available Default Icons

Prop

Type


5. Testing Your Customizations

After making all the adjustments, verify in-game that the information is displayed correctly.

Example Debugging Function

GetMoney = function(Player, data)
    print('Player Data:', json.encode(Player?.PlayerData))
    local cash = Player?.PlayerData?.money?.cash or 0
    print('Cash Amount:', cash)
    return '$ ' .. cash
end

On this page