test
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
export default function animationSync() {
|
export default function animationSync() {
|
||||||
mp.events.add("SERVER:LoadAnimations", () => {
|
mp.events.add("SERVER:LoadAnimations", () => {
|
||||||
animationSync.register("Cuffed", "mp_arresting", "idle", true, true, 18);
|
animationSync.register("Cuffed", "mp_arresting", "idle", true, true, 18);
|
||||||
animationSync.register("ArrestCop", "mp_arrest_paired", "cop_p2_back_right", false, false, 0);
|
animationSync.register("ArrestCop", "mp_arrest_paired", "cop_p2_back_right", false, false, 18);
|
||||||
animationSync.register("ArrestCrook", "mp_arrest_paired", "crook_p2_back_right", false, false, 0);
|
animationSync.register("ArrestCrook", "mp_arrest_paired", "crook_p2_back_right", false, false, 0);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -9,12 +9,12 @@
|
|||||||
{
|
{
|
||||||
animations: [],
|
animations: [],
|
||||||
|
|
||||||
playAnim: function (entity, _id) {
|
playAnim: function (entity: PlayerMp, _id) {
|
||||||
if (this.animations.hasOwnProperty(_id)) {
|
if (this.animations.hasOwnProperty(_id)) {
|
||||||
let currentAnim = this.animations[_id];
|
let currentAnim = this.animations[_id];
|
||||||
let { id, name, animDict, animName, playOnStream, loop, flag } = currentAnim;
|
let { id, name, animDict, animName, playOnStream, loop, flag } = currentAnim;
|
||||||
loadAnimDict(animDict, function () {
|
loadAnimDict(animDict, function () {
|
||||||
mp.players.exists(entity) && 0 !== entity.handle && entity.taskPlayAnim(animDict, animName, 2, 0, -1, parseInt(flag), 1, !1, !1, !1)
|
mp.players.exists(entity) && 0 !== entity.handle && entity.taskPlayAnim(animDict, animName, 1, 0, -1, parseInt(flag), 0, !1, !1, !1)
|
||||||
});
|
});
|
||||||
entity.animationData = { name: name, playOnStream: playOnStream };
|
entity.animationData = { name: name, playOnStream: playOnStream };
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user