Check if player is logged in and spawned before using custom volume
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user