Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let player = GetPlayer();
- let Value = player.GetVar("Progress");
- function updateProgressBar(newValue) {
- // update the global 'value'
- value = newValue;
- // get the progress bar and text elements
- let progressbar = document.getElementById('progressbar');
- let progressText = document.querySelector('#progressContainer div:last-child');
- // update the progress bar width and text
- progressbar.style.width = value + '%';
- progressText.innerHTML = value + '% Completed';
- }
- updateProgressBar(Value);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement