From f5beb73fb1a0026b682cba852f5945eba1723f12 Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Tue, 13 Jul 2021 00:55:08 -0500 Subject: [PATCH] Disable city ambience on enter/exit property --- scripts/server/misc.js | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/scripts/server/misc.js b/scripts/server/misc.js index 465a9a2a..47f28d90 100644 --- a/scripts/server/misc.js +++ b/scripts/server/misc.js @@ -130,7 +130,7 @@ function enterExitPropertyCommand(command, params, client) { getPlayerData(client).pedState = VRR_PEDSTATE_EXITINGPROPERTY; meActionToNearbyPlayers(client, "opens the door and exits the house"); fadeCamera(client, false, 1.0); - //disableCityAmbienceForPlayer(client); + disableCityAmbienceForPlayer(client); setTimeout(function() { setPlayerPosition(client, inHouse.entrancePosition); setPlayerHeading(client, inHouse.entranceRotation); @@ -161,7 +161,7 @@ function enterExitPropertyCommand(command, params, client) { clearPlayerStateToEnterExitProperty(client) meActionToNearbyPlayers(client, "opens the door and exits the business"); fadeCamera(client, false, 1.0); - //disableCityAmbienceForPlayer(client); + disableCityAmbienceForPlayer(client); setTimeout(function() { setPlayerPosition(client, inBusiness.entrancePosition); setPlayerHeading(client, inBusiness.entranceRotation); @@ -201,7 +201,7 @@ function enterExitPropertyCommand(command, params, client) { meActionToNearbyPlayers(client, "opens the door and enters the business"); getPlayerData(client).pedState = VRR_PEDSTATE_ENTERINGPROPERTY; fadeCamera(client, false, 1.0); - //disableCityAmbienceForPlayer(client); + disableCityAmbienceForPlayer(client); setTimeout(function() { setPlayerPosition(client, closestBusiness.exitPosition); setPlayerHeading(client, closestBusiness.exitRotation); @@ -237,7 +237,7 @@ function enterExitPropertyCommand(command, params, client) { meActionToNearbyPlayers(client, "opens the door and enters the house"); getPlayerData(client).pedState = VRR_PEDSTATE_ENTERINGPROPERTY; fadeCamera(client, false, 1.0); - //disableCityAmbienceForPlayer(client); + disableCityAmbienceForPlayer(client); setTimeout(function() { setPlayerPosition(client, closestHouse.exitPosition); setPlayerHeading(client, closestHouse.exitRotation); @@ -253,8 +253,6 @@ function enterExitPropertyCommand(command, params, client) { } } - //messagePlayerError(client, "You aren't close enough to a door!"); - return true; } @@ -338,4 +336,11 @@ function showPlayerPrompt(client, promptType, promptMessage, promptTitle) { } } +// =========================================================================== + +function updateServerGameTime() { + gta.time.hour = getServerConfig().hour; + gta.time.minute = getServerConfig().minute; +} + // =========================================================================== \ No newline at end of file