samen kaufen und hanf -> joint
This commit is contained in:
@@ -1,5 +1,42 @@
|
||||
import { debug } from "util";
|
||||
|
||||
const animationSyncData =
|
||||
{
|
||||
animations: [],
|
||||
|
||||
register: function (name, animDict, animName, duration, loop, flag, endless) {
|
||||
let id = mp.game.joaat(name);
|
||||
|
||||
if (!this.animations.hasOwnProperty(id)) {
|
||||
this.animations[id] =
|
||||
{
|
||||
id: id,
|
||||
name: name,
|
||||
animDict: animDict,
|
||||
animName: animName,
|
||||
duration: duration,
|
||||
loop: loop,
|
||||
flag: flag,
|
||||
endless: endless
|
||||
};
|
||||
} else {
|
||||
mp.game.graphics.notify("Animation Sync Error: ~r~Duplicate Entry");
|
||||
}
|
||||
},
|
||||
|
||||
getAnimFromId: function (name: string): { dict: string, name: string } {
|
||||
var anim = this.animations[mp.game.joaat(name)];
|
||||
return {
|
||||
dict: anim.animDict,
|
||||
name: anim.animName
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export function getAnimFromId(name: string) {
|
||||
return animationSyncData.getAnimFromId(name);
|
||||
}
|
||||
|
||||
export default function animationSync() {
|
||||
let blockInput = false;
|
||||
let animationBreakTimer;
|
||||
@@ -12,37 +49,13 @@ export default function animationSync() {
|
||||
animationSyncData.register("getUncuff", "mp_arresting", "b_uncuff", 5500, false, 0, false);
|
||||
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);
|
||||
});
|
||||
|
||||
const animationBreakMessage = [
|
||||
{ animName: "Cuffed", msg: "Handschellen gebrochen." }
|
||||
];
|
||||
|
||||
const animationSyncData =
|
||||
{
|
||||
animations: [],
|
||||
|
||||
register: function (name, animDict, animName, duration, loop, flag, endless) {
|
||||
let id = mp.game.joaat(name);
|
||||
|
||||
if (!this.animations.hasOwnProperty(id)) {
|
||||
this.animations[id] =
|
||||
{
|
||||
id: id,
|
||||
name: name,
|
||||
animDict: animDict,
|
||||
animName: animName,
|
||||
duration: duration,
|
||||
loop: loop,
|
||||
flag: flag,
|
||||
endless: endless
|
||||
};
|
||||
} else {
|
||||
mp.game.graphics.notify("Animation Sync Error: ~r~Duplicate Entry");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
mp.events.add("entityStreamIn", (entity) => {
|
||||
if (entity.type === "player" && entity.animationData) {
|
||||
@@ -90,6 +103,7 @@ export default function animationSync() {
|
||||
clearTimeout(animationBreakTimer);
|
||||
animationBreakTimer = null;
|
||||
}
|
||||
|
||||
if (string == null) {
|
||||
blockInput = false;
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user