Add util to stop radio stream

This commit is contained in:
Vortrex
2021-08-11 09:42:23 -05:00
parent 2aeb17c190
commit 2a24ef7b47

View File

@@ -906,6 +906,13 @@ function playRadioStreamForPlayer(client, streamURL, loop = true, volume = 0, el
// =========================================================================== // ===========================================================================
function stopRadioStreamForPlayer(client) {
logToConsole(LOG_DEBUG, `[VRR.Client] Forcing ${getPlayerDisplayForConsole(client)} to stop their radio stream`);
triggerNetworkEvent("vrr.stopRadioStream", client);
}
// ===========================================================================
function setPlayerStreamingRadioVolume(client, volumeLevel, elementId = false) { function setPlayerStreamingRadioVolume(client, volumeLevel, elementId = false) {
getPlayerData(client).accountData.streamingRadioVolume = volumeLevel; getPlayerData(client).accountData.streamingRadioVolume = volumeLevel;
getPlayerData(client).streamingRadioElement = elementId; getPlayerData(client).streamingRadioElement = elementId;
@@ -934,6 +941,14 @@ function makePedPlayAnimation(ped, animationSlot) {
// =========================================================================== // ===========================================================================
function forcePedAnimation(ped, animationSlot) {
let animationData = getAnimationData(animationSlot);
triggerNetworkEvent("vrr.forcePedAnim", null, ped.id, animationData[1], animationData[2], animationData[3], animationData[4]);
}
// ===========================================================================
function hideAllPlayerGUI(client) { function hideAllPlayerGUI(client) {
triggerNetworkEvent("vrr.hideAllGUI", client); triggerNetworkEvent("vrr.hideAllGUI", client);
} }