diff --git a/scripts/client/animation.js b/scripts/client/animation.js index 1c9a2d2c..abc1b713 100644 --- a/scripts/client/animation.js +++ b/scripts/client/animation.js @@ -7,45 +7,81 @@ // TYPE: Client (JavaScript) // =========================================================================== -function makePedPlayAnimation(pedId, animGroup, animId, animType, animSpeed, loop, loopNoControl, freezeLastFrame, returnToOriginalPosition, freezePlayer) { - logToConsole(LOG_DEBUG, `[VRR.Animation] Playing animation ${animGroup}/${animId} for ped ${pedId}`); +function makePedPlayAnimation(pedId, animationSlot, positionOffset) { + let animationData = getAnimationData(animationSlot); + logToConsole(LOG_DEBUG, `[VRR.Animation] Playing animation ${animationData[0]} for ped ${pedId}`); + + let freezePlayer = false; + switch(animationData.moveType) { + case VRR_ANIMMOVE_FORWARD: + setElementCollisionsEnabled(ped, false); + setElementPosition(ped, getPosInFrontOfPos(getElementPosition(ped), fixAngle(getElementHeading(ped)), positionOffset)); + freezePlayer = true; + break; + + case VRR_ANIMMOVE_BACK: + setElementCollisionsEnabled(ped, false); + setElementPosition(ped, getPosBehindPos(getElementPosition(ped), fixAngle(getElementHeading(ped)), positionOffset)); + freezePlayer = true; + break; + + case VRR_ANIMMOVE_LEFT: + setElementCollisionsEnabled(ped, false); + setElementPosition(ped, getPosToLeftOfPos(getElementPosition(ped), fixAngle(getElementHeading(ped)), positionOffset)); + freezePlayer = true; + break; + + case VRR_ANIMMOVE_RIGHT: + setElementCollisionsEnabled(ped, false); + setElementPosition(ped, getPosToRightOfPos(getElementPosition(ped), fixAngle(getElementHeading(ped)), positionOffset)); + freezePlayer = true; + break; + + default: + break; + } + if(getGame() < VRR_GAME_GTA_IV) { - if(animType == VRR_ANIMTYPE_NORMAL || animType == VRR_ANIMTYPE_SURRENDER) { + if(animationData.animType == VRR_ANIMTYPE_NORMAL || animationData.animType == VRR_ANIMTYPE_SURRENDER) { if(getGame() == VRR_GAME_GTA_VC || getGame() == VRR_GAME_GTA_SA) { getElementFromId(pedId).clearAnimations(); } else { getElementFromId(pedId).clearObjective(); } - getElementFromId(pedId).addAnimation(animGroup, animId); + getElementFromId(pedId).addAnimation(animationData.groupId, animationData.animId); if(getElementFromId(pedId) == localPlayer && freezePlayer == true) { inAnimation = true; setLocalPlayerControlState(false, false); localPlayer.collisionsEnabled = false; } - } else if(animType == VRR_ANIMTYPE_BLEND) { + } else if(animationData.animType == VRR_ANIMTYPE_BLEND) { getElementFromId(pedId).position = getElementFromId(pedId).position; - getElementFromId(pedId).blendAnimation(animGroup, animId, animSpeed); + getElementFromId(pedId).blendAnimation(animationData.groupId, animationData.animId, animationData.animSpeed); } } else { - natives.requestAnims(animGroup); - natives.taskPlayAnimNonInterruptable(getElementFromId(pedId), animId, animGroup, animSpeed, loop, loopNoControl, freezeLastFrame, returnToOriginalPosition, -1); + natives.requestAnims(animationData.groupId); + natives.taskPlayAnimNonInterruptable(getElementFromId(pedId), animationData.groupId, animationData.animId, animationData.animSpeed, boolToInt(animationData.infiniteLoop), boolToInt(animationData.infiniteLoopNoMovement), boolToInt(animationData.dontReturnToStartCoords), boolToInt(animationData.freezeLastFrame), -1); } } // =========================================================================== -function forcePedAnimation(pedId, animGroup, animId, animType, animSpeed, loop, loopNoControl, freezeLastFrame, returnToOriginalPosition) { +function forcePedAnimation(pedId, animSlot) { + let animationData = getAnimationData(animSlot); + if(getGame() < VRR_GAME_GTA_IV) { - forcedAnimation = [animGroup, animId]; getElementFromId(pedId).position = getElementFromId(pedId).position; - getElementFromId(pedId).addAnimation(animGroup, animId); + getElementFromId(pedId).addAnimation(animationData.groupId, animationData.animId); if(getElementFromId(pedId) == localPlayer) { inAnimation = true; setLocalPlayerControlState(false, false); localPlayer.collisionsEnabled = false; } + } else { + natives.requestAnims(animationData.groupId); + natives.taskPlayAnimNonInterruptable(getElementFromId(pedId), animationData.groupId, animationData.animId, animationData.animSpeed, boolToInt(animationData.infiniteLoop), boolToInt(animationData.infiniteLoopNoMovement), boolToInt(animationData.dontReturnToStartCoords), boolToInt(animationData.freezeLastFrame), -1); } } @@ -72,4 +108,14 @@ function makePedStopAnimation(pedId) { } } +// =========================================================================== + +/** + * @param {number} animationSlot - The slot index of the animation + * @return {Array} The animation's data (array) + */ + function getAnimationData(animationSlot, gameId = getGame()) { + return getGameConfig().animations[gameId][animationSlot]; +} + // =========================================================================== \ No newline at end of file diff --git a/scripts/server/animation.js b/scripts/server/animation.js index 3f4fde4f..1257043b 100644 --- a/scripts/server/animation.js +++ b/scripts/server/animation.js @@ -39,7 +39,7 @@ function playPlayerAnimationCommand(command, params, client) { } if(isPlayerHandCuffed(client) || isPlayerTazed(client) || isPlayerInForcedAnimation(client)) { - messagePlayerError(client, `You aren't able to do that`); + messagePlayerError(client, getLocaleString(client, "UnableToDoThat")); return false; } @@ -51,7 +51,7 @@ function playPlayerAnimationCommand(command, params, client) { function stopPlayerAnimationCommand(command, params, client) { if(isPlayerHandCuffed(client) || isPlayerTazed(client) || isPlayerInForcedAnimation(client)) { - messagePlayerError(client, `You aren't able to do that`); + messagePlayerError(client, getLocaleString(client, "UnableToDoThat")); return false; } @@ -70,7 +70,7 @@ function stopPlayerAnimationCommand(command, params, client) { // =========================================================================== function showAnimationListCommand(command, params, client) { - let animList = getGameConfig().animations[getServerGame()].map(function(x) { return x[0]; }); + let animList = getGameConfig().animations[getServerGame()].map(function(x) { return x.name; }); let chunkedList = splitArrayIntoChunks(animList, 10); @@ -107,7 +107,7 @@ function makePlayerPlayAnimation(client, animationSlot, offsetPosition = 1) { getPlayerData(client).animationForced = false; makePedPlayAnimation(getPlayerPed(client), animationSlot, offsetPosition); - setEntityData(ped, "vrr.anim", [animationData[1], animationData[2]]); + setEntityData(getPlayerPed(client), "vrr.anim", animationSlot, true); //if(getAnimationData(animationSlot)[9] != VRR_ANIMMOVE_NONE) { // if(getGame() < VRR_GAME_GTA_SA) { // setPlayerMouseCameraState(client, true); @@ -144,9 +144,10 @@ function makePlayerStopAnimation(client) { // =========================================================================== function getAnimationFromParams(params) { + let animations = getGameConfig().animations[getServerGame()]; if(isNaN(params)) { - for(let i in getGameConfig().animations[getServerGame()]) { - if(toLowerCase(getGameConfig().animations[getServerGame()][i][0]).indexOf(toLowerCase(params)) != -1) { + for(let i in animations) { + if(toLowerCase(animations[i].name).indexOf(toLowerCase(params)) != -1) { return i; } } diff --git a/scripts/shared/gamedata.js b/scripts/shared/gamedata.js index 39c746de..6c81dfd9 100644 --- a/scripts/shared/gamedata.js +++ b/scripts/shared/gamedata.js @@ -7,6 +7,23 @@ // TYPE: Shared (JavaScript) // =========================================================================== +class AnimationData { + constructor(name, data) { + this.name = name; + this.groupId = (typeof data.groupId != "undefined") ? data.groupId : 0; + this.animId = (typeof data.animId != "undefined") ? data.animId : 0; + this.animType = (typeof data.animType != "undefined") ? data.animType : VRR_ANIMTYPE_NORMAL; + this.animSpeed = (typeof data.animSpeed != "undefined") ? data.animSpeed : 0.0; + this.moveType = (typeof data.moveType != "undefined") ? data.moveType : VRR_ANIMMOVE_NONE; + + // GTA IV + this.infiniteLoop = (typeof data.infiniteLoop != "undefined") ? data.infiniteLoop : false; + this.infiniteLoopNoMovement = (typeof data.infiniteLoopNoMovement != "undefined") ? data.infiniteLoopNoMovement : false; + this.dontReturnToStartCoords = (typeof data.dontReturnToStartCoords != "undefined") ? data.dontReturnToStartCoords : false; + this.freezeLastFrame = (typeof data.freezeLastFrame != "undefined") ? data.freezeLastFrame : false; + } +}; + let supportedFeatures = { // Invalid, GTAIII, GTAVC, GTASA, Invalid, GTAIV, Invalid, Invalid, Invalid, M1, M2, M3, M1DE time: [null, true, true, true, false, true, true, null, null, null, false, false, false, false], @@ -3173,158 +3190,132 @@ let gameData = { [], // [name, groupId, animId, animType, deltaTime, null, null, null, null, moveType], - [ // GTA III - ["walk", 0, 0, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["jog", 0, 1, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["look1", 0, 7, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["tired", 0, 9, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["raisegun", 0, 10, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["wave", 0, 12, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["talk", 0, 11, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["stomachhit", 0, 18, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["headhit", 0, 18, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["throw1", 0, 53, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["throw2", 0, 54, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["punch1", 0, 54, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["headbutt", 0, 70, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["kick", 0, 71, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["kneekick", 0, 72, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["punch2", 0, 73, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["flipkick", 0, 74, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["bow", 0, 126, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["opendoor1", 0, 127, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["opendoor2", 0, 128, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["falling", 0, 151, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["dive", 0, 156, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["headscratch", 0, 157, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["look2", 0, 158, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["plant", 0, 162, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["cower", 0, 163, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["aimdown", 0, 160, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["aimcrouch", 0, 165, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["throw3", 0, 166, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["handsup", 0, 167, VRR_ANIMTYPE_SURRENDER, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["sit", 0, 111, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["sitleft", 0, 111, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_LEFT], - ["sitback", 0, 111, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_BACK], - ["sitright", 0, 111, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_RIGHT], - ["sitforward", 0, 111, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_FORWARD], - ["sitarmright", 0, 120, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_BACK], - ["tazed", 0, 13, VRR_ANIMTYPE_FORCED, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], + [ // GTA III + new AnimationData("walk", {groupId: 0, animId: 0}), + new AnimationData("jog", {groupId: 0, animId: 1}), + new AnimationData("look1", {groupId: 0, animId: 7}), + new AnimationData("tired", {groupId: 0, animId: 9}), + new AnimationData("raisegun", {groupId: 0, animId: 10}), + new AnimationData("wave", {groupId: 0, animId: 12}), + new AnimationData("talk", {groupId: 0, animId: 11}), + new AnimationData("stomachhit", {groupId: 0, animId: 18}), + new AnimationData("headhit", {groupId: 0, animId: 18}), + new AnimationData("throw1", {groupId: 0, animId: 53}), + new AnimationData("throw2", {groupId: 0, animId: 54}), + new AnimationData("punch1", {groupId: 0, animId: 54}), + new AnimationData("headbutt", {groupId: 0, animId: 70}), + new AnimationData("kick", {groupId: 0, animId: 71}), + new AnimationData("kneekick", {groupId: 0, animId: 72}), + new AnimationData("punch2", {groupId: 0, animId: 73}), + new AnimationData("flipkick", {groupId: 0, animId: 74}), + new AnimationData("bow", {groupId: 0, animId: 126}), + new AnimationData("opendoor1", {groupId: 0, animId: 127}), + new AnimationData("opendoor2", {groupId: 0, animId: 128}), + new AnimationData("falling", {groupId: 0, animId: 151}), + new AnimationData("dive", {groupId: 0, animId: 156}), + new AnimationData("headscratch", {groupId: 0, animId: 157}), + new AnimationData("look2", {groupId: 0, animId: 158}), + new AnimationData("plant", {groupId: 0, animId: 162}), + new AnimationData("cower", {groupId: 0, animId: 163}), + new AnimationData("aimdown", {groupId: 0, animId: 160}), + new AnimationData("aimcrouch", {groupId: 0, animId: 165}), + new AnimationData("throw3", {groupId: 0, animId: 166}), + new AnimationData("handsup", {groupId: 0, animId: 167, animType: VRR_ANIMTYPE_SURRENDER}), + new AnimationData("sit", {groupId: 0, animId: 111}), + new AnimationData("sitleft", {groupId: 0, animId: 111, moveType: VRR_ANIMMOVE_LEFT}), + new AnimationData("sitback", {groupId: 0, animId: 111, moveType: VRR_ANIMMOVE_BACK}), + new AnimationData("sitright", {groupId: 0, animId: 111, moveType: VRR_ANIMMOVE_RIGHT}), + new AnimationData("sitforward", {groupId: 0, animId: 111, moveType: VRR_ANIMMOVE_FORWARD}), + new AnimationData("sitarmright", {groupId: 0, animId: 120, moveType: VRR_ANIMMOVE_BACK}), + new AnimationData("tazed", {groupId: 0, animId: 13, animType: VRR_ANIMTYPE_FORCED}), ], - [ // GTA VC - ["walk", 0, 0, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["jog", 0, 1, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["handcuffs", 0, 7, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["tired", 0, 9, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["raisegun", 0, 10, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["wave", 0, 12, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["talk", 0, 11, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["stomachhit", 0, 18, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["headhit", 0, 18, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["headbutt", 0, 49, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["kick", 0, 50, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["kneekick", 0, 51, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["throw2", 0, 54, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["punch1", 0, 52, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["punch2", 0, 53, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["flipkick", 0, 54, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["headscratch", 0, 152, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["aimdown", 0, 155, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["look2", 0, 153, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["handsup", 0, 161, VRR_ANIMTYPE_SURRENDER, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["cower", 0, 162, VRR_ANIMTYPE_SURRENDER, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["fucku", 0, 163, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["phone", 0, 166, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["sit", 0, 169, VRR_ANIMTYPE_NORMAL, 1.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["atm", 0, 171, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["cpr", 24, 214, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["idle1", 26, 215, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["idle2", 26, 216, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["idle3", 26, 217, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["idle4", 26, 218, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["dance1", 28, 226, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["dance2", 28, 227, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["dance3", 28, 228, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["dance4", 28, 229, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["dance5", 28, 230, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["dance6", 28, 231, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["dance7", 28, 232, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["sitright", 0, 169, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_RIGHT], - ["sitleft", 0, 169, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_LEFT], - ["sitforward", 0, 169, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_FORWARD], - ["sitback", 0, 169, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_BACK], - ["tazed", 0, 13, VRR_ANIMTYPE_FORCED, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], + [ // GTA VC + new AnimationData("walk", {groupId: 0, animId: 0}), + new AnimationData("jog", {groupId: 0, animId: 1}), + new AnimationData("handcuffs", {groupId: 0, animId: 7}), + new AnimationData("tired", {groupId: 0, animId: 9}), + new AnimationData("raisegun", {groupId: 0, animId: 10}), + new AnimationData("wave", {groupId: 0, animId: 12}), + new AnimationData("talk", {groupId: 0, animId: 11}), + new AnimationData("stomachhit", {groupId: 0, animId: 18}), + new AnimationData("headhit", {groupId: 0, animId: 18}), + new AnimationData("headbutt", {groupId: 0, animId: 49}), + new AnimationData("kick", {groupId: 0, animId: 50}), + new AnimationData("kneekick", {groupId: 0, animId: 51}), + new AnimationData("throw2", {groupId: 0, animId: 54}), + new AnimationData("punch1", {groupId: 0, animId: 52}), + new AnimationData("punch2", {groupId: 0, animId: 53}), + new AnimationData("flipkick", {groupId: 0, animId: 54}), + new AnimationData("headscratch", {groupId: 0, animId: 152}), + new AnimationData("aimdown", {groupId: 0, animId: 155}), + new AnimationData("look2", {groupId: 0, animId: 153}), + new AnimationData("handsup", {groupId: 0, animId: 161, animType: VRR_ANIMTYPE_SURRENDER}), + new AnimationData("cower", {groupId: 0, animId: 162, animType: VRR_ANIMTYPE_SURRENDER}), + new AnimationData("fucku", {groupId: 0, animId: 163}), + new AnimationData("phone", {groupId: 0, animId: 166}), + new AnimationData("sit", {groupId: 0, animId: 169, animSpeed: 1.0}), + new AnimationData("atm", {groupId: 0, animId: 171}), + new AnimationData("cpr", {groupId: 24, animId: 214}), + new AnimationData("idle1", {groupId: 26, animId: 215}), + new AnimationData("idle2", {groupId: 26, animId: 216}), + new AnimationData("idle3", {groupId: 26, animId: 217}), + new AnimationData("idle4", {groupId: 26, animId: 218}), + new AnimationData("dance1", {groupId: 28, animId: 226}), + new AnimationData("dance2", {groupId: 28, animId: 227}), + new AnimationData("dance3", {groupId: 28, animId: 228}), + new AnimationData("dance4", {groupId: 28, animId: 229}), + new AnimationData("dance5", {groupId: 28, animId: 230}), + new AnimationData("dance6", {groupId: 28, animId: 231}), + new AnimationData("dance7", {groupId: 28, animId: 232}), + new AnimationData("sitright", {groupId: 0, animId: 169, moveType: VRR_ANIMMOVE_RIGHT}), + new AnimationData("sitleft", {groupId: 0, animId: 169, moveType: VRR_ANIMMOVE_LEFT}), + new AnimationData("sitforward", {groupId: 0, animId: 169, moveType: VRR_ANIMMOVE_FORWARD}), + new AnimationData("sitback", {groupId: 0, animId: 169, moveType: VRR_ANIMMOVE_BACK}), + new AnimationData("tazed", {groupId: 0, animId: 13, animType: VRR_ANIMTYPE_FORCED}), ], - [ // GTA SA - ["walk", 0, 0, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["jog", 0, 1, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["look1", 0, 4, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["holdrifle", 0, 11, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["talk1", 0, 12, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["wave1", 0, 13, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["swim1", 0, 14, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["die1", 0, 15, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["die2", 0, 16, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["diehead", 0, 19, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["diestomach", 0, 20, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["choke", 0, 21, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["remotepress", 0, 48, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["pickup1", 0, 99, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["pickup2", 0, 100, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["backhandright", 0, 103, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["backhandleft", 0, 104, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["knockback", 0, 105, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["idle1", 0, 135, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["cower", 0, 141, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["handsup", 0, 142, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["fucku", 0, 144, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["phoneout", 0, 145, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["phonein", 0, 146, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["phonetalk", 0, 146, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["sit1", 0, 150, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["atm", 0, 151, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["mindtrick", 0, 153, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["look2", 0, 165, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["gestureno", 0, 166, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["gestureyes", 0, 167, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["wave2", 0, 168, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["snort", 0, 169, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - ["sitright", 0, 150, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_RIGHT], - ["sitleft", 0, 150, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_LEFT], - ["sitforward", 0, 150, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_FORWARD], - ["sitback", 0, 150, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_BACK], - ["tazed", 0, 15, VRR_ANIMTYPE_FORCED, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - - /* - ["talk", "PED", "IDLE_CHAT", VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null], - ["fucku", "PED", "FUCKU", VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null], - ["taichi", "PARK", "Tai_Chi_Loop", VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null], - ["slapass", "SWEET", "sweet_ass_slap", VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null], - ["wave", "ON_LOOKERS", "wave_loop", VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null], - ["vomit", "EAT_Vomit_P", VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null], - ["cower", "ped", "cower", VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null], - ["laugh", "RAPPING", "Laugh_01", VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null], - ["plant", "BOMBER", "BOM_Plant", VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null], - ["smoke1", "SMOKING","M_smklean_loop", VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null], - ["smoke2", "SMOKING","F_smklean_loop", VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null], - ["smoke3", "SMOKING","M_smkstnd_loop", VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null], - ["sit1", "ped","SEAT_idle", VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null], - ["sit2", "BEACH", "ParkSit_M_loop", VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null], - ["sit3", "BEACH", "ParkSit_W_loop", VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null], - ["sit4", "BEACH", "SitnWait_loop_W", VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null], - ["scratch", "MISC","Scratchballs_01", VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null], - ["standup", "ped", "SEAT_up", VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null], - //["faceshocked", 0, 150, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - //["facesurprised", 0, 150, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - //["faceconfused", 0, 150, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - //["faceangry", 0, 159, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - //["facetalk1", 0, 160, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - */ + [ // GTA SA + new AnimationData("walk", {groupId: 0, animId: 0}), + new AnimationData("jog", {groupId: 0, animId: 1}), + new AnimationData("look1", {groupId: 0, animId: 4}), + new AnimationData("holdrifle", {groupId: 0, animId: 11}), + new AnimationData("talk1", {groupId: 0, animId: 12}), + new AnimationData("wave1", {groupId: 0, animId: 13}), + new AnimationData("swim1", {groupId: 0, animId: 14}), + new AnimationData("die1", {groupId: 0, animId: 15}), + new AnimationData("die2", {groupId: 0, animId: 16}), + new AnimationData("diehead", {groupId: 0, animId: 19}), + new AnimationData("diestomach", {groupId: 0, animId: 20}), + new AnimationData("choke", {groupId: 0, animId: 21}), + new AnimationData("remotepress", {groupId: 0, animId: 48}), + new AnimationData("pickup1", {groupId: 0, animId: 99}), + new AnimationData("pickup2", {groupId: 0, animId: 100}), + new AnimationData("backhandright", {groupId: 0, animId: 103}), + new AnimationData("backhandleft", {groupId: 0, animId: 104}), + new AnimationData("knockback", {groupId: 0, animId: 105}), + new AnimationData("idle1", {groupId: 0, animId: 135}), + new AnimationData("cower", {groupId: 0, animId: 141}), + new AnimationData("handsup", {groupId: 0, animId: 142}), + new AnimationData("fucku", {groupId: 0, animId: 144}), + new AnimationData("phoneout", {groupId: 0, animId: 145}), + new AnimationData("phonein", {groupId: 0, animId: 146}), + new AnimationData("phonetalk", {groupId: 0, animId: 146}), + new AnimationData("sit1", {groupId: 0, animId: 150}), + new AnimationData("atm", {groupId: 0, animId: 151}), + new AnimationData("mindtrick", {groupId: 0, animId: 153}), + new AnimationData("look2", {groupId: 0, animId: 165}), + new AnimationData("gestureno", {groupId: 0, animId: 166}), + new AnimationData("gestureyes", {groupId: 0, animId: 167}), + new AnimationData("wave2", {groupId: 0, animId: 168}), + new AnimationData("snort", {groupId: 0, animId: 169}), + new AnimationData("sitright", {groupId: 0, animId: 150, moveType: VRR_ANIMMOVE_RIGHT}), + new AnimationData("sitleft", {groupId: 0, animId: 150, moveType: VRR_ANIMMOVE_LEFT}), + new AnimationData("sitforward", {groupId: 0, animId: 150, moveType: VRR_ANIMMOVE_FORWARD}), + new AnimationData("sitback", {groupId: 0, animId: 150, moveType: VRR_ANIMMOVE_BACK}), + new AnimationData("tazed", {groupId: 0, animId: 15, moveType: VRR_ANIMTYPE_FORCED}), ], null, - [ // GTA IV - ["dance1", "DAN_LOOP_A", "DANCING", 16.0, true, false, true, false], + [ // GTA IV + new AnimationData("dance1", {groupId: "DAN_LOOP_A", animId: "DANCING", animSpeed: 16.0, infiniteLoop: true, infiniteLoopNoMovement: false, dontReturnToStartCoords: true, freezeLastFrame: false}), ] ], meleeWeapons: [