Disable city ambience on enter/exit property

This commit is contained in:
Vortrex
2021-07-13 00:55:08 -05:00
parent c5c6d39595
commit f5beb73fb1

View File

@@ -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;
}
// ===========================================================================