Add support for interior scene change
This commit is contained in:
@@ -73,6 +73,7 @@ class BusinessData {
|
|||||||
this.entranceBlipModel = -1;
|
this.entranceBlipModel = -1;
|
||||||
this.entrancePickup = null;
|
this.entrancePickup = null;
|
||||||
this.entranceBlip = null;
|
this.entranceBlip = null;
|
||||||
|
this.entranceScene = "";
|
||||||
|
|
||||||
this.exitPosition = false;
|
this.exitPosition = false;
|
||||||
this.exitRotation = 0.0;
|
this.exitRotation = 0.0;
|
||||||
@@ -82,6 +83,7 @@ class BusinessData {
|
|||||||
this.exitBlipModel = -1;
|
this.exitBlipModel = -1;
|
||||||
this.exitPickup = null;
|
this.exitPickup = null;
|
||||||
this.exitBlip = null;
|
this.exitBlip = null;
|
||||||
|
this.exitScene = "";
|
||||||
|
|
||||||
this.entranceFee = 0;
|
this.entranceFee = 0;
|
||||||
this.till = 0;
|
this.till = 0;
|
||||||
@@ -108,6 +110,7 @@ class BusinessData {
|
|||||||
this.entranceDimension = toInteger(dbAssoc["biz_entrance_vw"]);
|
this.entranceDimension = toInteger(dbAssoc["biz_entrance_vw"]);
|
||||||
this.entrancePickupModel = toInteger(dbAssoc["biz_entrance_pickup"]);
|
this.entrancePickupModel = toInteger(dbAssoc["biz_entrance_pickup"]);
|
||||||
this.entranceBlipModel = toInteger(dbAssoc["biz_entrance_blip"]);
|
this.entranceBlipModel = toInteger(dbAssoc["biz_entrance_blip"]);
|
||||||
|
this.entranceScene = toString(dbAssoc["biz_entrance_scene"]);
|
||||||
|
|
||||||
this.exitPosition = toVector3(dbAssoc["biz_exit_pos_x"], dbAssoc["biz_exit_pos_y"], dbAssoc["biz_exit_pos_z"]);
|
this.exitPosition = toVector3(dbAssoc["biz_exit_pos_x"], dbAssoc["biz_exit_pos_y"], dbAssoc["biz_exit_pos_z"]);
|
||||||
this.exitRotation = toInteger(dbAssoc["biz_exit_rot_z"]);
|
this.exitRotation = toInteger(dbAssoc["biz_exit_rot_z"]);
|
||||||
@@ -115,6 +118,7 @@ class BusinessData {
|
|||||||
this.exitDimension = toInteger(dbAssoc["biz_exit_vw"]);
|
this.exitDimension = toInteger(dbAssoc["biz_exit_vw"]);
|
||||||
this.exitPickupModel = toInteger(dbAssoc["biz_exit_pickup"]);
|
this.exitPickupModel = toInteger(dbAssoc["biz_exit_pickup"]);
|
||||||
this.exitBlipModel = toInteger(dbAssoc["biz_exit_blip"]);
|
this.exitBlipModel = toInteger(dbAssoc["biz_exit_blip"]);
|
||||||
|
this.exitScene = toString(dbAssoc["biz_exit_scene"]);
|
||||||
|
|
||||||
this.entranceFee = toInteger(dbAssoc["biz_entrance_fee"]);
|
this.entranceFee = toInteger(dbAssoc["biz_entrance_fee"]);
|
||||||
this.till = toInteger(dbAssoc["biz_till"]);
|
this.till = toInteger(dbAssoc["biz_till"]);
|
||||||
@@ -320,7 +324,7 @@ function createBusinessCommand(command, params, client) {
|
|||||||
-1,
|
-1,
|
||||||
getPlayerInterior(client),
|
getPlayerInterior(client),
|
||||||
getPlayerDimension(client),
|
getPlayerDimension(client),
|
||||||
getPlayerData(client).interiorCutscene);
|
getPlayerData(client).interiorScene);
|
||||||
|
|
||||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} created business: {businessBlue}${params}`);
|
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} created business: {businessBlue}${params}`);
|
||||||
}
|
}
|
||||||
@@ -362,7 +366,7 @@ function createBusinessLocationCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function createBusiness(name, entrancePosition, exitPosition, entrancePickupModel = -1, entranceBlipModel = -1, entranceInterior = 0, entranceDimension = 0, entranceCutscene = -1) {
|
function createBusiness(name, entrancePosition, exitPosition, entrancePickupModel = -1, entranceBlipModel = -1, entranceInterior = 0, entranceDimension = 0, entranceScene = -1) {
|
||||||
let tempBusinessData = new BusinessData(false);
|
let tempBusinessData = new BusinessData(false);
|
||||||
tempBusinessData.name = name;
|
tempBusinessData.name = name;
|
||||||
|
|
||||||
@@ -372,7 +376,7 @@ function createBusiness(name, entrancePosition, exitPosition, entrancePickupMode
|
|||||||
tempBusinessData.entranceBlipModel = entranceBlipModel;
|
tempBusinessData.entranceBlipModel = entranceBlipModel;
|
||||||
tempBusinessData.entranceInterior = entranceInterior;
|
tempBusinessData.entranceInterior = entranceInterior;
|
||||||
tempBusinessData.entranceDimension = entranceDimension;
|
tempBusinessData.entranceDimension = entranceDimension;
|
||||||
tempBusinessData.entranceCutscene = entranceCutscene;
|
tempBusinessData.entranceScene = entranceScene;
|
||||||
|
|
||||||
tempBusinessData.exitPosition = exitPosition;
|
tempBusinessData.exitPosition = exitPosition;
|
||||||
tempBusinessData.exitRotation = 0.0;
|
tempBusinessData.exitRotation = 0.0;
|
||||||
@@ -380,7 +384,7 @@ function createBusiness(name, entrancePosition, exitPosition, entrancePickupMode
|
|||||||
tempBusinessData.exitBlipModel = -1;
|
tempBusinessData.exitBlipModel = -1;
|
||||||
tempBusinessData.exitInterior = 0;
|
tempBusinessData.exitInterior = 0;
|
||||||
tempBusinessData.exitDimension = 0;
|
tempBusinessData.exitDimension = 0;
|
||||||
tempBusinessData.exitCutscene = -1;
|
tempBusinessData.exitScene = -1;
|
||||||
|
|
||||||
tempBusinessData.needsSaved = true;
|
tempBusinessData.needsSaved = true;
|
||||||
let businessId = getServerData().businesses.push(tempBusinessData);
|
let businessId = getServerData().businesses.push(tempBusinessData);
|
||||||
@@ -1099,7 +1103,8 @@ function setBusinessInteriorTypeCommand(command, params, client) {
|
|||||||
getBusinessData(businessId).exitDimension = 0;
|
getBusinessData(businessId).exitDimension = 0;
|
||||||
getBusinessData(businessId).exitInterior = -1;
|
getBusinessData(businessId).exitInterior = -1;
|
||||||
getBusinessData(businessId).hasInterior = false;
|
getBusinessData(businessId).hasInterior = false;
|
||||||
getBusinessData(businessId).interiorCutscene = "";
|
getBusinessData(businessId).entranceScene = "";
|
||||||
|
getBusinessData(businessId).exitScene = "";
|
||||||
getBusinessData(businessId).exitPickupModel = -1;
|
getBusinessData(businessId).exitPickupModel = -1;
|
||||||
getBusinessData(businessId).customInterior = false;
|
getBusinessData(businessId).customInterior = false;
|
||||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} removed business {businessBlue}${getBusinessData(businessId).name}{MAINCOLOUR} interior`);
|
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} removed business {businessBlue}${getBusinessData(businessId).name}{MAINCOLOUR} interior`);
|
||||||
@@ -1124,7 +1129,14 @@ function setBusinessInteriorTypeCommand(command, params, client) {
|
|||||||
getBusinessData(businessId).exitPickupModel = getGameConfig().pickupModels[getGame()].Exit;
|
getBusinessData(businessId).exitPickupModel = getGameConfig().pickupModels[getGame()].Exit;
|
||||||
getBusinessData(businessId).hasInterior = true;
|
getBusinessData(businessId).hasInterior = true;
|
||||||
getBusinessData(businessId).customInterior = getGameConfig().interiors[getGame()][typeParam][2];
|
getBusinessData(businessId).customInterior = getGameConfig().interiors[getGame()][typeParam][2];
|
||||||
getBusinessData(businessId).interiorCutscene = getGameConfig().interiors[getGame()][typeParam][3];
|
|
||||||
|
if (isGameFeatureSupported("interiorScene")) {
|
||||||
|
if (isMainWorldScene(getPlayerData(client).scene)) {
|
||||||
|
getBusinessData(businessId).exitScene = getGameConfig().mainWorldScene[getGame()];
|
||||||
|
} else {
|
||||||
|
getBusinessData(businessId).exitScene = getGameConfig().interiors[getGame()][typeParam][3];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//deleteBusinessExitPickup(businessId);
|
//deleteBusinessExitPickup(businessId);
|
||||||
@@ -1183,7 +1195,7 @@ function addBusinessPropertyTemplateEntities(command, params, client) {
|
|||||||
getBusinessData(businessId).exitPickupModel = getGameConfig().pickupModels[getGame()].Exit;
|
getBusinessData(businessId).exitPickupModel = getGameConfig().pickupModels[getGame()].Exit;
|
||||||
getBusinessData(businessId).hasInterior = true;
|
getBusinessData(businessId).hasInterior = true;
|
||||||
getBusinessData(businessId).customInterior = getGameConfig().interiors[getGame()][typeParam][2];
|
getBusinessData(businessId).customInterior = getGameConfig().interiors[getGame()][typeParam][2];
|
||||||
getBusinessData(businessId).interiorCutscene = getGameConfig().interiors[getGame()][typeParam][3];
|
getBusinessData(businessId).interiorScene = getGameConfig().interiors[getGame()][typeParam][3];
|
||||||
}
|
}
|
||||||
|
|
||||||
//deleteBusinessExitPickup(businessId);
|
//deleteBusinessExitPickup(businessId);
|
||||||
@@ -1903,7 +1915,7 @@ function saveBusinessToDatabase(businessId) {
|
|||||||
["biz_entrance_vw", tempBusinessData.entranceDimension],
|
["biz_entrance_vw", tempBusinessData.entranceDimension],
|
||||||
["biz_entrance_pickup", tempBusinessData.entrancePickupModel],
|
["biz_entrance_pickup", tempBusinessData.entrancePickupModel],
|
||||||
["biz_entrance_blip", tempBusinessData.entranceBlipModel],
|
["biz_entrance_blip", tempBusinessData.entranceBlipModel],
|
||||||
//["biz_entrance_cutscene", tempBusinessData.entranceCutscene],
|
["biz_entrance_scene", tempBusinessData.entranceScene],
|
||||||
["biz_exit_pos_x", tempBusinessData.exitPosition.x],
|
["biz_exit_pos_x", tempBusinessData.exitPosition.x],
|
||||||
["biz_exit_pos_y", tempBusinessData.exitPosition.y],
|
["biz_exit_pos_y", tempBusinessData.exitPosition.y],
|
||||||
["biz_exit_pos_z", tempBusinessData.exitPosition.z],
|
["biz_exit_pos_z", tempBusinessData.exitPosition.z],
|
||||||
@@ -1912,7 +1924,7 @@ function saveBusinessToDatabase(businessId) {
|
|||||||
["biz_exit_vw", tempBusinessData.exitDimension],
|
["biz_exit_vw", tempBusinessData.exitDimension],
|
||||||
["biz_exit_pickup", tempBusinessData.exitPickupModel],
|
["biz_exit_pickup", tempBusinessData.exitPickupModel],
|
||||||
["biz_exit_blip", tempBusinessData.exitBlipModel],
|
["biz_exit_blip", tempBusinessData.exitBlipModel],
|
||||||
//["biz_exit_cutscene", tempBusinessData.exitCutscene],
|
["biz_exit_scene", tempBusinessData.exitScene],
|
||||||
["biz_has_interior", boolToInt(tempBusinessData.hasInterior)],
|
["biz_has_interior", boolToInt(tempBusinessData.hasInterior)],
|
||||||
["biz_interior_lights", boolToInt(tempBusinessData.interiorLights)],
|
["biz_interior_lights", boolToInt(tempBusinessData.interiorLights)],
|
||||||
["biz_label_help_type", tempBusinessData.labelHelpType],
|
["biz_label_help_type", tempBusinessData.labelHelpType],
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ class ClientData {
|
|||||||
this.locale = 0;
|
this.locale = 0;
|
||||||
this.enteringVehicle = null;
|
this.enteringVehicle = null;
|
||||||
this.customDisconnectReason = "";
|
this.customDisconnectReason = "";
|
||||||
this.interiorCutscene = -1;
|
this.scene = "";
|
||||||
this.playerBlip = null;
|
this.playerBlip = null;
|
||||||
this.alcoholLevel = 0;
|
this.alcoholLevel = 0;
|
||||||
this.pedState = AGRP_PEDSTATE_NONE;
|
this.pedState = AGRP_PEDSTATE_NONE;
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ class HouseData {
|
|||||||
this.entranceBlipModel = -1;
|
this.entranceBlipModel = -1;
|
||||||
this.entrancePickup = null;
|
this.entrancePickup = null;
|
||||||
this.entranceBlip = null;
|
this.entranceBlip = null;
|
||||||
|
this.entranceScene = "";
|
||||||
|
|
||||||
this.exitPosition = false;
|
this.exitPosition = false;
|
||||||
this.exitRotation = 0.0;
|
this.exitRotation = 0.0;
|
||||||
@@ -64,6 +65,7 @@ class HouseData {
|
|||||||
this.exitBlipModel = -1;
|
this.exitBlipModel = -1;
|
||||||
this.exitPickup = null;
|
this.exitPickup = null;
|
||||||
this.exitBlip = null;
|
this.exitBlip = null;
|
||||||
|
this.exitScene = "";
|
||||||
|
|
||||||
this.streamingRadioStation = 0;
|
this.streamingRadioStation = 0;
|
||||||
this.streamingRadioStationIndex = -1;
|
this.streamingRadioStationIndex = -1;
|
||||||
@@ -86,6 +88,7 @@ class HouseData {
|
|||||||
this.entranceDimension = toInteger(dbAssoc["house_entrance_vw"]);
|
this.entranceDimension = toInteger(dbAssoc["house_entrance_vw"]);
|
||||||
this.entrancePickupModel = toInteger(dbAssoc["house_entrance_pickup"]);
|
this.entrancePickupModel = toInteger(dbAssoc["house_entrance_pickup"]);
|
||||||
this.entranceBlipModel = toInteger(dbAssoc["house_entrance_blip"]);
|
this.entranceBlipModel = toInteger(dbAssoc["house_entrance_blip"]);
|
||||||
|
this.entranceScene = toString(dbAssoc["house_entrance_scene"]);
|
||||||
|
|
||||||
this.exitPosition = toVector3(toFloat(dbAssoc["house_exit_pos_x"]), toFloat(dbAssoc["house_exit_pos_y"]), toFloat(dbAssoc["house_exit_pos_z"]));
|
this.exitPosition = toVector3(toFloat(dbAssoc["house_exit_pos_x"]), toFloat(dbAssoc["house_exit_pos_y"]), toFloat(dbAssoc["house_exit_pos_z"]));
|
||||||
this.exitRotation = toFloat(dbAssoc["house_exit_rot_z"]);
|
this.exitRotation = toFloat(dbAssoc["house_exit_rot_z"]);
|
||||||
@@ -93,6 +96,7 @@ class HouseData {
|
|||||||
this.exitDimension = toInteger(dbAssoc["house_exit_vw"]);
|
this.exitDimension = toInteger(dbAssoc["house_exit_vw"]);
|
||||||
this.exitPickupModel = toInteger(dbAssoc["house_exit_pickup"]);
|
this.exitPickupModel = toInteger(dbAssoc["house_exit_pickup"]);
|
||||||
this.exitBlipModel = toInteger(dbAssoc["house_exit_blip"]);
|
this.exitBlipModel = toInteger(dbAssoc["house_exit_blip"]);
|
||||||
|
this.exitScene = toString(dbAssoc["house_exit_scene"]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -211,7 +215,7 @@ function createHouseCommand(command, params, client) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
createHouse(params, getPlayerPosition(client), toVector3(0.0, 0.0, 0.0), getGameConfig().pickupModels[getGame()].House, -1, getPlayerInterior(client), getPlayerDimension(client), getPlayerData(client).interiorCutscene);
|
createHouse(params, getPlayerPosition(client), toVector3(0.0, 0.0, 0.0), getGameConfig().pickupModels[getGame()].House, -1, getPlayerInterior(client), getPlayerDimension(client), getPlayerData(client).interiorScene);
|
||||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} created house: {houseGreen}${params}`);
|
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} created house: {houseGreen}${params}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -768,7 +772,7 @@ function removePlayersFromHouse(houseIndex) {
|
|||||||
* @return {bool} Whether or not the player was successfully removed from the house
|
* @return {bool} Whether or not the player was successfully removed from the house
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
function createHouse(description, entrancePosition, exitPosition, entrancePickupModel = -1, entranceBlipModel = -1, entranceInterior = 0, entranceDimension = 0, entranceCutscene = -1) {
|
function createHouse(description, entrancePosition, exitPosition, entrancePickupModel = -1, entranceBlipModel = -1, entranceInterior = 0, entranceDimension = 0, entranceScene = -1) {
|
||||||
let tempHouseData = new HouseData(false);
|
let tempHouseData = new HouseData(false);
|
||||||
tempHouseData.description = description;
|
tempHouseData.description = description;
|
||||||
|
|
||||||
@@ -778,7 +782,7 @@ function createHouse(description, entrancePosition, exitPosition, entrancePickup
|
|||||||
tempHouseData.entranceBlipModel = entranceBlipModel;
|
tempHouseData.entranceBlipModel = entranceBlipModel;
|
||||||
tempHouseData.entranceInterior = entranceInterior;
|
tempHouseData.entranceInterior = entranceInterior;
|
||||||
tempHouseData.entranceDimension = entranceDimension;
|
tempHouseData.entranceDimension = entranceDimension;
|
||||||
tempHouseData.entranceCutscene = entranceCutscene;
|
tempHouseData.entranceScene = entranceScene;
|
||||||
|
|
||||||
tempHouseData.exitPosition = exitPosition;
|
tempHouseData.exitPosition = exitPosition;
|
||||||
tempHouseData.exitRotation = 0.0;
|
tempHouseData.exitRotation = 0.0;
|
||||||
@@ -786,7 +790,7 @@ function createHouse(description, entrancePosition, exitPosition, entrancePickup
|
|||||||
tempHouseData.exitBlipModel = -1;
|
tempHouseData.exitBlipModel = -1;
|
||||||
tempHouseData.exitInterior = 0;
|
tempHouseData.exitInterior = 0;
|
||||||
tempHouseData.exitDimension = 0;
|
tempHouseData.exitDimension = 0;
|
||||||
tempHouseData.exitCutscene = -1;
|
tempHouseData.exitScene = -1;
|
||||||
|
|
||||||
tempHouseData.needsSaved = true;
|
tempHouseData.needsSaved = true;
|
||||||
|
|
||||||
@@ -917,7 +921,7 @@ function saveHouseToDatabase(houseId) {
|
|||||||
["house_entrance_vw", tempHouseData.entranceDimension],
|
["house_entrance_vw", tempHouseData.entranceDimension],
|
||||||
["house_entrance_pickup", tempHouseData.entrancePickupModel],
|
["house_entrance_pickup", tempHouseData.entrancePickupModel],
|
||||||
["house_entrance_blip", tempHouseData.entranceBlipModel],
|
["house_entrance_blip", tempHouseData.entranceBlipModel],
|
||||||
//["house_entrance_cutscene", tempHouseData.entranceCutscene],
|
["house_entrance_scene", tempHouseData.entranceScene],
|
||||||
["house_exit_pos_x", tempHouseData.exitPosition.x],
|
["house_exit_pos_x", tempHouseData.exitPosition.x],
|
||||||
["house_exit_pos_y", tempHouseData.exitPosition.y],
|
["house_exit_pos_y", tempHouseData.exitPosition.y],
|
||||||
["house_exit_pos_z", tempHouseData.exitPosition.z],
|
["house_exit_pos_z", tempHouseData.exitPosition.z],
|
||||||
@@ -926,7 +930,7 @@ function saveHouseToDatabase(houseId) {
|
|||||||
["house_exit_vw", tempHouseData.exitDimension],
|
["house_exit_vw", tempHouseData.exitDimension],
|
||||||
["house_exit_pickup", tempHouseData.exitPickupModel],
|
["house_exit_pickup", tempHouseData.exitPickupModel],
|
||||||
["house_exit_blip", tempHouseData.exitBlipModel],
|
["house_exit_blip", tempHouseData.exitBlipModel],
|
||||||
//["house_exit_cutscene", tempHouseData.exitCutscene],
|
["house_exit_scene", tempHouseData.exitScene],
|
||||||
["house_buy_price", tempHouseData.buyPrice],
|
["house_buy_price", tempHouseData.buyPrice],
|
||||||
["house_rent_price", tempHouseData.rentPrice],
|
["house_rent_price", tempHouseData.rentPrice],
|
||||||
["house_has_interior", boolToInt(tempHouseData.hasInterior)],
|
["house_has_interior", boolToInt(tempHouseData.hasInterior)],
|
||||||
|
|||||||
@@ -304,35 +304,41 @@ function enterExitPropertyCommand(command, params, client) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
setPlayerInCutsceneInterior(client, closestProperty.exitCutscene);
|
if (closestProperty.exitScene != "" && isGameFeatureSupported("interiorScene")) {
|
||||||
setPlayerDimension(client, closestProperty.exitDimension);
|
if (isMainWorldScene(closestProperty.exitScene)) {
|
||||||
setPlayerInterior(client, closestProperty.exitInterior);
|
setPlayerScene(client, getGameConfig().mainWorldScene[getGame()]);
|
||||||
setPlayerPosition(client, closestProperty.exitPosition);
|
} else {
|
||||||
setPlayerHeading(client, closestProperty.exitRotation);
|
setPlayerScene(client, closestProperty.exitScene);
|
||||||
setTimeout(function () {
|
|
||||||
if (isFadeCameraSupported()) {
|
|
||||||
fadeCamera(client, true, 1.0);
|
|
||||||
}
|
}
|
||||||
updateInteriorLightsForPlayer(client, closestProperty.interiorLights);
|
} else {
|
||||||
}, 1000);
|
setPlayerDimension(client, closestProperty.exitDimension);
|
||||||
//setPlayerInCutsceneInterior(client, closestProperty.exitCutscene);
|
setPlayerInterior(client, closestProperty.exitInterior);
|
||||||
//updateAllInteriorVehiclesForPlayer(client, closestProperty.exitInterior, closestProperty.exitDimension);
|
setPlayerPosition(client, closestProperty.exitPosition);
|
||||||
|
setPlayerHeading(client, closestProperty.exitRotation);
|
||||||
|
setTimeout(function () {
|
||||||
|
if (isFadeCameraSupported()) {
|
||||||
|
fadeCamera(client, true, 1.0);
|
||||||
|
}
|
||||||
|
updateInteriorLightsForPlayer(client, closestProperty.interiorLights);
|
||||||
|
}, 1000);
|
||||||
|
//updateAllInteriorVehiclesForPlayer(client, closestProperty.exitInterior, closestProperty.exitDimension);
|
||||||
|
|
||||||
|
if (isBusiness) {
|
||||||
|
if (closestProperty.type == AGRP_BIZ_TYPE_PAINTBALL) {
|
||||||
|
messagePlayerAlert(client, getLocaleString(client, "JoinedPaintBall"));
|
||||||
|
startPaintBall(client);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let radioStationIndex = closestProperty.streamingRadioStationIndex;
|
||||||
|
if (radioStationIndex != -1) {
|
||||||
|
if (getRadioStationData(radioStationIndex)) {
|
||||||
|
playRadioStreamForPlayer(client, getRadioStationData(radioStationIndex).url);
|
||||||
|
getPlayerData(client).streamingRadioStation = radioStationIndex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}, 1100);
|
}, 1100);
|
||||||
|
|
||||||
if (isBusiness) {
|
|
||||||
if (closestProperty.type == AGRP_BIZ_TYPE_PAINTBALL) {
|
|
||||||
messagePlayerAlert(client, getLocaleString(client, "JoinedPaintBall"));
|
|
||||||
startPaintBall(client);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
let radioStationIndex = closestProperty.streamingRadioStationIndex;
|
|
||||||
if (radioStationIndex != -1) {
|
|
||||||
if (getRadioStationData(radioStationIndex)) {
|
|
||||||
playRadioStreamForPlayer(client, getRadioStationData(radioStationIndex).url);
|
|
||||||
getPlayerData(client).streamingRadioStation = radioStationIndex;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -352,53 +358,59 @@ function enterExitPropertyCommand(command, params, client) {
|
|||||||
|
|
||||||
disableCityAmbienceForPlayer(client, true);
|
disableCityAmbienceForPlayer(client, true);
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
setPlayerInCutsceneInterior(client, closestProperty.entranceCutscene);
|
if (closestProperty.entranceScene != "" && isGameFeatureSupported("interiorScene")) {
|
||||||
setPlayerPosition(client, closestProperty.entrancePosition);
|
if (isMainWorldScene(closestProperty.entranceScene)) {
|
||||||
setPlayerHeading(client, closestProperty.entranceRotation);
|
setPlayerScene(client, "agrp.mainWorldScene");
|
||||||
setPlayerDimension(client, closestProperty.entranceDimension);
|
} else {
|
||||||
setPlayerInterior(client, closestProperty.entranceInterior);
|
setPlayerScene(client, closestProperty.entranceScene);
|
||||||
setTimeout(function () {
|
}
|
||||||
if (isFadeCameraSupported()) {
|
} else {
|
||||||
fadeCamera(client, true, 1.0);
|
setPlayerPosition(client, closestProperty.entrancePosition);
|
||||||
|
setPlayerHeading(client, closestProperty.entranceRotation);
|
||||||
|
setPlayerDimension(client, closestProperty.entranceDimension);
|
||||||
|
setPlayerInterior(client, closestProperty.entranceInterior);
|
||||||
|
setTimeout(function () {
|
||||||
|
if (isFadeCameraSupported()) {
|
||||||
|
fadeCamera(client, true, 1.0);
|
||||||
|
}
|
||||||
|
|
||||||
|
updateInteriorLightsForPlayer(client, true);
|
||||||
|
}, 1000);
|
||||||
|
|
||||||
|
if (isBusiness) {
|
||||||
|
if (closestProperty.type == AGRP_BIZ_TYPE_PAINTBALL) {
|
||||||
|
messagePlayerAlert(client, getLocaleString(client, "LeftPaintBall"));
|
||||||
|
stopPaintBall(client);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
updateInteriorLightsForPlayer(client, true);
|
clearLocalPickupsForPlayer(client);
|
||||||
}, 1000);
|
|
||||||
|
//setPlayerInCutsceneInterior(client, closestProperty.entranceCutscene);
|
||||||
|
stopRadioStreamForPlayer(client);
|
||||||
|
getPlayerData(client).streamingRadioStation = -1;
|
||||||
|
|
||||||
|
// Check if exiting property was into another house/business and set radio station accordingly
|
||||||
|
let inHouse = getPlayerHouse(client);
|
||||||
|
let inBusiness = getPlayerBusiness(client);
|
||||||
|
|
||||||
|
if (inBusiness != -1) {
|
||||||
|
if (getBusinessData(inBusiness).streamingRadioStationIndex != -1) {
|
||||||
|
if (getRadioStationData(getBusinessData(inBusiness).streamingRadioStationIndex)) {
|
||||||
|
playRadioStreamForPlayer(client, getRadioStationData(getBusinessData(inBusiness).streamingRadioStationIndex).url);
|
||||||
|
getPlayerData(client).streamingRadioStation = getBusinessData(inBusiness).streamingRadioStationIndex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (inHouse != -1) {
|
||||||
|
if (getHouseData(inHouse).streamingRadioStationIndex != -1) {
|
||||||
|
if (getRadioStationData(getHouseData(inHouse).streamingRadioStationIndex)) {
|
||||||
|
playRadioStreamForPlayer(client, getRadioStationData(getHouseData(inHouse).streamingRadioStationIndex).url);
|
||||||
|
getPlayerData(client).streamingRadioStation = getHouseData(inHouse).streamingRadioStationIndex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}, 1100);
|
}, 1100);
|
||||||
|
|
||||||
if (isBusiness) {
|
|
||||||
if (closestProperty.type == AGRP_BIZ_TYPE_PAINTBALL) {
|
|
||||||
messagePlayerAlert(client, getLocaleString(client, "LeftPaintBall"));
|
|
||||||
stopPaintBall(client);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
clearLocalPickupsForPlayer(client);
|
|
||||||
|
|
||||||
//setPlayerInCutsceneInterior(client, closestProperty.entranceCutscene);
|
|
||||||
stopRadioStreamForPlayer(client);
|
|
||||||
getPlayerData(client).streamingRadioStation = -1;
|
|
||||||
|
|
||||||
// Check if exiting property was into another house/business and set radio station accordingly
|
|
||||||
let inHouse = getPlayerHouse(client);
|
|
||||||
let inBusiness = getPlayerBusiness(client);
|
|
||||||
|
|
||||||
if (inBusiness != -1) {
|
|
||||||
if (getBusinessData(inBusiness).streamingRadioStationIndex != -1) {
|
|
||||||
if (getRadioStationData(getBusinessData(inBusiness).streamingRadioStationIndex)) {
|
|
||||||
playRadioStreamForPlayer(client, getRadioStationData(getBusinessData(inBusiness).streamingRadioStationIndex).url);
|
|
||||||
getPlayerData(client).streamingRadioStation = getBusinessData(inBusiness).streamingRadioStationIndex;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (inHouse != -1) {
|
|
||||||
if (getHouseData(inHouse).streamingRadioStationIndex != -1) {
|
|
||||||
if (getRadioStationData(getHouseData(inHouse).streamingRadioStationIndex)) {
|
|
||||||
playRadioStreamForPlayer(client, getRadioStationData(getHouseData(inHouse).streamingRadioStationIndex).url);
|
|
||||||
getPlayerData(client).streamingRadioStation = getHouseData(inHouse).streamingRadioStationIndex;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//logToConsole(LOG_DEBUG, `[VRR.Misc] ${getPlayerDisplayForConsole(client)} exited business ${inBusiness.name}[${inBusiness.index}/${inBusiness.databaseId}]`);
|
//logToConsole(LOG_DEBUG, `[VRR.Misc] ${getPlayerDisplayForConsole(client)} exited business ${inBusiness.name}[${inBusiness.index}/${inBusiness.databaseId}]`);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1176,9 +1176,9 @@ function requestPlayerPedNetworkId(client) {
|
|||||||
|
|
||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
|
|
||||||
function setPlayerInCutsceneInterior(client, cutsceneName) {
|
function setPlayerScene(client, sceneName) {
|
||||||
getPlayerData(client).interiorCutscene = cutsceneName;
|
getPlayerData(client).scene = sceneName;
|
||||||
sendNetworkEventToPlayer("agrp.cutsceneInterior", client, cutsceneName);
|
sendNetworkEventToPlayer("agrp.scene", client, sceneName);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
|
|||||||
Reference in New Issue
Block a user