Theme editor

Scripts Npc Mechanic ESX

npcmechanic.webp


NPC Mechanic brings an advanced AI-driven roadside assistance experience to your FiveM server.
Players can call an NPC mechanic through the Quasar Smartphone (qs-smartphone) or, optionally, with the /chamarmecanico command.


The NPC mechanic drives a tow truck from the configured base, navigates dynamically to the player’s location, repairs their vehicle, processes payment automatically, and returns to base — all without player intervention.

📱 Quasar Phone integration
Fully compatible with qs-smartphone. Players can call the configured mechanic number, and the NPC will automatically respond and head to their position.
(You can disable phone usage via Config.UsePhone = false to use only the command instead.)
  • 🤖 Smart AI Navigation
    The mechanic uses realistic driving tasks (TaskVehicleDriveToCoordLongrange) and despawns only after leaving player sight, simulating a natural workflow.
  • 💰 Dynamic Pricing System
    The total repair price is calculated based on distance (per kilometer).
    A configurable percentage automatically goes to the society account (e.g., society_mechanic).
  • 🧠 Intelligent Service Logic
    • NPC mechanics can only be called when there are no human mechanics on duty.
    • Cooldowns prevent spam requests.
    • Max concurrent NPCs configurable via Config.MaxConcurrentNPCs.
  • 🔒 Secure Token System
    • Each NPC service call generates a unique token with HMAC-style verification.
    • Prevents exploit attempts, fake triggers, or duplicated payments.
  • 📊 Discord Webhook Logging
    • Optional JSON embed logs for every event: call, cancel, and payment.
  • 🌍 Configurable Base Location
    • Define your own mechanic base using vector4(x, y, z, heading).
    • The NPC spawns there and drives to the player using natural pathfinding.
  • 🔧 Realistic Repair Animation
    • Mechanic exits the truck, plays a “repair vehicle” scenario, fixes all damage, and restarts the engine.

 
Last edited by a moderator:
Resource 'QBCore V2 FiveM RP base'
The Toxic QBCore V2 RP Server is a fully open-source, ready-to-use FiveM RP server base, built...
Resource 'Toxic QBCore Server files'
Toxic QBCore Latest Server files - Fivem rp base - Download fivem server Open source・No...
Resource 'Toxic ESX legacy  | Server Files'
Toxic ESX legacy | Server File ✔ Latest ESX Legacy Framework ✔ Fully Open-Source – No...
Resource 'V3 pvp Server File'
Download the Toxic V3 PVP Server File with the old ESX framework. Includes a fully configured...
Resource 'Sandy Shores - REBORN'
GTA V Interior: Sandy Shores Reborn – FiveM MLO custom maps with detailed interiors.
Resource 'Molo narcos island FiveM Mafia pack'
Molo Narcos Island – FiveM Mafia MLO pack with custom cartel maps and detailed interiors.
Resource 'Molo House Cayo Perico & Los santos'
Molo House Cayo Perico & Los Santos – FiveM MLO houses with custom Cayo Perico maps.
Resource 'Altruist Camp GTA V Roleplay Base – FiveM MLO'
A dangerous place for some, but home for others! Experience how the ancestors and the outcasts...
Resource 'Nteam Police department + Hospital'
Nteam Police Department + Hospital MLO – Free open source FiveM maps and interiors.
Resource 'WC Clothing Pack'
WC Clothing Pack FiveM Download the WC Clothing Pack for FiveM – a high-quality standalone...
Resource 'Non-Branded Clothing'
FiveM Non-Branded Clothing Pack 5GB Download the 5GB Knocks Non-Branded Clothing Pack for...
Resource 'Toy Cars BMW, Bugatti & More'
Download the FiveM Toy Cars Pack featuring BMW, Bugatti, and more! Perfect for adding a fun and...
Resource 'Car Pack 15+ Vehicles'
Download the FiveM Car Pack 2025 with 15+ unique vehicles, including Audi Monster, Super Cars...
Resource 'Vehicle Pack Unbranded Cars'
Download FiveM Unbranded Cars Pack. A collection of high-quality non-branded vehicles for...
Resource 'LSPD & EMS 45 Unbranded Vehicle Pack'
🔥 What’s Inside the FiveM LSPD & EMS Vehicle Pack? Upgrade your FiveM roleplay server with this...
Resource 'Roxwood County'
What is Roxwood County? Roxwood county is a map expansion which offers a whole new land mass on...
Resource 'Energy Fast customs Mlo ( clothes + vehicles )'
Energy Fast Customs MLO – FiveM maps for clothes shops and vehicle garages.
Resource 'Molo LSPD HQ'
Molo LSPD HQ – Free FiveM MLO police headquarters map with custom offices and interiors.
Resource 'Molo unicorn'
Molo Unicorn FiveM MLO – Custom nightclub map with detailed roleplay interiors.
Resource 'Artex Cardealer Paleto'
A brand new, totally flawless, totally needed place in Paleto Bay right now! Artex Cardealer...
Back
Top Bottom