-
-
Notifications
You must be signed in to change notification settings - Fork 4
API
Description = Play Emote for player.
Param1 = PlayerController
Param2 = Emote name
Param3 = Ref error which will have the error if PlayEmote returns false.
Return = true if player was able to emote else false.
Description = Play Dance for player.
Param1 = PlayerController
Param2 = Dance name
Param3 = Ref error which will have the error if PlayEmote returns false.
Return = true if player was able to dance else false.
Description = Stop emote / dance for player if he/she is emoting/dancing.
Param1 = PlayerController
Return = nothing
Description = Returns emoting/dancing state of player
Param1 = PlayerController
Return = true if player is emoting/dancing else false.
Description = Returns true if player is ready for emoting/dancing.
Param1 = PlayerController
Return = true if player is ready for emoting/dancing else false.
Description = Returns list of all emotes available.
Description = Returns list of all dances available.
Description = It is called when a player tries to play an emote/dance
Return = returning HookResult.Handled || HookResult.Stop will stop emote/dance from playing for the player.
eg:
private readonly PluginCapability<IFortniteEmotesAPI> g_PluginCapability = new("FortniteEmotes");
private IFortniteEmotesAPI? FortniteEmotesApi;
public override void OnAllPluginsLoaded(bool hotReload)
{
FortniteEmotesApi = g_PluginCapability.Get();
if (FortniteEmotesApi == null) return;
FortniteEmotesApi.OnPlayerEmotePre += OnPlayerEmote;
}
public HookResult OnPlayerEmote(CCSPlayerController player, Emote emote)
{
if(emote.Name == "Dance")
{
player.PrintToChat("Dance is not allowed");
return HookResult.Stop;
}
return HookResult.Continue;
}