Change net event and const prefix
This commit is contained in:
@@ -8,37 +8,37 @@
|
||||
// ===========================================================================
|
||||
|
||||
function processSync(event, deltaTime) {
|
||||
if(localPlayer != null) {
|
||||
if(!areServerElementsSupported()) {
|
||||
sendNetworkEventToServer("vrr.plr.pos", (localPlayer.vehicle != null) ? localPlayer.vehicle.position : localPlayer.position);
|
||||
sendNetworkEventToServer("vrr.plr.rot", (localPlayer.vehicle != null) ? localPlayer.vehicle.heading : localPlayer.heading);
|
||||
if (localPlayer != null) {
|
||||
if (!areServerElementsSupported()) {
|
||||
sendNetworkEventToServer("agrp.plr.pos", (localPlayer.vehicle != null) ? localPlayer.vehicle.position : localPlayer.position);
|
||||
sendNetworkEventToServer("agrp.plr.rot", (localPlayer.vehicle != null) ? localPlayer.vehicle.heading : localPlayer.heading);
|
||||
|
||||
//if(localPlayer.vehicle != null) {
|
||||
// sendNetworkEventToServer("vrr.veh.pos", getVehicleForNetworkEvent(localPlayer.vehicle), localPlayer.vehicle.position);
|
||||
// sendNetworkEventToServer("vrr.veh.rot", getVehicleForNetworkEvent(localPlayer.vehicle), localPlayer.vehicle.heading);
|
||||
// sendNetworkEventToServer("agrp.veh.pos", getVehicleForNetworkEvent(localPlayer.vehicle), localPlayer.vehicle.position);
|
||||
// sendNetworkEventToServer("agrp.veh.rot", getVehicleForNetworkEvent(localPlayer.vehicle), localPlayer.vehicle.heading);
|
||||
//}
|
||||
}
|
||||
|
||||
if(localPlayer.health <= 0) {
|
||||
if(!calledDeathEvent) {
|
||||
if (localPlayer.health <= 0) {
|
||||
if (!calledDeathEvent) {
|
||||
logToConsole(LOG_DEBUG, `Local player died`);
|
||||
localPlayer.clearWeapons();
|
||||
calledDeathEvent = true;
|
||||
sendNetworkEventToServer("vrr.playerDeath");
|
||||
sendNetworkEventToServer("agrp.playerDeath");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(localPlayer.health <= 0) {
|
||||
if(!calledDeathEvent) {
|
||||
if (localPlayer.health <= 0) {
|
||||
if (!calledDeathEvent) {
|
||||
logToConsole(LOG_DEBUG, `Local player died`);
|
||||
localPlayer.clearWeapons();
|
||||
calledDeathEvent = true;
|
||||
sendNetworkEventToServer("vrr.playerDeath");
|
||||
sendNetworkEventToServer("agrp.playerDeath");
|
||||
}
|
||||
}
|
||||
|
||||
if(streamingRadioElement) {
|
||||
if (streamingRadioElement) {
|
||||
streamingRadio.position = getElementPosition(streamingRadioElement.id);
|
||||
//streamingRadio.volume = getStreamingRadioVolumeForPosition(streamingRadio.position);
|
||||
}
|
||||
@@ -53,20 +53,20 @@ function setVehicleEngine(vehicleId, state) {
|
||||
// ===========================================================================
|
||||
|
||||
function setVehicleLights(vehicleId, state) {
|
||||
if(getGame() != VRR_GAME_MAFIA_ONE) {
|
||||
if(!state) {
|
||||
if (getGame() != VRR_GAME_MAFIA_ONE) {
|
||||
if (!state) {
|
||||
getElementFromId(vehicleId).lightStatus = 2;
|
||||
} else {
|
||||
getElementFromId(vehicleId).lightStatus = 1;
|
||||
}
|
||||
} else if(getGame() == VRR_GAME_GTA_IV) {
|
||||
if(!state) {
|
||||
} else if (getGame() == VRR_GAME_GTA_IV) {
|
||||
if (!state) {
|
||||
natives.forceCarLights(natives.getVehicleFromNetworkId(vehicleId, 0));
|
||||
} else {
|
||||
natives.forceCarLights(natives.getVehicleFromNetworkId(vehicleId, 1));
|
||||
}
|
||||
} else {
|
||||
if(!state) {
|
||||
if (!state) {
|
||||
getElementFromId(vehicleId).lights = false;
|
||||
} else {
|
||||
getElementFromId(vehicleId).lights = true;
|
||||
@@ -83,72 +83,72 @@ function repairVehicle(syncId) {
|
||||
// ===========================================================================
|
||||
|
||||
function syncVehicleProperties(vehicle) {
|
||||
if(!areServerElementsSupported()) {
|
||||
if (!areServerElementsSupported()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(vehicle, "vrr.lights")) {
|
||||
let lightStatus = getEntityData(vehicle, "vrr.lights");
|
||||
if(!lightStatus) {
|
||||
if (doesEntityDataExist(vehicle, "agrp.lights")) {
|
||||
let lightStatus = getEntityData(vehicle, "agrp.lights");
|
||||
if (!lightStatus) {
|
||||
vehicle.lightStatus = 2;
|
||||
} else {
|
||||
vehicle.lightStatus = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(vehicle, "vrr.invincible")) {
|
||||
let invincible = getEntityData(vehicle, "vrr.invincible");
|
||||
if (doesEntityDataExist(vehicle, "agrp.invincible")) {
|
||||
let invincible = getEntityData(vehicle, "agrp.invincible");
|
||||
element.setProofs(invincible, invincible, invincible, invincible, invincible);
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(vehicle, "vrr.panelStatus")) {
|
||||
let panelsStatus = getEntityData(vehicle, "vrr.panelStatus");
|
||||
for(let i in panelsStatus) {
|
||||
if (doesEntityDataExist(vehicle, "agrp.panelStatus")) {
|
||||
let panelsStatus = getEntityData(vehicle, "agrp.panelStatus");
|
||||
for (let i in panelsStatus) {
|
||||
vehicle.setPanelStatus(i, panelsStatus[i]);
|
||||
}
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(vehicle, "vrr.wheelStatus")) {
|
||||
let wheelsStatus = getEntityData(vehicle, "vrr.wheelStatus");
|
||||
for(let i in wheelsStatus) {
|
||||
if (doesEntityDataExist(vehicle, "agrp.wheelStatus")) {
|
||||
let wheelsStatus = getEntityData(vehicle, "agrp.wheelStatus");
|
||||
for (let i in wheelsStatus) {
|
||||
vehicle.setWheelStatus(i, wheelsStatus[i]);
|
||||
}
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(vehicle, "vrr.lightStatus")) {
|
||||
let lightStatus = getEntityData(vehicle, "vrr.lightStatus");
|
||||
for(let i in lightStatus) {
|
||||
if (doesEntityDataExist(vehicle, "agrp.lightStatus")) {
|
||||
let lightStatus = getEntityData(vehicle, "agrp.lightStatus");
|
||||
for (let i in lightStatus) {
|
||||
vehicle.setLightStatus(i, lightStatus[i]);
|
||||
}
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(vehicle, "vrr.suspensionHeight")) {
|
||||
let suspensionHeight = getEntityData(vehicle, "vrr.suspensionHeight");
|
||||
if (doesEntityDataExist(vehicle, "agrp.suspensionHeight")) {
|
||||
let suspensionHeight = getEntityData(vehicle, "agrp.suspensionHeight");
|
||||
vehicle.setSuspensionHeight(suspensionHeight);
|
||||
}
|
||||
|
||||
if(getGame() == VRR_GAME_GTA_SA) {
|
||||
if (getGame() == VRR_GAME_GTA_SA) {
|
||||
//let allUpgrades = getGameConfig().vehicleUpgrades[getGame()];
|
||||
//for(let i in allUpgrades) {
|
||||
// vehicle.removeUpgrade(i);
|
||||
//}
|
||||
|
||||
if(doesEntityDataExist(vehicle, "vrr.upgrades")) {
|
||||
let upgrades = getEntityData(vehicle, "vrr.upgrades");
|
||||
for(let i in upgrades) {
|
||||
if(upgrades[i] != 0) {
|
||||
if (doesEntityDataExist(vehicle, "agrp.upgrades")) {
|
||||
let upgrades = getEntityData(vehicle, "agrp.upgrades");
|
||||
for (let i in upgrades) {
|
||||
if (upgrades[i] != 0) {
|
||||
vehicle.addUpgrade(upgrades[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(getGame() == VRR_GAME_GTA_SA || getGame() == VRR_GAME_GTA_IV) {
|
||||
if(doesEntityDataExist(vehicle, "vrr.livery")) {
|
||||
let livery = getEntityData(vehicle, "vrr.livery");
|
||||
if(getGame() == VRR_GAME_GTA_SA) {
|
||||
if (getGame() == VRR_GAME_GTA_SA || getGame() == VRR_GAME_GTA_IV) {
|
||||
if (doesEntityDataExist(vehicle, "agrp.livery")) {
|
||||
let livery = getEntityData(vehicle, "agrp.livery");
|
||||
if (getGame() == VRR_GAME_GTA_SA) {
|
||||
vehicle.setPaintJob(livery);
|
||||
} else if(getGame() == VRR_GAME_GTA_IV) {
|
||||
} else if (getGame() == VRR_GAME_GTA_IV) {
|
||||
vehicle.livery = livery;
|
||||
}
|
||||
}
|
||||
@@ -158,13 +158,13 @@ function syncVehicleProperties(vehicle) {
|
||||
// ===========================================================================
|
||||
|
||||
function syncCivilianProperties(civilian) {
|
||||
if(!areServerElementsSupported()) {
|
||||
if (!areServerElementsSupported()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(getGame() == VRR_GAME_GTA_III) {
|
||||
if(doesEntityDataExist(civilian, "vrr.scale")) {
|
||||
let scaleFactor = getEntityData(civilian, "vrr.scale");
|
||||
if (getGame() == VRR_GAME_GTA_III) {
|
||||
if (doesEntityDataExist(civilian, "agrp.scale")) {
|
||||
let scaleFactor = getEntityData(civilian, "agrp.scale");
|
||||
let tempMatrix = civilian.matrix;
|
||||
tempMatrix.setScale(toVector3(scaleFactor.x, scaleFactor.y, scaleFactor.z));
|
||||
let tempPosition = civilian.position;
|
||||
@@ -174,79 +174,79 @@ function syncCivilianProperties(civilian) {
|
||||
}
|
||||
}
|
||||
|
||||
if(getGame() == VRR_GAME_GTA_SA) {
|
||||
if(doesEntityDataExist(civilian, "vrr.fightStyle")) {
|
||||
let fightStyle = getEntityData(civilian, "vrr.fightStyle");
|
||||
if (getGame() == VRR_GAME_GTA_SA) {
|
||||
if (doesEntityDataExist(civilian, "agrp.fightStyle")) {
|
||||
let fightStyle = getEntityData(civilian, "agrp.fightStyle");
|
||||
civilian.setFightStyle(fightStyle[0], fightStyle[1]);
|
||||
}
|
||||
}
|
||||
|
||||
if(getGame() == VRR_GAME_GTA_III) {
|
||||
if(doesEntityDataExist(civilian, "vrr.walkStyle")) {
|
||||
let walkStyle = getEntityData(civilian, "vrr.walkStyle");
|
||||
if (getGame() == VRR_GAME_GTA_III) {
|
||||
if (doesEntityDataExist(civilian, "agrp.walkStyle")) {
|
||||
let walkStyle = getEntityData(civilian, "agrp.walkStyle");
|
||||
civilian.walkStyle = walkStyle;
|
||||
}
|
||||
}
|
||||
|
||||
if(getGame() == VRR_GAME_GTA_IV) {
|
||||
if(doesEntityDataExist(civilian, "vrr.bodyPropHair")) {
|
||||
let bodyPropHair = getEntityData(civilian, "vrr.bodyPropHair");
|
||||
if (getGame() == VRR_GAME_GTA_IV) {
|
||||
if (doesEntityDataExist(civilian, "agrp.bodyPropHair")) {
|
||||
let bodyPropHair = getEntityData(civilian, "agrp.bodyPropHair");
|
||||
civilian.changeBodyProp(0, bodyPropHair[0], bodyPropHair[1]);
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(civilian, "vrr.bodyPropHead")) {
|
||||
let bodyPropHead = getEntityData(civilian, "vrr.bodyPropHead");
|
||||
if (doesEntityDataExist(civilian, "agrp.bodyPropHead")) {
|
||||
let bodyPropHead = getEntityData(civilian, "agrp.bodyPropHead");
|
||||
civilian.changeBodyProp(1, bodyPropHead[0], bodyPropHead[1]);
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(civilian, "vrr.bodyPropEyes")) {
|
||||
let bodyPropEyes = getEntityData(civilian, "vrr.bodyPropEyes");
|
||||
if (doesEntityDataExist(civilian, "agrp.bodyPropEyes")) {
|
||||
let bodyPropEyes = getEntityData(civilian, "agrp.bodyPropEyes");
|
||||
civilian.changeBodyProp(1, bodyPropEyes[0], bodyPropEyes[1]);
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(civilian, "vrr.bodyPropLeftHand")) {
|
||||
let bodyPropLeftHand = getEntityData(civilian, "vrr.bodyPropLeftHand");
|
||||
if (doesEntityDataExist(civilian, "agrp.bodyPropLeftHand")) {
|
||||
let bodyPropLeftHand = getEntityData(civilian, "agrp.bodyPropLeftHand");
|
||||
civilian.changeBodyProp(1, bodyPropLeftHand[0], bodyPropLeftHand[1]);
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(civilian, "vrr.bodyPropRightHand")) {
|
||||
let bodyPropRightHand = getEntityData(civilian, "vrr.bodyPropRightHand");
|
||||
if (doesEntityDataExist(civilian, "agrp.bodyPropRightHand")) {
|
||||
let bodyPropRightHand = getEntityData(civilian, "agrp.bodyPropRightHand");
|
||||
civilian.changeBodyProp(1, bodyPropRightHand[0], bodyPropRightHand[1]);
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(civilian, "vrr.bodyPropLeftWrist")) {
|
||||
let bodyPropLeftWrist = getEntityData(civilian, "vrr.bodyPropLeftWrist");
|
||||
if (doesEntityDataExist(civilian, "agrp.bodyPropLeftWrist")) {
|
||||
let bodyPropLeftWrist = getEntityData(civilian, "agrp.bodyPropLeftWrist");
|
||||
civilian.changeBodyProp(1, bodyPropLeftWrist[0], bodyPropLeftWrist[1]);
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(civilian, "vrr.bodyPropRightWrist")) {
|
||||
let bodyPropRightWrist = getEntityData(civilian, "vrr.bodyPropRightWrist");
|
||||
if (doesEntityDataExist(civilian, "agrp.bodyPropRightWrist")) {
|
||||
let bodyPropRightWrist = getEntityData(civilian, "agrp.bodyPropRightWrist");
|
||||
civilian.changeBodyProp(1, bodyPropRightWrist[0], bodyPropRightWrist[1]);
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(civilian, "vrr.bodyPropRightWrist")) {
|
||||
let bodyPropRightWrist = getEntityData(civilian, "vrr.bodyPropRightWrist");
|
||||
if (doesEntityDataExist(civilian, "agrp.bodyPropRightWrist")) {
|
||||
let bodyPropRightWrist = getEntityData(civilian, "agrp.bodyPropRightWrist");
|
||||
civilian.changeBodyProp(1, bodyPropRightWrist[0], bodyPropRightWrist[1]);
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(civilian, "vrr.bodyPropHip")) {
|
||||
let bodyPropHip = getEntityData(civilian, "vrr.bodyPropHip");
|
||||
if (doesEntityDataExist(civilian, "agrp.bodyPropHip")) {
|
||||
let bodyPropHip = getEntityData(civilian, "agrp.bodyPropHip");
|
||||
civilian.changeBodyProp(1, bodyPropHip[0], bodyPropHip[1]);
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(civilian, "vrr.bodyPropLeftFoot")) {
|
||||
let bodyPropLeftFoot = getEntityData(civilian, "vrr.bodyPropLeftFoot");
|
||||
if (doesEntityDataExist(civilian, "agrp.bodyPropLeftFoot")) {
|
||||
let bodyPropLeftFoot = getEntityData(civilian, "agrp.bodyPropLeftFoot");
|
||||
civilian.changeBodyProp(1, bodyPropLeftFoot[0], bodyPropLeftFoot[1]);
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(civilian, "vrr.bodyPropRightFoot")) {
|
||||
let bodyPropRightFoot = getEntityData(civilian, "vrr.bodyPropRightFoot");
|
||||
if (doesEntityDataExist(civilian, "agrp.bodyPropRightFoot")) {
|
||||
let bodyPropRightFoot = getEntityData(civilian, "agrp.bodyPropRightFoot");
|
||||
civilian.changeBodyProp(1, bodyPropRightFoot[0], bodyPropRightFoot[1]);
|
||||
}
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(civilian, "vrr.anim")) {
|
||||
let animationSlot = getEntityData(civilian, "vrr.anim");
|
||||
if (doesEntityDataExist(civilian, "agrp.anim")) {
|
||||
let animationSlot = getEntityData(civilian, "agrp.anim");
|
||||
let animationData = getAnimationData(animationSlot);
|
||||
civilian.addAnimation(animationData.groupId, animationData.animId);
|
||||
}
|
||||
@@ -255,13 +255,13 @@ function syncCivilianProperties(civilian) {
|
||||
// ===========================================================================
|
||||
|
||||
function syncPlayerProperties(player) {
|
||||
if(!areServerElementsSupported()) {
|
||||
if (!areServerElementsSupported()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(getGame() == VRR_GAME_GTA_III) {
|
||||
if(doesEntityDataExist(player, "vrr.scale")) {
|
||||
let scaleFactor = getEntityData(player, "vrr.scale");
|
||||
if (getGame() == VRR_GAME_GTA_III) {
|
||||
if (doesEntityDataExist(player, "agrp.scale")) {
|
||||
let scaleFactor = getEntityData(player, "agrp.scale");
|
||||
let tempMatrix = player.matrix;
|
||||
tempMatrix.setScale(toVector3(scaleFactor.x, scaleFactor.y, scaleFactor.z));
|
||||
let tempPosition = player.position;
|
||||
@@ -271,95 +271,95 @@ function syncPlayerProperties(player) {
|
||||
}
|
||||
}
|
||||
|
||||
if(getGame() == VRR_GAME_GTA_SA) {
|
||||
if(doesEntityDataExist(player, "vrr.fightStyle")) {
|
||||
let fightStyle = getEntityData(player, "vrr.fightStyle");
|
||||
if (getGame() == VRR_GAME_GTA_SA) {
|
||||
if (doesEntityDataExist(player, "agrp.fightStyle")) {
|
||||
let fightStyle = getEntityData(player, "agrp.fightStyle");
|
||||
player.setFightStyle(fightStyle[0], fightStyle[1]);
|
||||
}
|
||||
}
|
||||
|
||||
//if(getGame() == VRR_GAME_GTA_SA) {
|
||||
// if(doesEntityDataExist(player, "vrr.walkStyle")) {
|
||||
// let walkStyle = getEntityData(player, "vrr.walkStyle");
|
||||
// if(doesEntityDataExist(player, "agrp.walkStyle")) {
|
||||
// let walkStyle = getEntityData(player, "agrp.walkStyle");
|
||||
// player.walkStyle = walkStyle;
|
||||
// }
|
||||
//}
|
||||
|
||||
if(getGame() == VRR_GAME_GTA_IV) {
|
||||
if(doesEntityDataExist(player, "vrr.bodyPartHair")) {
|
||||
let bodyPartHead = getEntityData(player, "vrr.bodyPartHair");
|
||||
if (getGame() == VRR_GAME_GTA_IV) {
|
||||
if (doesEntityDataExist(player, "agrp.bodyPartHair")) {
|
||||
let bodyPartHead = getEntityData(player, "agrp.bodyPartHair");
|
||||
player.changeBodyPart(0, bodyPartHead[0], bodyPartHair[1]);
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(player, "vrr.bodyPartHead")) {
|
||||
let bodyPartHead = getEntityData(player, "vrr.bodyPartHead");
|
||||
if (doesEntityDataExist(player, "agrp.bodyPartHead")) {
|
||||
let bodyPartHead = getEntityData(player, "agrp.bodyPartHead");
|
||||
player.changeBodyPart(1, bodyPartHead[0], bodyPartHead[1]);
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(player, "vrr.bodyPartUpper")) {
|
||||
let bodyPartUpper = getEntityData(player, "vrr.bodyPartUpper");
|
||||
if (doesEntityDataExist(player, "agrp.bodyPartUpper")) {
|
||||
let bodyPartUpper = getEntityData(player, "agrp.bodyPartUpper");
|
||||
player.changeBodyPart(1, bodyPartUpper[0], bodyPartUpper[1]);
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(player, "vrr.bodyPartLower")) {
|
||||
let bodyPartLower = getEntityData(player, "vrr.bodyPartLower");
|
||||
if (doesEntityDataExist(player, "agrp.bodyPartLower")) {
|
||||
let bodyPartLower = getEntityData(player, "agrp.bodyPartLower");
|
||||
player.changeBodyPart(1, bodyPartLower[0], bodyPartLower[1]);
|
||||
}
|
||||
}
|
||||
|
||||
if(getGame() == VRR_GAME_GTA_IV) {
|
||||
if(doesEntityDataExist(player, "vrr.bodyPropHair")) {
|
||||
let bodyPropHair = getEntityData(player, "vrr.bodyPropHair");
|
||||
if (getGame() == VRR_GAME_GTA_IV) {
|
||||
if (doesEntityDataExist(player, "agrp.bodyPropHair")) {
|
||||
let bodyPropHair = getEntityData(player, "agrp.bodyPropHair");
|
||||
player.changeBodyProp(0, bodyPropHair[0], bodyPropHair[1]);
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(player, "vrr.bodyPropHead")) {
|
||||
let bodyPropHead = getEntityData(player, "vrr.bodyPropHead");
|
||||
if (doesEntityDataExist(player, "agrp.bodyPropHead")) {
|
||||
let bodyPropHead = getEntityData(player, "agrp.bodyPropHead");
|
||||
player.changeBodyProp(1, bodyPropHead[0], bodyPropHead[1]);
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(player, "vrr.bodyPropEyes")) {
|
||||
let bodyPropEyes = getEntityData(player, "vrr.bodyPropEyes");
|
||||
if (doesEntityDataExist(player, "agrp.bodyPropEyes")) {
|
||||
let bodyPropEyes = getEntityData(player, "agrp.bodyPropEyes");
|
||||
player.changeBodyProp(1, bodyPropEyes[0], bodyPropEyes[1]);
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(player, "vrr.bodyPropLeftHand")) {
|
||||
let bodyPropLeftHand = getEntityData(player, "vrr.bodyPropLeftHand");
|
||||
if (doesEntityDataExist(player, "agrp.bodyPropLeftHand")) {
|
||||
let bodyPropLeftHand = getEntityData(player, "agrp.bodyPropLeftHand");
|
||||
player.changeBodyProp(1, bodyPropLeftHand[0], bodyPropLeftHand[1]);
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(player, "vrr.bodyPropRightHand")) {
|
||||
let bodyPropRightHand = getEntityData(player, "vrr.bodyPropRightHand");
|
||||
if (doesEntityDataExist(player, "agrp.bodyPropRightHand")) {
|
||||
let bodyPropRightHand = getEntityData(player, "agrp.bodyPropRightHand");
|
||||
player.changeBodyProp(1, bodyPropRightHand[0], bodyPropRightHand[1]);
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(player, "vrr.bodyPropLeftWrist")) {
|
||||
let bodyPropLeftWrist = getEntityData(player, "vrr.bodyPropLeftWrist");
|
||||
if (doesEntityDataExist(player, "agrp.bodyPropLeftWrist")) {
|
||||
let bodyPropLeftWrist = getEntityData(player, "agrp.bodyPropLeftWrist");
|
||||
player.changeBodyProp(1, bodyPropLeftWrist[0], bodyPropLeftWrist[1]);
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(player, "vrr.bodyPropRightWrist")) {
|
||||
let bodyPropRightWrist = getEntityData(player, "vrr.bodyPropRightWrist");
|
||||
if (doesEntityDataExist(player, "agrp.bodyPropRightWrist")) {
|
||||
let bodyPropRightWrist = getEntityData(player, "agrp.bodyPropRightWrist");
|
||||
player.changeBodyProp(1, bodyPropRightWrist[0], bodyPropRightWrist[1]);
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(player, "vrr.bodyPropRightWrist")) {
|
||||
let bodyPropRightWrist = getEntityData(player, "vrr.bodyPropRightWrist");
|
||||
if (doesEntityDataExist(player, "agrp.bodyPropRightWrist")) {
|
||||
let bodyPropRightWrist = getEntityData(player, "agrp.bodyPropRightWrist");
|
||||
player.changeBodyProp(1, bodyPropRightWrist[0], bodyPropRightWrist[1]);
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(player, "vrr.bodyPropHip")) {
|
||||
let bodyPropHip = getEntityData(player, "vrr.bodyPropHip");
|
||||
if (doesEntityDataExist(player, "agrp.bodyPropHip")) {
|
||||
let bodyPropHip = getEntityData(player, "agrp.bodyPropHip");
|
||||
player.changeBodyProp(1, bodyPropHip[0], bodyPropHip[1]);
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(player, "vrr.bodyPropLeftFoot")) {
|
||||
let bodyPropLeftFoot = getEntityData(player, "vrr.bodyPropLeftFoot");
|
||||
if (doesEntityDataExist(player, "agrp.bodyPropLeftFoot")) {
|
||||
let bodyPropLeftFoot = getEntityData(player, "agrp.bodyPropLeftFoot");
|
||||
player.changeBodyProp(1, bodyPropLeftFoot[0], bodyPropLeftFoot[1]);
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(player, "vrr.bodyPropRightFoot")) {
|
||||
let bodyPropRightFoot = getEntityData(player, "vrr.bodyPropRightFoot");
|
||||
if (doesEntityDataExist(player, "agrp.bodyPropRightFoot")) {
|
||||
let bodyPropRightFoot = getEntityData(player, "agrp.bodyPropRightFoot");
|
||||
player.changeBodyProp(1, bodyPropRightFoot[0], bodyPropRightFoot[1]);
|
||||
}
|
||||
}
|
||||
@@ -368,18 +368,18 @@ function syncPlayerProperties(player) {
|
||||
// ===========================================================================
|
||||
|
||||
function syncElementProperties(element) {
|
||||
if(!areServerElementsSupported()) {
|
||||
if (!areServerElementsSupported()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(element, "vrr.interior")) {
|
||||
if(typeof element.interior != "undefined") {
|
||||
element.interior = getEntityData(element, "vrr.interior");
|
||||
if (doesEntityDataExist(element, "agrp.interior")) {
|
||||
if (typeof element.interior != "undefined") {
|
||||
element.interior = getEntityData(element, "agrp.interior");
|
||||
}
|
||||
}
|
||||
|
||||
if(getGame() == VRR_GAME_MAFIA_ONE) {
|
||||
switch(element.type) {
|
||||
if (getGame() == VRR_GAME_MAFIA_ONE) {
|
||||
switch (element.type) {
|
||||
case ELEMENT_VEHICLE:
|
||||
syncVehicleProperties(element);
|
||||
break;
|
||||
@@ -396,7 +396,7 @@ function syncElementProperties(element) {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
switch(element.type) {
|
||||
switch (element.type) {
|
||||
case ELEMENT_VEHICLE:
|
||||
syncVehicleProperties(element);
|
||||
break;
|
||||
@@ -419,7 +419,7 @@ function syncElementProperties(element) {
|
||||
// ===========================================================================
|
||||
|
||||
function receiveHouseFromServer(houseId, entrancePosition, blipModel, pickupModel, hasInterior) {
|
||||
if(getGame() == VRR_GAME_GTA_IV) {
|
||||
if (getGame() == VRR_GAME_GTA_IV) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -427,11 +427,11 @@ function receiveHouseFromServer(houseId, entrancePosition, blipModel, pickupMode
|
||||
// ===========================================================================
|
||||
|
||||
function setLocalPlayerPedPartsAndProps(parts, props) {
|
||||
for(let i in parts) {
|
||||
for (let i in parts) {
|
||||
localPlayer.changeBodyPart(parts[i][0], parts[i][1], parts[i][2]);
|
||||
}
|
||||
|
||||
for(let j in props) {
|
||||
for (let j in props) {
|
||||
localPlayer.changeBodyProp(props[j][0], props[j][1]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user