Add ped parts/props sync event (unfinished)

This commit is contained in:
Vortrex
2022-03-09 02:52:06 -06:00
parent 40281d658a
commit dc127dfdd0

View File

@@ -107,6 +107,8 @@ function addAllNetworkHandlers() {
addNetworkEventHandler("vrr.holdObject", makePedHoldObject);
addNetworkEventHandler("vrr.playerPedId", sendLocalPlayerNetworkIdToServer);
addNetworkEventHandler("vrr.ped", setLocalPlayerPedPartsAndProps);
}
// ===========================================================================
@@ -259,18 +261,6 @@ function setElementCollisionsEnabled(elementId, state) {
// ===========================================================================
function setLocalPlayerPedPartsAndProps(parts, props) {
for(let i in parts) {
localPlayer.changeBodyPart(parts[0], parts[1], parts[2]);
}
for(let i in props) {
localPlayer.changeBodyProp(props[0], props[1]);
}
}
// ===========================================================================
function setLocalPlayerArmour(armour) {
if(typeof localPlayer.armour != "undefined") {
localPlayer.armour = armour;