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.
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
endFunction Parameters
Prop
Type
Example Functions
GetMoney = function(Player, data)
return '$ ' .. Player?.PlayerData?.money?.cash
endGetBank = function(Player, data)
return '$ ' .. Player?.PlayerData?.money?.bank
endGetJob = function(Player, data)
return Player?.PlayerData?.job?.label or 'Unemployed'
endGetLevel = function(Player, data)
return 'Level ' .. (Player?.PlayerData?.metadata?.level or 1)
end3. 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