/fobozo-npcdialogue

This script provides a dynamic NPC interaction system with configurable settings and an aesthetically pleasing UI for role-playing environments.

Primary LanguageLuaMIT LicenseMIT

NPC Interaction System

This script provides a dynamic NPC interaction system with configurable settings and an aesthetically pleasing UI for role-playing environments.

Features

  • Configurable interaction settings using ox_target or interact
  • Customizable NPC dialogues and commands
  • Smooth animations and transitions
  • Responsive design with adaptive styling for different screen sizes

Support

For any questions, feedback, or assistance with using the NPC Interaction System, you can join our Discord server:

Discord

Preview

NPC Interaction UI

Installation Guide

  1. Clone the Repository

    git clone https://github.com/fobozongithub/fobozo-npcdialogue.git
  2. Navigate to the Directory

    cd fobozo-npcdialogue
  3. Install Dependencies Make sure you have the required dependencies installed, such as ox_target, or interact.

  4. Add the Resource to Your Server Add the following line to your server configuration file (e.g., server.cfg):

    ensure fobozo-npcdialogue
    
  5. Start Your Server Restart your server or ensure the resource to apply the changes.

Configuration

Shared Configuration

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 = {} 
            },
        }
    },
}

Dependencies

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.