ed
This commit is contained in:
parent
48844d7321
commit
769454360e
72 changed files with 734 additions and 0 deletions
97
resources/[tools]/cfx_nteam_train_scenario/html/index.html
Normal file
97
resources/[tools]/cfx_nteam_train_scenario/html/index.html
Normal file
|
@ -0,0 +1,97 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>NTeam Train Scenario</title>
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
.button-container, .welcome-container {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
background: rgba(0, 0, 0, 0.7);
|
||||
color: white;
|
||||
padding: 10px 20px;
|
||||
border-radius: 5px;
|
||||
font-family: Arial, sans-serif;
|
||||
font-size: 18px;
|
||||
text-align: center;
|
||||
display: none;
|
||||
}
|
||||
.button-container {
|
||||
bottom: 50px;
|
||||
}
|
||||
.welcome-container {
|
||||
top: 30%;
|
||||
width: 100%;
|
||||
height: 300px;
|
||||
font-size: 50px;
|
||||
display: none;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
opacity: 1;
|
||||
transition: opacity 1s ease-out; /* Fade-out transition */
|
||||
}
|
||||
.welcome-container.fade-out {
|
||||
opacity: 0;
|
||||
}
|
||||
.welcome-container div {
|
||||
flex-grow: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.welcome-container span {
|
||||
color: turquoise;
|
||||
}
|
||||
.button-container span {
|
||||
color: red;
|
||||
}
|
||||
.logo {
|
||||
display: block;
|
||||
margin: 10px auto;
|
||||
width: 300px;
|
||||
height: 300px;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
window.addEventListener('message', function(event) {
|
||||
if (event.data.action === 'showUI') {
|
||||
document.querySelector('.button-container').style.display = 'block';
|
||||
} else if (event.data.action === 'hideUI') {
|
||||
document.querySelector('.button-container').style.display = 'none';
|
||||
} else if (event.data.action === 'showWelcome') {
|
||||
document.querySelector('.welcome-container').style.display = 'flex';
|
||||
document.querySelector('.welcome-container').classList.remove('fade-out');
|
||||
playWelcomeSound();
|
||||
} else if (event.data.action === 'hideWelcome') {
|
||||
const welcomeContainer = document.querySelector('.welcome-container');
|
||||
welcomeContainer.classList.add('fade-out');
|
||||
setTimeout(function() {
|
||||
welcomeContainer.style.display = 'none';
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
function playWelcomeSound() {
|
||||
let audio = new Audio(`nui://${GetParentResourceName()}/html/sounds/welcome.mp3`); // Replace with your sound file
|
||||
audio.play();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="button-container">PRESS<span> SPACE</span> TO CHANGE CAMERA</div>
|
||||
<div class="welcome-container">
|
||||
<!-- IF YOU WANT TO USE MESSAGE UNCOMMENT THIS LINE UNDER THIS COMMENT AND IF YOU WANT TO USE JUST LOGO UPLOAD IT AND EDIT LINK -->
|
||||
<!-- <div>WELCOME TO <span>NTEAM</span> SERVER</div> -->
|
||||
<img class="logo" src="https://iili.io/2txUqIR.png" alt="">
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue