CalloutInterfaceAPI 1.0.3

dotnet add package CalloutInterfaceAPI --version 1.0.3                
NuGet\Install-Package CalloutInterfaceAPI -Version 1.0.3                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CalloutInterfaceAPI" Version="1.0.3" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CalloutInterfaceAPI --version 1.0.3                
#r "nuget: CalloutInterfaceAPI, 1.0.3"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install CalloutInterfaceAPI as a Cake Addin
#addin nuget:?package=CalloutInterfaceAPI&version=1.0.3

// Install CalloutInterfaceAPI as a Cake Tool
#tool nuget:?package=CalloutInterfaceAPI&version=1.0.3                

CalloutInterfaceAPI Discord

CalloutInterfaceAPI is a library that makes interaction with the CalloutInterface plugin a breeze.

Getting Started

Rather than import and reference CalloutInterface.dll directly, the CalloutInterfaceAPI library serves as a safe interface between your callout pack and CalloutInterface. To get started, download the latest release and add CalloutInterfaceAPI.dll as a reference in your project. Then make sure to bundle the .dll with your project similar to how you would include RageNativeUI.dll (in the root Grand Theft Auto V folder).

You should NOT reference CalloutInterface directly.

</br>

Decorating your Callouts

One of the challenges of LSPDFR's callout system is that there is no separate description for callouts. Some callout developers understandably add unique identifiers to their callout names which can cause them to look odd in CalloutInterface. The solution is to extend LSPDFR's base CalloutInfoAttribute to add additional properties. This allows CalloutInterface to silently add your callouts to the MDT while the player is unavailable for calls. To support this functionality, you need to modify the decorators of your callouts:

Example

using CalloutInterfaceAPI;
using LSPD_First_Response.Mod.Callouts;

namespace ExampleNamespace
{
    [CalloutInterface("Your callout name", CalloutProbability.Medium, "A very useful description", "Code 2", "LSPD")]
    public class ExampleCallout : Callout

Note that the priority and agency are optional but you must provide a description. The description is what will show up in the CalloutInterface log, so it should be concise and reflect the general nature of your callout. It does not need to be unique.

Description Example

</br>

Sending Messages

While your callout is active, you can send messages to the MDT. You cannot use color codes, but newlines \n are supported. CalloutInterface uses a timer to prevent spamming of messages so you should not send multiple messages in a row.

Example

CalloutInterfaceAPI.Functions.SendMessage(this, "This is an example of a multi-line message.\nThis is the second line.\nPlease note, extremely long lines will be split up into chunks of no more than 60 characters.  The rest of this is just gibberish to demonstrate what it looks like.");

Message Example

</br>

Support

Please join my discord server and open a ticket for CalloutInterface and mention that you are a callout pack developer. I will add you to the CalloutInterfaceAPI channel.

Special Thanks

Thanks to Dylann24 and Charlie686 for being an early adopters and helping me test!

Product Compatible and additional computed target framework versions.
.NET Framework net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.3 224 6/1/2023
1.0.2 172 6/1/2023
1.0.1 179 6/1/2023