Update header

This commit is contained in:
Vortrex
2022-07-08 14:03:55 -05:00
parent 35251372c5
commit 9539eb20f8
114 changed files with 474 additions and 361 deletions

View File

@@ -1,6 +1,7 @@
// ===========================================================================
// Vortrex's Roleplay Resource
// https://github.com/VortrexFTW/gtac_roleplay
// Asshat Gaming Roleplay
// https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// ===========================================================================
// FILE: radio.js
// DESC: Provides internet streaming radio functions and usage
@@ -8,21 +9,21 @@
// ===========================================================================
function playStreamingRadio(url, loop, volume, element = false) {
if(streamingRadio != null) {
if (streamingRadio != null) {
streamingRadio.stop();
}
streamingRadioVolume = volume;
streamingRadio = audio.createSoundFromURL(url, loop);
streamingRadio.volume = volume/100;
streamingRadio.volume = volume / 100;
streamingRadio.play();
}
// ===========================================================================
function stopStreamingRadio() {
if(streamingRadio != null) {
if (streamingRadio != null) {
streamingRadio.stop();
}
streamingRadio = null;
@@ -31,16 +32,16 @@ function stopStreamingRadio() {
// ===========================================================================
function setStreamingRadioVolume(volume) {
if(streamingRadio != null) {
if (streamingRadio != null) {
streamingRadioVolume = volume;
streamingRadio.volume = volume/100;
streamingRadio.volume = volume / 100;
}
}
// ===========================================================================
function playAudioFile(audioName, loop, volume) {
findResourceByName("connectedrp-extra").exports.playCustomAudio(audioName, volume/100, loop);
findResourceByName("connectedrp-extra").exports.playCustomAudio(audioName, volume / 100, loop);
}
// ===========================================================================