About
Bear Duty is an advanced, feature-rich system designed for tracking the duty status of in-game departments and organizations, commonly used in roleplay servers.
Benefits and Features
Basic Commands:
-
/bdrefresh: Force refresh your bear duty permissions.
-
/bdfrefresh: Force refresh someones bear duty permissions.
-
/duty: Toggle duty status on or off, select your department, and set your callsign.
-
/kickoffduty: Allows supervisors to remove players from duty when necessary. Supervisors can also ban players from going on-duty up to 1 week. (Ban can be wiped by running /kickoffduty id 0, bans do not save and are limited to resource runtime.)
-
/units: Display a list of all players currently on duty and summary of all online departments.
-
/dutytime: Check the duration of your current session.
-
/uchat: Communicate privately with other on-duty players.
Additional Features:
-
Feature rich API: Exposed developer API’s & Documentation to use Bear Duty with your own scripts such as Checking Duty Status, Duty Event’s, etc.
-
Locale: Locale support. English translation provided & used by default.
-
Map Blips: Display the locations of other on-duty players, with options to restrict visibility extensively. Extensive customizability such as Blip Color, Blip Type, who can see it, Blip tag, etc.
-
Unlimited Departments: Support for any number of departments, gangs, and organizations.
-
Discord Integration: Use discord webhooks to log completed shifts.
-
ACE Permissions Integration: Automatically grant/revoke ace permissions based on Duty status for specific departments.
-
Database Integration: Web API support for external website to view logs. * Works via JSON Payload with Bearer Authorization token.
-
Custom ped support: Set certain departments to automatically morph into a custom-ped. Useful for Community Officers! (This feature can be disabled on config for specific departments.)
-
Any Department: Any department support, with extensive permissions to restrict any department from certain departments.
-
Discord Rich Permissions: Extensive permission system to require all roles or a one role from your discord.
-
Logs Restriction: Restrict certain departments from having logs.
-
Callsign Regex Validation: If enabled, you can validate callsigns to abide by a regex pattern.
-
Updates: Free access to any and all updates.
Purchase
Installation
-
Download, install, and configure the dependacies & their dependacies.
-
Drag
bear_duty
into FiveM Resource folder. -
Edit BEARE (locale) if required in
bear_duty/modules/shared_locale
for translation & command edits. -
Go to
bear_duty/modules/shared_config.lua
andbear_duty/modules/sconfig.lua
to configure. If you are stuck/confused ask for help in our discord. -
Edit
server.cfg
to grant permissions tobear_duty
to assign & remove ace permissions.
add_ace resource.bear_duty command.add_principal allow
add_ace resource.bear_duty command.remove_principal allow
- Now it’s installed!
Rich Developer API
View
FUNCTIONS
Check Duty Status
Server
exports["bear_duty"]:IsOnDuty(source)
-- return boolean
Get Duty Time
Server
exports["bear_duty"]:GetDutyTime(source, formated: boolean (optional))
-- return number | string
Get On Duty Status & Department
Server
exports["bear_duty"]:GetDutyStatus(source)
-- return duty_status: boolean, department: string
Get Tracked Data
Server
exports["bear_duty"]:GetTrackedData(source)
-- return array | boolean
Clockin player
Server
exports["bear_duty"]:Clockin(source, callsign, department)
-- return boolean
Clockout player
Server
exports["bear_duty"]:Clockout(source)
-- return boolean
Get Department Data
Server
exports["bear_duty"]:GetDepartmentData(source)
-- return array | boolean
Can access department
Server
exports["bear_duty"]:CanAccessDepartment(source, department)
-- return boolean
EVENTS
On Duty Status Change
Server
AddEventHandler("bearduty_rich:DUTY_STATUS_CHANGE", function(source, isOnDuty, trackData)
-- Code here will be executed once the event is triggered.
end)
Duty webhook-save JSON payload
{
"user": {
"discord_id": 0,
"discord_name": "John Doe",
"discord_avatar": "DISCORD CDN URL",
"department": "SASP",
"fivem_server_id": 1
},
"on_duty": true,
"duty_time_start_unix": 0,
"duty_time_end_unix": 0,
"duty_time_seconds": 0
}
Duty track data
{
OnDuty = false,
Callsign = "NONE",
Department = "NONE",
BlipGroup = "NONE",
DutyTime = 0,
DutyBan = 0,
ClockedInAt = 0,
Permissions = {},
Discord = {
avatar = string
username = string
id = string | number
}
}
Code is accessible | No (FiveM Asset Escrow) |
Subscription-based | No |
Lines (approximately) | ~1,342 |
Requirements | |
ox_lib (GitHub - overextended/ox_lib: A FiveM resource and script library for Lua and JS.) | |
RAMPAGE_Discord_API (GitHub - RAMPAGELLC/RAMPAGE_Discord_API: Discord API Module for FiveM, based on Badger's Discord API.) | |
Support | Yes (support@rampagestudios.org) |