[RELEASE] Badger-Priorities (A better Priority Cooldown script)

Documentation as well as updates to this resource have been moved to: Badger-Priorities - Badger Docs

What is it?

So it’s just a priority cooldown script… I know what you’re thinking. This is already a thing, it’s already made! Well actually I found problems with the ones I found on the Fivem forums, so I decided to make a new one with some extra features. Another feature is that when the cooldowns are on (priority in progress, priorities on hold, or cooldown is above 0), then a message will be displayed to players driving a car 80 MPH or faster. This can be disabled in the configuration file too if you don’t want this feature though.

Commands

/cooldown <time> Sets the amount of time priority cooldown is on (minutes)

/inprogress Sets the priority to in progress. Use this when a priority begins.

/onhold This puts all priorities on hold. It is an alternative to PeaceTime except players are able to attack others.

/resetpcd Changes Priority Cooldown back to 0 Minutes.

Permissions

add_ace group.trialmoderator Badger-Priorities.ResetPCD allow - Allowed to use /resetpcd

add_ace group.trialmoderator Badger-Priorities.InProgress allow - Allowed to use /inprogress

add_ace group.trialmoderator Badger-Priorities.OnHold allow - Allowed to use /onhold

add_ace group.trialmoderator Badger-Priorities.Cooldown allow - Allowed to use /cooldown

add_ace group.trialmoderator Badger-Priorities.Commands allow - Allowed to use all commands in the script

Screenshots

https://i.gyazo.com/877b6cc2c933453c272da2c27efdeaf5.gif

Configuration

Thanks to @CallMeJabro for the better configuration file

Config = {
	prefix = "^7[^1Badger-Priorities^7] ^3",
	Options = {
		EnableSpeedMessage = true,
		EnablePCDMessage = true,
		EnableHoldMessage = true,
		EnableProgressMessage = true,
		EnableCooldownMessage = true,
		AlwaysDisplay = true, -- Always display the priority cooldown text even with 0 mins left?
		CooldownDisplay = "~w~Priority Cooldown: ~r~{MINS} ~w~mins",
		InProgressDisplay = "~w~Priority Cooldown: ~g~Priority in Progress",
		OnHoldDisplay = "~w~Priority Cooldown: ~b~Priorities are on Hold",
		-- TooFastDisplay triggers when a car is going over 80 MPH and priorities are in progress, on hold, or a cooldown is active 
		TooFastDisplay = "~r~NOTICE: ~b~You cannot run from police currently. You are risking staff punishment!",
		resetDisplay = "~r~Cooldown: ~b~None"
	},
	Messages = {
		CooldownMessage = 'A priority was just conducted... The cooldown has been activated. ' -- You can also use {MINS} parameter here
		.. '^1You cannot run from police or cause any priorities (violent RP) until the cooldown has concluded!',
		InProgressMessage = 'There is a priority in progress... ^1You cannot run from police or cause any priorities (violent RP) until priorities are off hold!',
		OnHoldMessage = 'Priorities are now on hold... ^1You cannot run from police or cause any priorities (violent RP) until priorities are off hold!',
		resetMessage = 'Priorities Have Been Reset!'
	}, 
	DisplayLocation = {
		x = .50,
		y = .005
	}
}

Download

10 Likes

This is the most alpha script ever to exist 100/10

1 Like

this script hits P ON GOD

1 Like

very good release

1 Like

Is there a way to allow the commands to be done via cmd/rcon?

I can probably add a few quick commands like /ronhold, /rinprogress, /rcooldown, /rresetpcd that can only be ran through a console if that works? I can work on that right now if that’s cool.

That would be amazing, because we use a panel where I can insert rcon commands so I dont have to whitelist staff:)

Nice useful script

1 Like

Update is now live on the GitHub! I used the same commands as in-game, so no need to remember any extra command syntax. Just use the commands from console and it should work fine. :slight_smile:

1 Like

Thanks but I get this error in console? Any ideas
image

It seems it’s not detecting it as a number, did you run the command correctly?

I write in cooldown 10 as an example and it is coming. Same came before the update too so it’s weird.

Just pushed the fix and tested it. Fully works now. Sorry about that.

Amazing! Thanks for the great support.

1 Like

its doesnt change for me when I enter a command

love it… much better than other ones out there, my server will love this

1 Like

Did you use the permissions?

Enjoy!

NEW UPDATE

More in depth configuration thanks to @CallMeJabro

Config = {
	prefix = "^7[^1Badger-Priorities^7] ^3",
	Options = {
		EnableSpeedMessage = true,
		EnablePCDMessage = true,
		EnableHoldMessage = true,
		EnableProgressMessage = true,
		EnableCooldownMessage = true,
		AlwaysDisplay = true, -- Always display the priority cooldown text even with 0 mins left?
		CooldownDisplay = "~w~Priority Cooldown: ~r~{MINS} ~w~mins",
		InProgressDisplay = "~w~Priority Cooldown: ~g~Priority in Progress",
		OnHoldDisplay = "~w~Priority Cooldown: ~b~Priorities are on Hold",
		-- TooFastDisplay triggers when a car is going over 80 MPH and priorities are in progress, on hold, or a cooldown is active 
		TooFastDisplay = "~r~NOTICE: ~b~You cannot run from police currently. You are risking staff punishment!",
		resetDisplay = "~r~Cooldown: ~b~None"
	},
	Messages = {
		CooldownMessage = 'A priority was just conducted... The cooldown has been activated. ' -- You can also use {MINS} parameter here
		.. '^1You cannot run from police or cause any priorities (violent RP) until the cooldown has concluded!',
		InProgressMessage = 'There is a priority in progress... ^1You cannot run from police or cause any priorities (violent RP) until priorities are off hold!',
		OnHoldMessage = 'Priorities are now on hold... ^1You cannot run from police or cause any priorities (violent RP) until priorities are off hold!',
		resetMessage = 'Priorities Have Been Reset!'
	}, 
	DisplayLocation = {
		x = .50,
		y = .005
	}
}

Out of curiosity, if it’s set to On Hold or any other setting other than nothing, will that show for people who log in after it’s set? Our current Priority script, if we have it set to On Hold and someone logs in after we set that, it does not show them that it’s On Hold.