Skip to content

API v1.0.1

Daniel K edited this page Jul 10, 2020 · 1 revision

FivePD API Update 1.0.1

IsPlayerOnDuty

Returns whether the player is on/off duty.

Returns: <bool>

Example:

if(Utilities.IsPlayerOnDuty())
{
   // Player is on duty
   ...
}

SetPlayerDuty

Sets player duty status (on/off).

Params:

  • onDuty <bool>

Example:

...
SetPlayerDuty(true); // To set the player on duty
...

RequestService

Now you can request every FivePD service from plugins. From 1.0.1, you don't need to pass the location (Vector3).

Services:

  • Ambulance
  • AirAmbulance
  • FireDept
  • Coroner
  • AnimalControl
  • TowTruck
  • Mechanic
  • PrisonTransport

Example:

RequestService(Services.Ambulance);

GetPlayerData

Extended with DepartmentShortname.

Documentation

Clone this wiki locally