Files
Elite-Gaming-FiveM/resources/holstersounds/html/ui.html
T
KingMcDonalds b436d9047b fix and remove something add new
scripts holster the pull gun out  and new mlo
2024-09-20 13:26:29 -07:00

35 lines
850 B
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Holster</title>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="app.js"></script>
<link rel="stylesheet" href="style.css">
</head>
<head>
<!-- Need to include jQuery! -->
<script src="nui://game/ui/jquery.js" type="text/javascript"></script>
<script>
var audioPlayer = null;
// Listen for NUI Messages.
window.addEventListener('message', function(event) {
// Check for playSound transaction
if (event.data.transactionType == "playSound") {
if (audioPlayer != null) {
audioPlayer.pause();
}
audioPlayer = new Audio("./sounds/" + event.data.transactionFile + ".ogg");
audioPlayer.volume = event.data.transactionVolume;
audioPlayer.play();
}
});
</script>
</head>
</html>