12/12/2018
In the dynamic world of roleplaying (RP) servers, the availability of essential services can fluctuate dramatically. One such service that often faces challenges is the taxi industry. When players who typically drive taxis are unavailable, or when the demand outstrips the supply of human drivers, a critical gap can emerge. This is precisely where the innovative concept of AI-driven NPC taxis, often referred to as 'blip discovery' in the context of mapping and navigation, steps in to fill the void, ensuring that players can still access vital transportation services.

The challenge of maintaining a consistent taxi service on an RP server is significant. If the player base shifts, or if players choose different roles, the taxi service can become unreliable. This is the problem that solutions like the RP-Taxi script aim to solve. By integrating non-player character (NPC) taxis, servers can guarantee that a taxi is always available, regardless of player activity. This not only enhances the realism and immersion of the server but also provides a crucial fallback mechanism for players who need to get from point A to point B.
The Challenge of RP Taxi Services
RP-Taxijob, as described, can indeed be challenging. The core issue arises when there simply aren't enough players taking on the role of taxi drivers. This can happen for various reasons, including a lack of interest, players opting for other in-game professions, or simply the natural ebb and flow of player activity. When the number of active taxi drivers dwindles, players who rely on this service are left stranded. This is where the concept of an 'AI taxi' or a 'NPC taxi' becomes invaluable. It ensures that the service continues to function, even when human drivers are scarce.
The decision to eliminate or supplement the player-driven taxi job with NPC taxis is a pragmatic one for many server administrators. It addresses the fundamental need for reliable transportation within the game world. Without it, players might find it difficult to engage in certain activities, meet up with others, or simply navigate the virtual city, which can detract from the overall roleplaying experience.
Introducing NPC Taxis: A Seamless Solution
The RP-Taxi script, and similar implementations, offer a robust solution by allowing players to summon an AI-controlled taxi. This system is designed to be user-friendly and integrated into existing communication tools within RP servers, such as the widely used 'gcPhone'.

Key Features of the NPC Taxi System:
- GCPhone Integration: Players can easily call an NPC taxi directly through their in-game gcPhone. This mimics real-world taxi-hailing services, enhancing immersion.
- Spawn Points: Both the NPC taxi driver and the taxi vehicle spawn at a designated location, typically 'Downtown Cab' in Los Santos. This location can often be customised in the script's configuration files (e.g., `config.lua`), allowing server owners to tailor it to their server's layout.
- Vehicle Customisation: Server administrators have the flexibility to change the taxi vehicle models and adjust their performance, such as top speed, through the configuration file.
- Navigation and Tracking: A crucial feature is the ability for players to track their summoned taxi. This is usually achieved through a moving 'blip' on the in-game minimap or fullscreen map, allowing players to see their taxi approaching.
- Seamless Pickup and Drop-off: Once the taxi arrives, the player enters the vehicle and sets a waypoint to their destination. The AI taxi then navigates to the specified location.
- Despawning: After successfully dropping the player off at their destination, the taxi vehicle and its NPC driver will despawn after a short period (e.g., 15 seconds) to optimise server resources.
- Driving Style Customisation: Advanced configurations allow server owners to define the driving behaviour of the NPC taxis. Resources like Vespura's driving style creator can be used to fine-tune how the AI vehicles navigate the city, making the experience more realistic.
- Multiple Spawn Locations: To improve efficiency and reduce waiting times, the system can be configured to have multiple spawn points for the taxi vehicles, intelligently selecting the nearest available spawn.
- Order Management: The system typically prevents players from calling multiple taxis simultaneously and offers an option to cancel an existing taxi order through the gcPhone.
The integration with gcPhone requires specific modifications to its server-side files, particularly the `esx_addons_gcphone` server script. This involves registering a new event to handle taxi calls and cancellations, routing them to the appropriate client-side events within the AI taxi script.
For instance, the server script needs to be updated to recognise a specific input, like the 'taxi' number and messages like 'i need a ride' or 'cancel', to trigger the client-side events `esx_aiTaxi:callTaxi` and `esx_aiTaxi:cancelTaxi` respectively. This ensures that when a player selects the taxi service on their gcPhone, the server correctly interprets the request and dispatches the AI taxi.
Configuration for GCPhone
To enable the taxi service within gcPhone, specific entries must be added to its `config.json` file. These entries define the taxi service as a contact or option within the phone's menu. This typically involves adding a new service call entry with a display name (e.g., "Taxi"), a background colour, and sub-menu options for ordering and cancelling a taxi. Each sub-menu option is linked to an event (like `esx_addons_gcphone:call`) and specifies the type of message to be sent to the server to initiate or cancel the taxi request.
| Feature | Player-Driven Taxis | AI NPC Taxis |
|---|---|---|
| Availability | Dependent on player activity | Consistent, always available |
| Reliability | Can be inconsistent | Highly reliable |
| Immersion | High (direct player interaction) | Moderate (simulated interaction) |
| Cost/Effort for Server | Lower initial setup, higher ongoing player management | Higher initial setup, lower ongoing player management |
| Realism | High (human drivers) | Moderate (AI behaviour) |
| Scalability | Limited by player count | Scales with server capabilities |
Understanding Blip Discovery
The term 'blip discovery' in this context refers to the system's ability to create and manage these visual markers (blips) on the game map. These blips are essential for players to locate their summoned taxis. The `easyblips` script, for example, allows for the creation of custom blips that can appear on the main map, minimap, or both. These blips can be highly customised in terms of colour, size, display mode, and sprite, making them easily distinguishable and informative.

