Setup
AI Taxi Setup Instructions
Configuration
Add the script to your server config.
Open the config.lua
and make any necessary adjustments.
Make sure to update the framework / script configuration section with the relevant scripts that you use.
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:
Framework
Notify
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
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
.
With this config option, you can specify the locations where the taxi will spawn if a player is within a radius of specific coordinates.
This can be useful if you want to control specifically where the taxi spawns at some locations.
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.
Last updated