Lots of changes

* Add optional offset for some anims (like sitting)
* Fix int/vw chat check not working
* Disable ambience utils for now
* Add ped stop anim util
* Fix enter veh messages
* Fix radio stream not stopping when exiting vehicle
* Fix job items bugging out
* Don't save job equipment items
* Switch to inactive item slot when going on/off duty
* Fix gotospawn not working with int/vw
* Added anims for offset use
* Added element ID & syncer utils
* Fixed wrong job name being shown when setting job vehicle rank
* Added anim move type constants
* Added element collision net events
* Added is any GUI active util
* Fixed showing player list when a GUI is active
This commit is contained in:
Vortrex
2021-09-13 07:22:00 -05:00
parent cfc22a77ee
commit acfc788371
17 changed files with 319 additions and 134 deletions

View File

@@ -20,7 +20,9 @@ function playPlayerAnimationCommand(command, params, client) {
return false;
}
let animationSlot = getAnimationFromParams(params);
let splitParams = params.split(" ");
let animationSlot = getAnimationFromParams(splitParams[0]);
let animationPositionOffset = getAnimationFromParams(splitParams[1]);
if(!animationSlot) {
messagePlayerError(client, "That animation doesn't exist!");
@@ -29,9 +31,18 @@ function playPlayerAnimationCommand(command, params, client) {
}
getPlayerData(client).currentAnimation = animationSlot;
getPlayerData(client).currentAnimationPositionOffset = animationSlot;
getPlayerData(client).currentAnimationPositionReturnTo = getPlayerPosition(client);
getPlayerData(client).animationStart = getCurrentUnixTimestamp();
//setEntityData(getPlayerData(client).ped, "vrr.animation", animationSlot, true);
makePedPlayAnimation(getPlayerData(client).ped, animationSlot);
makePedPlayAnimation(getPlayerData(client).ped, animationSlot, animationPositionOffset);
}
// ===========================================================================
function stopPlayerAnimationCommand(command, params, client) {
setPlayerPosition(client, getPlayerData(client).currentAnimationPositionReturnTo);
makePedStopAnimation(getPlayerData(client).ped);
}
// ===========================================================================