diff --git a/README.md b/README.md index dc3f18a..6fb53c5 100644 --- a/README.md +++ b/README.md @@ -67,3 +67,7 @@ Config = { } } ``` + +Available Exports; + +`exports['Badger-Priorities'].GetPrioStatus()` | Returns the current Priority Status in minutes, onHold or inProgress (Server Side) diff --git a/fxmanifest.lua b/fxmanifest.lua index f1f73e5..b0f835c 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -9,4 +9,8 @@ server_script "server.lua" shared_scripts { "config.lua", +} + +exports { + "GetPrioStatus" } \ No newline at end of file diff --git a/server.lua b/server.lua index d08756c..d95a453 100644 --- a/server.lua +++ b/server.lua @@ -134,6 +134,17 @@ Citizen.CreateThread(function() end end) +exports('GetPrioStatus', function () + if onHold == true then + priostatus = 'onHold' + elseif inProgress == true then + priostatus = 'inProgress' + else + priostatus = currentCooldownTime + end + return priostatus +end) + Citizen.CreateThread(function() while true do Wait((1000 * 60));