FivePD API

FivePD 2.0 API Documentation

Welcome to the official documentation for the FivePD 2.0 API.

The API has been completely redesigned for a more streamlined and efficient developer experience. Please note that this new API is not backward-compatible with previous versions; addons will need to be updated.

Server-Side Addons

A fundamental change in FivePD 2.0 is that addons now run exclusively on the server. Consequently, the CitizenFX.Core.Client library is no longer accessible. This change was necessary to improve compatibility with OneSync and optimize the platform's overall performance.

To ease this transition, we have implemented a server-side wrapper that provides access to familiar components, such as Ped and Vehicle classes. The ICfxService interface provides access to native client functions, replicating the methods available in the client-side CitizenFX.Core.Native.API class.

Dependency Injection

Another significant architectural change is the adoption of dependency injection (DI). Instead of relying on singletons, the API now uses DI to create more modular, testable, and maintainable code. This pattern makes development more straightforward and less error-prone. Learn more in the Using Dependencies guide.

New Features

The new API exposes nearly all of FivePD's core functionalities, including all Mobile Data Terminal (MDT) interactions. This allows developers to create more immersive and realistic experiences for players.

This update is a substantial improvement over previous versions. With a streamlined design, enhanced compatibility, and a wealth of new features, we look forward to seeing the exciting new addons you create.