Waypoint Scripts
  • Waypoint Scripts
  • Store
  • Support Discord
  • Scripts
    • 🚑Waypoint AI EMS
      • 📝Setup
      • 🖥️Code Snippets
      • ❔FAQ
      • 📃Exports / Events
      • 🔢Telemetry
    • 🚕Waypoint AI Taxi
      • 📝Setup
      • 🖥️Code Snippets
      • 📃Exports / Events
      • 🔢Telemetry
    • 🎆Waypoint Fireworks
      • 📝Setup
    • 💡Waypoint Neons
      • 📝Setup
    • 🐕Waypoint Animals
      • 📝Setup
      • ❔FAQ
  • Free Scripts
    • 🚚Waypoint Tow / Hauling
    • 🛠️Waypoint Placeables
    • 🚦Waypoint Traffic Lights
    • 🧘‍♂️Waypoint Yogamats
    • 🖨️Waypoint Printer
    • 🚲Waypoint Pocket Bikes
    • 👻Waypoint Smoke Monster
    • 🪑Waypoint Seats
Powered by GitBook
On this page
  • Configuration
  • Framework Implementations
  • Call Taxi
  • Example Usage
  • Command
  • Client Event
  • Optional Setup
  • Additional Notes
  1. Scripts
  2. Waypoint AI Taxi

Setup

AI Taxi Setup Instructions

Configuration

Add the script to your server config.

Open the config.luaand make any necessary adjustments.

Make sure to update the framework / script configuration section with the relevant scripts that you use.

If you select any OX script (or script that uses ox), be sure to uncomment the @ox_lib/init.lua line in the fxmanifest.

Framework Implementations

External script implementations are handled in the framework.lua file. This file provides the necessary functions and hooks to integrate with different frameworks and scripts.

Out of the box, the script includes implementations for:

qb
qbx
esx
ox

Framework

Notify

LegacyFuel
ox_fuel
ps-fuel

Fuel

If you are using a different framework or script, you will need to add the relevant implementations in the framework.lua file.

Call Taxi

Setup the various ways you want players to be able to call a taxi.

Example Usage

  • Call taxi via command

  • Integrate into your phone to call taxi from a phone app, calling a predefined phone contact, or dialing a specific number on the phon

Command

/calltaxi

/canceltaxi

Enable/Disable command with: Config.EnableCallTaxiCommand.

The string for the command can be modified in the Config.

Client Event

-- This is called on the client and will dispatch a taxi to the players current location
TriggerClientEvent('wp-ai-taxi:client:DispatchAITaxi')

Optional Setup

Edit the client event wp-ai-taxi:client:notEnoughMoney in client.lua

  • This function is called when a player does not have enough money to pay for the taxi ride. By default the taxi driver will trigger a relevant voice line. However this can also be used to trigger other events such as triggering a "failed to pay" police alert.

Override Taxi Spawn Location

If you want to override the taxi spawn location based on where the player called it from, you can use Config.LocationOverrides.

  1. With this config option, you can specify the locations where the taxi will spawn if a player is within a radius of specific coordinates.

  2. This can be useful if you want to control specifically where the taxi spawns at some locations.

  3. The override location must be within 400m of the override location.

Additional Notes

  • AI navigation is far from perfect. There is no guarantee that the AI Taxi will be able to reach your location. There are plenty of variables and obstacles that can result in the AI not reaching a player including but not limited to: player location, traffic, other players, etc.

  • The AI Taxi will try to navigate as close to the location where the player calls them from, so the player needs to be mindful that they are in an accessible area before calling AI Taxi.

  • The AI Taxi tends to have the most difficulties, when the person is far away from the road, in tight alleyways, on roof tops, or other hard to reach areas. The success rate, is highly dependent on the location that the AI Taxi is dispatched to.

PreviousWaypoint AI TaxiNextCode Snippets

Last updated 1 month ago

Support Discord:

🚕
📝
https://discord.gg/3B6bznh4mV