Check if player is logged in and spawned before using custom volume

This commit is contained in:
Vortrex
2021-07-25 22:17:54 -05:00
parent d9863125f7
commit 64fa2d1efe

View File

@@ -179,7 +179,7 @@ function setStreamingRadioVolumeCommand(command, params, client) {
// ===========================================================================
function getPlayerStreamingRadioVolume(client) {
if(!getPlayerData(client)) {
if(!getPlayerData(client) || !isPlayerLoggedIn(client) || !isPlayerSpawned(client)) {
return 20;
}
return getPlayerData(client).accountData.streamingRadioVolume;