Features of `easyblips` Script:
- Organised Data: Blip configurations are stored in tables, making them easy to manage and reuse.
- Multilingual Support: Blip labels can be displayed in multiple languages, catering to a diverse player base.
- Toggle Functionality: Players can use a command (e.g., `/toggleEasyBlips on/off`) to show or hide custom blips, giving them control over map clutter.
- Customisable Blips: Each blip can have its specific colour, scale, display mode (e.g., only visible when close), and sprite, offering granular control over their appearance.
- ESX Integration: For servers using the ESX framework, blips can be made visible only to players with specific jobs (e.g., only taxi drivers see taxi dispatch blips), adding another layer of roleplay authenticity.
- Standalone Option: The script is also available in a standalone version, meaning it can be used with any framework or even without one, offering broad compatibility.
The ability to dynamically create and manage blips is fundamental to the functionality of systems like the AI taxi. Without these visual cues, players would struggle to find their rides, defeating the purpose of the system.
What are ESX Features?
ESX, or 'es_extended', is a popular framework for FiveM servers that provides a robust foundation for creating roleplaying experiences. It includes a wide array of features that developers can leverage, such as:
- Player management
- Inventory systems
- Job systems
- Economy systems
- Vehicle management
- And much more...
When a script like `easyblips` or the AI taxi system mentions 'ESX Features', it typically refers to functionalities that are specifically designed to integrate with or enhance the ESX framework. For instance, the ability to make blips job-specific is an ESX feature, as it relies on the framework's job system to determine player roles and permissions.
Installation and Setup Considerations
Setting up an AI taxi system and a custom blip manager involves several steps:
- Download the Scripts: Obtain the necessary script files, usually from GitHub or other developer repositories.
- Install Dependencies: Ensure that all required frameworks and dependencies (like `es_extended` for ESX-specific features and `gcPhone`) are installed and running on your server.
- Configure Files: Edit configuration files (`config.lua`, `config.json`, etc.) to customise vehicle models, spawn points, blip appearance, and gcPhone integration.
- Integrate with gcPhone: Carefully follow the instructions to modify the `esx_addons_gcphone` server script and add the necessary entries to `config.json`.
- Test Thoroughly: After installation and configuration, conduct extensive testing to ensure all features are working as expected, addressing any known bugs or issues.
Known Bugs and Troubleshooting
As with any custom script, there may be occasional bugs. Common issues might include:
- Taxis not spawning correctly.
- Blips not appearing or updating.
- Issues with gcPhone integration.
- AI driving behaviour being unpredictable.
Troubleshooting often involves checking server console logs for errors, verifying configuration file syntax, ensuring script compatibility, and sometimes consulting the script's documentation or developer support.
The Future of Virtual Transportation
The implementation of AI NPC taxis represents a significant step forward in creating more stable and immersive RP servers. By addressing the inherent challenges of player-driven services, these systems ensure that core functionalities remain accessible to all players. As technology advances and scripting capabilities grow, we can expect even more sophisticated AI integrations, potentially including dynamic pricing, advanced route optimisation, and even AI-controlled public transport systems, further enriching the virtual worlds RP servers strive to create.
If you want to read more articles similar to Revolutionising RP Servers with AI Taxis, you can visit the Taxis category.
