hanf vielleicht fertig
This commit is contained in:
@@ -4,7 +4,7 @@ const animationSyncData =
|
||||
{
|
||||
animations: [],
|
||||
|
||||
register: function (name, animDict, animName, duration, loop, flag, endless) {
|
||||
register: function (name, animDict, animName, duration, loop, flag, endless, eventAfter: string = null) {
|
||||
let id = mp.game.joaat(name);
|
||||
|
||||
if (!this.animations.hasOwnProperty(id)) {
|
||||
@@ -17,7 +17,8 @@ const animationSyncData =
|
||||
duration: duration,
|
||||
loop: loop,
|
||||
flag: flag,
|
||||
endless: endless
|
||||
endless: endless,
|
||||
eventAfter: eventAfter
|
||||
};
|
||||
} else {
|
||||
mp.game.graphics.notify("Animation Sync Error: ~r~Duplicate Entry");
|
||||
@@ -50,6 +51,10 @@ export default function animationSync() {
|
||||
animationSyncData.register("hup", "mp_am_hold_up", "handsup_base", -1, true, 50, true);
|
||||
animationSyncData.register("carryBox", "anim@heists@box_carry@", "idle", -1, true, 50, true);
|
||||
animationSyncData.register("manufacturJoint", "anim@mp_snowball", "pickup_snowball", 1000 * 10, false, 1, false);
|
||||
//animationSyncData.register("harvestPlantEnter", "amb@world_human_gardener_plant@female@enter", "enter_female", 1000 * 3.5, false, 1, false);
|
||||
animationSyncData.register("harvestPlant", "amb@world_human_gardener_plant@male@base", "base", 1000 * 10, false, 1, false, "Hanf_FinishDiggingAnimation");
|
||||
//animationSyncData.register("harvestPlantExit", "amb@world_human_gardener_plant@female@exit", "exit_female", 1000 * 3.5, false, 1, false, "Hanf_FinishDiggingAnimation");
|
||||
animationSyncData.register("jointUse", "amb@world_human_smoking_pot@male@base", "base", 1000 * 10, false, 1, false);
|
||||
});
|
||||
|
||||
const animationBreakMessage = [
|
||||
@@ -115,7 +120,7 @@ export default function animationSync() {
|
||||
|
||||
let animData = animationSyncData.animations[index];
|
||||
|
||||
let { id, name, animDict, animName, duration, loop, flag, endless } = animData;
|
||||
let { id, name, animDict, animName, duration, loop, flag, endless, eventAfter } = animData;
|
||||
|
||||
loadAnimDict(animDict, function () {
|
||||
mp.players.exists(entity) && 0 !== entity.handle && entity.taskPlayAnim(animDict, animName, 1, 0, duration, parseInt(flag), 0, !1, !1, !1)
|
||||
@@ -130,6 +135,9 @@ export default function animationSync() {
|
||||
let a = setTimeout(function () {
|
||||
clearTimeout(a);
|
||||
mp.events.callRemote("CLIENT:ClearAnimationData", true);
|
||||
if (eventAfter) {
|
||||
mp.events.callRemote("CLIENT:" + eventAfter);
|
||||
}
|
||||
}, duration);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user