Check if player int and vw are in main world before radio
This commit is contained in:
@@ -654,15 +654,17 @@ async function onPlayerSpawn(client) {
|
|||||||
stopRadioStreamForPlayer(client);
|
stopRadioStreamForPlayer(client);
|
||||||
|
|
||||||
// Start playing business/house radio if in one
|
// Start playing business/house radio if in one
|
||||||
let businessId = getPlayerBusiness(client);
|
if (getPlayerCurrentSubAccount(client).interior != getGameConfig().mainWorldInterior || getPlayerCurrentSubAccount(client).dimension != getGameConfig().mainWorldDimension) {
|
||||||
let houseId = getPlayerHouse(client);
|
let businessId = getPlayerBusiness(client);
|
||||||
if (businessId != -1) {
|
let houseId = getPlayerHouse(client);
|
||||||
if (getBusinessData(businessId).streamingRadioStation != -1) {
|
if (businessId != -1) {
|
||||||
playRadioStreamForPlayer(client, getRadioStationData(getBusinessData(businessId).streamingRadioStation).url, true, getPlayerStreamingRadioVolume(client), null);
|
if (getBusinessData(businessId).streamingRadioStation != -1) {
|
||||||
}
|
playRadioStreamForPlayer(client, getRadioStationData(getBusinessData(businessId).streamingRadioStation).url, true, getPlayerStreamingRadioVolume(client), null);
|
||||||
} else if (houseId != -1) {
|
}
|
||||||
if (getHouseData(houseId).streamingRadioStation != -1) {
|
} else if (houseId != -1) {
|
||||||
playRadioStreamForPlayer(client, getRadioStationData(getHouseData(houseId).streamingRadioStation).url, true, getPlayerStreamingRadioVolume(client), null);
|
if (getHouseData(houseId).streamingRadioStation != -1) {
|
||||||
|
playRadioStreamForPlayer(client, getRadioStationData(getHouseData(houseId).streamingRadioStation).url, true, getPlayerStreamingRadioVolume(client), null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user