Timer Bars 1.0.1

   (2 reviews)

1 Screenshot

About This File

Adds timer bars from GTA V/Online.

Installing

Drop the timerbars folder to your server's client_packages folder, then you can use const barlibrary = require('timerbars'); to add timer bars. (don't forget to check example)

TimerBar Properties

A timer bar has these properties:

  • title | Title (left text) of the timer bar. (string)
  • useProgressBar | Progress bar of the timer bar. If set to true, a progress bar will be drawn instead of right text. (bool)
  • text | Text (right text) of the timer bar, useless if useProgressBar is true. (string)
  • progress | Progress of the timer bar, useless if useProgressBar is false. (float between 0.0 - 1.0)
  • textColor | Text color of the timer bar. (rgba array)
  • pbarBgColor | Progress bar's background color. (rgba array)
  • pbarFgColor | Progress bar's foreground color. (rgba array)
  • visible | Visibility of the timer bar. (bool)

Example

const timerBarLib = require("timerbars");

// lets create some progress bars
let timeBar = new timerBarLib.TimerBar("TIME LEFT");
timeBar.text = "33:27";

let teamBar = new timerBarLib.TimerBar("TEAM MEMBERS LEFT");
teamBar.text = "4";

let healthBar = new timerBarLib.TimerBar("BOSS HEALTH", true);
healthBar.progress = 0.8;
healthBar.pbarFgColor = [224, 50, 50, 255];
healthBar.pbarBgColor = [112, 25, 25, 255];

let rewardBar = new timerBarLib.TimerBar("REWARD");
rewardBar.text = "$500000";
rewardBar.textColor = [114, 204, 114, 255];

// f7 to toggle visibility of bars
mp.keys.bind(0x76, false, () => {
    timeBar.visible = !timeBar.visible;
    teamBar.visible = !teamBar.visible;
    healthBar.visible = !healthBar.visible;
    rewardBar.visible = !rewardBar.visible;
});

// f8 will change health bar's value to something random
mp.keys.bind(0x77, false, () => {
    healthBar.progress = Math.random();
});

 


What's New in Version 1.0.1   See changelog

Released

Updated the native hash(es) used in the script. Should work on all GTA versions now.




User Feedback

Create an account or sign in to leave a review

You need to be a member in order to leave a review

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

hubba

Report ·

   2 of 2 members found this review helpful 2 / 2 members

greate)

  • Like 1

Share this review


Link to review
Adam

Report ·

   1 of 2 members found this review helpful 1 / 2 members

Good stuff, keep it up!

  • Like 1

Share this review


Link to review