[Release] Priority Cooldown

Change the coordinates in the DrawText function.

where can that be located? like what line

The line which says “function DrawText2()”

https://gyazo.com/03b32dc3087a6fb431827ce375476bc4

ok which one do i edit to make it go up

DrawText(0.174, 0.855)

how do u Change the location

How to change the location of priorities cool down. To. Next map

Read the replies, image answered this about 5 times already, also check the last version by Lance

Is there a way to get it to where only certain people have access to the commands? Like Admins??

You can make a basic whitelist system through steam ids or ace permissions if you want.

How do I do that lol?

help!
how do I change the script, when I press T /Priority it come’s in chat I need to change it so the community so they can’t see it

from Haim

Just remove where it triggers the chat messages

Thank you.
P.S. love the script man Just love it:)

Anyone know the settings to make this so that its above the minimap

Please tell me you have a server lua with permissions for this script

I don’t believe there is one but it is easy to make.

1 Like

can you please send me the code ive tried multiple times and it has not worked and i really want this to work for my server if someone could code it for me and write what you did in the script by doing // that would be great for me

here is an example of my code if someone is willing to tell me what i did wrong

local allowed =
{
“steam:11000011295b771”,
“steam:11000013459c7aa”,
“ip:192.168.1.1”,
“ip:192.168.1.2”,
“steam:110000104d824d5”,
“steam:110000108d80819”,
}

cooldown = 0
ispriority = false
ishold = false

RegisterCommand(“cooldown”, function()
TriggerEvent(“cooldownt”)
end, false)

RegisterCommand(“inprogress”, function()
TriggerEvent(‘isPriority’)
end, false)

RegisterCommand(“onhold”, function()
TriggerEvent(‘isOnHold’)
end, false)

RegisterNetEvent(‘isPriority’)
AddEventHandler(‘isPriority’, function()
local identifier = GetPlayerIdentifiers(source)[1]
local args = stringsplit(msg, " ")
if args[1] == true then

	if tablelength(args) > 2 then
CancelEvent()
if checkAllowed(identifier) then
ispriority = true
Citizen.Wait(1)
TriggerClientEvent('UpdatePriority', -1, ispriority)
TriggerClientEvent('chatMessage', -1, "WARNING", {255, 0, 0}, "^1A priority call is in progress. Please do not interfere, otherwise you will be ^1kicked. ^7All calls are on ^3hold ^7until this one concludes.")

end)

RegisterNetEvent(‘isOnHold’)
AddEventHandler(‘isOnHold’, function()
local identifier = GetPlayerIdentifiers(source)[1]
local args = stringsplit(msg, " ")
if args[1] == true then

if tablelength(args) > 2 then
CancelEvent()
if checkAllowed(identifier) then
ishold = true
Citizen.Wait(1)
TriggerClientEvent('UpdateHold', -1, ishold)

end)

RegisterNetEvent(“cooldownt”)
AddEventHandler(“cooldownt”, function()
local identifier = GetPlayerIdentifiers(source)[1]
local args = stringsplit(msg, " ")
if args[1] == true then

if tablelength(args) > 2 then
CancelEvent()
if checkAllowed(identifier) then
if ispriority == true then
	ispriority = false
	TriggerClientEvent('UpdatePriority', -1, ispriority)
end
Citizen.Wait(1)
if ishold == true then
	ishold = false
	TriggerClientEvent('UpdateHold', -1, ishold)
end
Citizen.Wait(1)
if cooldown == 0 then
	cooldown = 0
	cooldown = cooldown + 5
	TriggerClientEvent('chatMessage', -1, "WARNING", {255, 0, 0}, "^1A priority call was just conducted. ^3All civilians must wait 20 minutes before conducting another one. ^7Failure to abide by this rule will lead to you being ^1kicked.")
	while cooldown > 0 do
		cooldown = cooldown - 1
		TriggerClientEvent('UpdateCooldown', -1, cooldown)
		Citizen.Wait(60000)
	end
elseif cooldown ~= 0 then
	CancelEvent()
end

end)

RegisterNetEvent(“cancelcooldown”)
AddEventHandler(“cancelcooldown”, function()
Citizen.Wait(1)
while cooldown > 0 do
cooldown = cooldown - 1
TriggerClientEvent(‘UpdateCooldown’, -1, cooldown)
Citizen.Wait(100)
end

function checkAllowed(id) -- function checkAllowed(). id is just a returned value (forgot what the actual word is xD)
	for k, v in pairs(allowed) do -- for repeat to go thru the allowed table. k = key and v = value
		if id == v then -- checks if id is equal to v
			print('Returns true')
			return true -- returns true if id is equal to v
		end
	end

	return false -- in case nothing is in the array, just a fail safe so it returns false basically
end

end)

I changed how mine was because I didn’t like where it showed up in game. Didn’t look good during recordings.unknown%20(9) unknown%20(10) unknown%20(11)

4 Likes