Stop steaming music on spawn
This commit is contained in:
@@ -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];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user