Stop steaming music on spawn

This commit is contained in:
Vortrex
2021-07-13 00:55:53 -05:00
parent 3032b4f11f
commit de5e16a857

View File

@@ -353,6 +353,8 @@ function selectCharacter(client, characterId = -1) {
onPlayerSpawn(client);
}, 1000);
playRadioStreamForPlayer(client, "");
getPlayerCurrentSubAccount(client).lastLogin = getCurrentUnixTimestamp();
}
@@ -381,6 +383,8 @@ function switchCharacterCommand(command, params, client) {
logToConsole(client, `Saving ${getPlayerDisplayForConsole(client)}'s subaccount (${getCharacterFullName(client)} [${getPlayerData(client).currentSubAccount}/${getPlayerCurrentSubAccount(client).databaseId}] to database`)
saveSubAccountToDatabase(getPlayerCurrentSubAccount(client));
disableCityAmbienceForPlayer(client);
resetClientStuff(client);
client.despawnPlayer();
@@ -473,6 +477,10 @@ function getPlayerCurrentSubAccount(client) {
return false;
}
if(typeof getPlayerData(client).subAccounts[subAccountId] == "undefined") {
return false;
}
return getPlayerData(client).subAccounts[subAccountId];
}