This script provides a dynamic NPC interaction system with configurable settings and an aesthetically pleasing UI for role-playing environments.
- Configurable interaction settings using
ox_target
orinteract
- Customizable NPC dialogues and commands
- Smooth animations and transitions
- Responsive design with adaptive styling for different screen sizes
For any questions, feedback, or assistance with using the NPC Interaction System, you can join our Discord server:
-
Clone the Repository
git clone https://github.com/fobozongithub/fobozo-npcdialogue.git
-
Navigate to the Directory
cd fobozo-npcdialogue
-
Install Dependencies Make sure you have the required dependencies installed, such as ox_target, or interact.
-
Add the Resource to Your Server Add the following line to your server configuration file (e.g.,
server.cfg
):ensure fobozo-npcdialogue
-
Start Your Server Restart your server or ensure the resource to apply the changes.
You can configure NPC settings in the shared.lua
file:
Shared = {}
Shared.interact = 'ox_target' -- or 'interact'
Shared.ReputationCommand = 'setReputation'
Shared.npcs = {
{
name = "Abu Salman",
text = "Hello, do you want to start or end your shift?",
job = "Burger Shot Employee",
ped = "csb_burgerdrug",
coords = vector4(-1191.25, -900.46, 12.98, 311.28),
ox_target = {
icon = 'fas fa-comments',
distance = 7.5
},
interact = {
distance = 7.5,
interactDst = 5
},
options = {
{
label = "Clock In/Out",
event = "menu-iRender:clockInOut",
type = "client",
args = {'clock'}
},
{
label = "Change Clothes",
event = "menu-iRender:changeClothes",
type = "client",
args = {'uniform'}
},
{
label = "Leave Conversation",
event = "fobozo-npcdialogue:hideMenu",
type = "client",
args = {}
},
}
},
}
Ensure that you have these dependencies installed and configured properly for the NPC Interaction System to work seamlessly.
By following the installation and configuration guide, you will have a fully functional NPC interaction system integrated into your role-playing environment. Customize the NPCs and dialogues to fit your server's theme and provide an engaging experience for your players.