UZ Scripts
YoutubeDiscordStore
  • 👋Welcome to UZ Scripts
  • 🛠️Tebex Integration
  • Taintless
    • ❓・What is Taintless
    • Pause Menu
      • Announces
      • Custom Pages
      • Player Details
      • Social Online Time
    • Multicharacter
      • Installation Guide
      • Customize Configuration File
    • Vehicle Shop
    • Spawn Selector
Powered by GitBook
LogoLogo

Taintless

  • Pause Menu
  • Vehicle Shop
  • Multicharacter
  • Spawn Selector
  • Bundle#1
  • [Free] Pure Hud

Trygon

  • Loading Screen
  • Trygon Hud
  • Fuel
  • Garage

Typhon

  • Daily Rewards
  • Job Selector
  • Second Hand

UZ

  • Home
  • Blog
  • Scripts
On this page
  • Overview
  • 1. Defining Player Details in Customize.lua
  • Configuration Parameters
  • 2. Defining the Function in server/function.lua
  • Function Parameters
  • Example Functions
  • 3. Multiple Player Details
  • 4. Icon Customization
  • Icon Requirements
  • Available Default Icons
  • 5. Testing Your Customizations
  • Troubleshooting Steps
  • Example Debugging Function
  • Related Pages

Was this helpful?

Edit on GitHub
  1. Taintless
  2. Pause Menu

Player Details

PreviousCustom PagesNextSocial Online Time

Last updated 14 days ago

Was this helpful?

FiveM Pause Menu Script

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 like money, bank balance, job information, or any other server-specific data.

Customizable: You can display any player information by creating custom functions and linking them to the player details system.


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

Parameter
Type
Description

icon

String

Icon filename (stored in resources/images/PlayerDetails)

header

String

Display name/title for this detail

event

String

Function name in server/function.lua to fetch the data

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

Parameter
Type
Description

Player

Object

Player object containing all player data

data

Object

Content of PlayerDetails (icon, header, event)

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

Icon Name
Purpose

money.svg

Cash/Money display

bank.svg

Bank balance

job.svg

Job information

level.svg

Player level

health.svg

Health status


5. Testing Your Customizations

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

Troubleshooting Steps

  1. Check Console: Look for any Lua errors

  2. Verify Function Names: Ensure event names match function names

  3. Test Data: Make sure the player data structure is correct

  4. Icon Paths: Verify icon files exist in the correct directory

Debugging Tip: Use print() statements in your functions to debug data values during testing.

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

Related Pages

Custom Pages
Social Online Time