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:
- NPC Creation: NPCs are spawned at specific locations with assigned models and configurations.
- Player Interaction: When a player interacts with an NPC, the script fetches their character details and prompts them with a message input dialog.
- 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:
- Add the script to your
resources
folder. - Ensure that
ox_target
andox_lib
are also installed on your server. - Add the script to your
server.cfg
or the relevant configuration file.
Code is accessible | Yes |
Subscription-based | No |
Lines (approximately) | Number of lines |
Requirements | ox_target, ox_lib, qb-core’ |
Support | Yes |