Basic Configuration
This section covers how to configure the basic settings of the Advanced Ped Dialog script. By changing config.lua file.
Last updated
This section covers how to configure the basic settings of the Advanced Ped Dialog script. By changing config.lua file.
Last updated
true/false
You need to decide whether you will use interactions. If you don't need text over the ped's head and don't plan to use key interactions, set this to false
. This way, the script will not start the checking thread, avoiding unnecessary position checks in your situation.
number
Key to open ped dialog when you use key interaction to open it. You can find all key codes .
boolean
To make a player invisible locally while dialog is open set it to true
. (Other players can still see the player)
table
UI Configurations
imagePath
- the path to your images is designed to save file space by avoiding image duplication. You can load images from your inventory resources or your hosted CDN image storage. If you prefer to copy the images you want to use, replace this with ./images/
and upload your item images to the web/images/
directory.
defaultImageExtension
- the default extension for your images. Don't worry if some of your images are .jpg or other formats; you can still configure this when creating selling or buying menus.
moneyFormat
- how you want your server currency to be displayed for the players.
moneyColors
- you can specify different font colors for different currencies of your server.
table
Default camera settings for the ped. These settings will be used if specific camera settings are not defined for the created ped.
offset
- offset calculated from the ped position.
fov
- camera FOV
pointZOffset
- Z offset of PointCamAtEntity
function (text: string, coords: Vector3)
A function to display text over head.
Keep in mind that this function is called every frame don't add any heavy logic here.
This one should be easy to understand. The script uses string formatting, and the comments explain what each %s
in the format represents.
To use different messaged for different moneyType
, you can build locale like so:
['not_enough_${moneyType}']
= "Some message of money %s some item"