diff --git a/packages/core/src/controllers/player/entity.ts b/packages/core/src/controllers/player/entity.ts index 92ec341..2c30690 100644 --- a/packages/core/src/controllers/player/entity.ts +++ b/packages/core/src/controllers/player/entity.ts @@ -7,6 +7,7 @@ import type { WeaponEnum, WeaponStatesEnum, BoneIdsEnum, + ForceSyncEnum, } from "../../enums"; import { @@ -551,7 +552,7 @@ export class Player { lockX = true, lockY = true, freeze = false, - forceSync = false, + forceSync: boolean | ForceSyncEnum = false, ): void { const duration = getAnimateDurationByLibName(animLib, animName); if (duration === undefined) @@ -566,7 +567,7 @@ export class Player { lockY, freeze, loop ? 0 : duration, - forceSync, + +forceSync, ); } clearAnimations(forceSync = false): void { diff --git a/packages/core/src/enums/player.ts b/packages/core/src/enums/player.ts index 9a347d2..469c34e 100644 --- a/packages/core/src/enums/player.ts +++ b/packages/core/src/enums/player.ts @@ -90,3 +90,10 @@ export enum BoneIdsEnum { Neck, Jaw, } + +export enum ForceSyncEnum { + UNKNOWN = -1, + NONE = 0, + ALL = 1, + OTHER = 2, +} diff --git a/packages/core/src/wrapper/native/player.ts b/packages/core/src/wrapper/native/player.ts index 973a63c..c0b27cd 100644 --- a/packages/core/src/wrapper/native/player.ts +++ b/packages/core/src/wrapper/native/player.ts @@ -666,7 +666,7 @@ export const ApplyAnimation = ( lockY: boolean, freeze: boolean, time: number, - forceSync: boolean, + forceSync: number, ): number => { return samp.callNative( "ApplyAnimation",