[FREE] [QB](wip)NPC Messaging Script

NPC Messaging Script

Description: This script allows players to send messages to a Discord webhook through interactions with NPCs in your FiveM GTA V roleplay server. It’s designed to be used for various businesses or job roles within the game, automating the process of sending messages and retrieving player information.

Features:

  • Message Sending: Players can interact with NPCs to send messages directly to a Discord webhook.
  • Automatic Character Info Retrieval: Retrieves and uses player information such as names and phone numbers automatically.
  • Customizable Message Input: Provides an input dialog for players to leave a message when interacting with an NPC.

How It Works:

  1. NPC Creation: NPCs are spawned at specific locations with assigned models and configurations.
  2. Player Interaction: When a player interacts with an NPC, the script fetches their character details and prompts them with a message input dialog.
  3. Message Handling: The entered message is sent along with the character information to a Discord webhook.

Current Status:

  • Work In Progress (WIP): This is my first script, and it’s currently a work in progress. Future updates will include additional features and improvements.
  • Feedback Requested: I welcome any feedback or suggestions as this is my first script.

Dependencies:

  • ox_target: For targeting NPCs for interaction.
  • ox_lib: For the input dialog functionality.

Installation Instructions:

  1. Add the script to your resources folder.
  2. Ensure that ox_target and ox_lib are also installed on your server.
  3. Add the script to your server.cfg or the relevant configuration file.

GitHub
image

Code is accessible Yes
Subscription-based No
Lines (approximately) Number of lines
Requirements ox_target, ox_lib, qb-core’
Support Yes
2 Likes

Additional with QB Target is a good idea!

Yea, maybe I’m going to look soon. Working on a new script