[Release] Priority Cooldown

Is there a way to remove the text when the counter gets to 0?

Check LanceGood’s version.

Your Version Makes It So Everything But The Priority Cooldown Dissapear. Is There A Way To Fix That?

Is there any way you can share the scripts for this version if allowed

such cool many w0w

Well I mean you could assign a recording boolean of a record command which would disable all of your hud and draw text.

I’m down to share what I have done but I am not putting up a download in respect to the author(s).

I used v2 instead of v3. If you know the part of the script I bet you can move it over to v3 make it look like this. This also doesn’t include the Compass or the Current AOP and all that. Those are all separate resources to make it look like one.

client.lua

local cooldown = 0
local ispriority = false
local ishold = false

RegisterCommand("resetpcd", function()
    TriggerServerEvent("cancelcooldown")
end, false)

RegisterNetEvent('UpdateCooldown')
AddEventHandler('UpdateCooldown', function(newCooldown)
    cooldown = newCooldown
end)

RegisterNetEvent('UpdatePriority')
AddEventHandler('UpdatePriority', function(newispriority)
    ispriority = newispriority
end)

RegisterNetEvent('UpdateHold')
AddEventHandler('UpdateHold', function(newishold)
    ishold = newishold
end)

Citizen.CreateThread(function()
	while true do
		Citizen.Wait(0)
		if ishold == true then
			DrawText3("~r~PRIORITIES ARE ON HOLD")
		elseif ispriority == false then
			DrawText2("~y~NEXT PRIORITY IN: ~w~".. cooldown .." ~y~MINUTES")
		elseif ispriority == true then
			DrawText4("~g~PRIORITY IN PROGRESS")
		end
	end
end)

	function DrawText2(text)
        SetTextFont(4)
        SetTextProportional(1)
        SetTextScale(0.0, 0.45)
        SetTextDropshadow(1, 0, 0, 0, 255)
        SetTextEdge(1, 0, 0, 0, 255)
        SetTextDropShadow()
        SetTextOutline()
        SetTextEntry("STRING")
        AddTextComponentString(text)
        DrawText(0.161, 0.837)
    end

	function DrawText4(text)
        SetTextFont(4)
        SetTextProportional(1)
        SetTextScale(0.0, 0.45)
        SetTextDropshadow(1, 0, 0, 0, 255)
        SetTextEdge(1, 0, 0, 0, 255)
        SetTextDropShadow()
        SetTextOutline()
        SetTextEntry("STRING")
        AddTextComponentString(text)
        DrawText(0.161, 0.837)
    end

	function DrawText3(text)
        SetTextFont(4)
        SetTextProportional(1)
        SetTextScale(0.0, 0.45)
        SetTextDropshadow(1, 0, 0, 0, 255)
        SetTextEdge(1, 0, 0, 0, 255)
        SetTextDropShadow()
        SetTextOutline()
        SetTextEntry("STRING")
        AddTextComponentString(text)
        DrawText(0.161, 0.837)
    end

Thank you

How can i change the standard 20 minute cooldown to something else?

@DuhItzRik

How can i change the standard 20 minute cooldown to something else?

in the server.lua at the top

1 - - Config
2 timermax = 21 – In minutes. Must be one bigger than the max timer you want (Eg if you want 20 it must be 21)

That is actually really nice and clean

1 Like

I agree :grin::grin:

i dont have that in my server.lua?

then re download and fresh install

i found it i think, But its not like its described, for me it is: “cooldown = cooldown + 21”

1 Like

hey i found kind of a bug.

So it set the system to priority in progress. Somebody new joins and they get displayed that there isn’t an priority in progress so they start a new priority

What does “priorities are on hold” mean?

If you we’re to make another update can you add a feature where it disappears when there is no cooldown or timer. Or if someone has code then i would appreciate it.

How do you set permissions

Hello, I bring you this resource because i am tired of kicking people for murdering in Priority Cooldown. I DID NOT MAKE THE BASE SCRIPT, I JUST ADDED SOME SCRIPT LINES

How it works
When priority Cooldown is enabled, PvP is disabled. People can still shoot, use explosives and such. Damage is disabled though. Also it is disabled on priority’s on hold.

There are no bugs that i have found yet. Only way to kill someone is by vehicle collision.

Commands

  • /priority - PvP Disabled
  • /inprogress - PvP Enabled
  • /onhold - PvP disabled

cooldown.rar (1.9 KB)

1 Like