Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ Note: All Times are returned as Eastern Standard Time.
{US_DAY} | Returns the current day.
{US_MONTH} | Returns the current month.
{US_YEAR} | Reutrns the current year.
{PRIO_STATUS} | Reutrns the current priority status (Requires [Badger-Priorities](https://github.com/JaredScar/Badger-Priorities))

{CURRENT_AOP} | Returns the current AOP.
{PEACETIME_STATUS} | Returns the current peacetime status.
Expand Down
14 changes: 14 additions & 0 deletions client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,17 @@ RegisterNetEvent('Badssentials:SetPT')
AddEventHandler('Badssentials:SetPT', function(pt)
peacetime = pt;
end)
RegisterNetEvent('Badssentials:SetPrioStatus')
AddEventHandler('Badssentials:SetPrioStatus', function(prio)
if prio == "inProgress" then
prioStatus = "Priority in Progress"
elseif prio == "onHold" then
prioStatus = "Priorities are on Hold"
else
prioStatus = prio .. " mins";
end
end)
prioStatus = "0 mins"
displaysHidden = false;
RegisterCommand(Config.Misc.ToggleHUDCommand, function()
displaysHidden = not displaysHidden;
Expand Down Expand Up @@ -335,6 +346,9 @@ Citizen.CreateThread(function()
disp = disp:gsub("{US_MONTH}", currentMonth);
disp = disp:gsub("{US_YEAR}", currentYear);
disp = disp:gsub("{CURRENT_AOP}", currentAOP);
if (disp:find("{PRIO_STATUS}")) then
disp = disp:gsub("{PRIO_STATUS}", prioStatus);
end
if (disp:find("{PEACETIME_STATUS}")) then
if peacetime then
disp = disp:gsub("{PEACETIME_STATUS}", "~g~Enabled")
Expand Down
1 change: 1 addition & 0 deletions server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ Citizen.CreateThread(function()
Wait(1000);
TriggerClientEvent('Badssentials:SetAOP', -1, currentAOP);
TriggerClientEvent('Badssentials:SetPT', -1, peacetime);
TriggerClientEvent('Badssentials:SetPrioStatus', -1, exports['Badger-Priorities'].GetPrioStatus());
local time = format_time(os.time(), "%H:%M");
local date = format_time(os.time(), "%m %d %Y");
local timeHour = split(time, ":")[1]
Expand Down