Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
adeed69
feat(bodycam): new improvements
hooddarian Jul 11, 2025
5608b7f
refactor: naming and order
hooddarian Jul 12, 2025
2811c8c
add: toggle overlay
hooddarian Jul 12, 2025
82a01ba
remove: unneeded pluginConfig.enableOverlay
hooddarian Jul 12, 2025
4973238
fix: bodycam toggle
hooddarian Jul 12, 2025
576b4cd
fix: playing animations
hooddarian Jul 12, 2025
782d13c
fix: spam whitelist with auto activation
hooddarian Jul 12, 2025
5b55902
fix: spam with auto enables
hooddarian Jul 12, 2025
39f0929
remove: defaultKeyMapper configuration
hooddarian Jul 12, 2025
b27085c
chore: add docs
hooddarian Jul 12, 2025
2679c13
Merge branch 'Sonoran-Software:master' into feat-bodycam
hooddarian Jul 13, 2025
5fe323d
feat: custom data for vehreg
Jordan2139 Jul 15, 2025
cf0d99b
fix: screenshots
hooddarian Jul 16, 2025
1e96804
add: all weapons
hooddarian Jul 16, 2025
0e147fa
add: clothing whitelist examples
hooddarian Jul 16, 2025
4ce8650
fix(bodycam): global variables for tracking unit frames
Jordan2139 Jul 16, 2025
a6e608a
feat(ers): clearRecordsAfter config option
Jordan2139 Jul 16, 2025
5656773
tweak: require unit to be in CAD
Jordan2139 Jul 17, 2025
ac078ff
fix: check if they are in cad
Jordan2139 Jul 17, 2025
54fe3df
tweak: remove default bodycam keybind
Jordan2139 Jul 17, 2025
5b8aa1c
feat(core): deleteAfter option on call911
Jordan2139 Jul 17, 2025
3378be9
feat: requireUnitDuty config option
Jordan2139 Jul 18, 2025
1e3735f
tweak: add toggle boolean to bodycam toggle
Jordan2139 Jul 21, 2025
3a99875
tweak: Update conditional check to avoid overlap
Jordan2139 Jul 21, 2025
fd33f21
tweak: automatic toggle
Jordan2139 Jul 23, 2025
374a342
Merge pull request #68 from Bushcowboy/feat-minicad
Fireant456 Jul 24, 2025
b916272
fix command activation
Jordan2139 Jul 24, 2025
d71f0e9
Merge branch 'feat-bodycam' of https://github.com/hooddarian/SonoranC…
Jordan2139 Jul 24, 2025
0595db7
Merge pull request #65 from hooddarian/feat-bodycam
Fireant456 Jul 24, 2025
31777ea
tweak: rewrite tablet logic
Jordan2139 Jul 25, 2025
97c9e19
tweak(sonrad): rewrite tower index logic
Jordan2139 Jul 25, 2025
8113449
tweak: rewrite CAD Tablet API logic
Jordan2139 Jul 25, 2025
20c2807
Merge pull request #70 from Sonoran-Software/changes-tugamars
Jordan2139 Jul 25, 2025
f534e78
Merge pull request #71 from Sonoran-Software/changes-drift
Jordan2139 Jul 25, 2025
803e369
Merge pull request #72 from Sonoran-Software/changes-newtonzz
Jordan2139 Jul 25, 2025
14e7eb2
tweak: update license
Jordan2139 Jul 29, 2025
74a6cef
Merge branch '3.2.11-changes' into rewrites
Jordan2139 Jul 29, 2025
52cc070
Merge pull request #73 from Sonoran-Software/rewrites
Jordan2139 Jul 29, 2025
5bf6016
Merge pull request #67 from Sonoran-Software/3.2.11-changes
Fireant456 Jul 29, 2025
f721544
feat(vehreg): Add Make and Year support, fix customData nil bug
FearlessNite345 Jul 30, 2025
426489c
chore: version bump v3.2.12
Fireant456 Jul 30, 2025
5b9610a
chore: version bump v3.2.12
Fireant456 Jul 30, 2025
5614dae
Merge branches 'master' and 'master' of github.com:FearlessNite345/So…
Fireant456 Jul 30, 2025
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
686 changes: 18 additions & 668 deletions LICENSE

Large diffs are not rendered by default.

208 changes: 208 additions & 0 deletions sonorancad/configuration/bodycam_config.dist.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,208 @@
--[[
Sonoran Plugins

Plugin Configuration

Put all needed configuration in this file.

]]
local config = {
enabled = true,
pluginName = "bodycam", -- name your plugin here
pluginAuthor = "digitalfire", -- author
configVersion = "1.0",

-- The command name to toggle your body camera on or off.
command="bodycam",

requireUnitDuty = true, -- if true, the player must be onduty in CAD to use the bodycam

-- Enables or disables animations on start up
enableAnimation = true,

-- Enables or disables the blinking body camera image on screen when enabled.
enableOverlay = true,

--[[
The position (corner) of the screen where the body camera image is displayed.

Options:
- top-left
- top-right
- bottom-left
- bottom-right
]]
overlayLocation = 'top-right',

-- Enables or disables the body camera beeping when turned on.
enableBeeps = true,

--[[
Type of audio that the beeps use.

native: GtaV Native Sounds

nui/custom: Custom Sound File
]]
beepType = "nui",

-- Adjusts the frequency at which unit body camera beeps when turned on(in milliseconds).
beepFrequency = 10000,

-- Adjusts the range at which a person can hear the bodycam beeps
beepRange = 19.99,

-- Adjusts the frequency at which unit body cameras update (in milliseconds).
screenshotFrequency=2000,

-- The default keybind for toggling the bodycam.
defaultKeybind="",

-- Automaticlly enable bodycam when lights are enabled / disabled
autoEnableWithLights = true,

-- Automaticlly enable bodycam when a weapon is drawn.
autoEnableWithWeapons = true,

--[[
If you want to use ped/clothing based bodycams, you can add them here.

Examples:
{ ped = "s_m_y_cop_01" }
{
ped = "mp_f_freemode_01",
component = 8,
drawable = 148,
}
{
ped = "mp_m_freemode_01",
component = 8,
drawable = 148,
textures = {2, 4},
}

----

Components:
0 - Head
1 - Beard
2 - Hair
3 - Torso
4 - Legs
5 - Hands
6 - Foot
7 - Scarfs/Neck Accessories
8 - Accessories 1
9 - Accessories 2
10 - Decals
11 - Auxiliary parts for torso
]]
clothing = {},

-- Weapons that when drawn enable bodycam.
weapons = {
-- Heavy
"weapon_snowlauncher"
,"weapon_compactlauncher"
,"weapon_minigun"
,"weapon_grenadelauncher_smoke"
,"weapon_hominglauncher"
,"weapon_railgun"
,"weapon_firework"
,"weapon_grenadelauncher"
,"weapon_rpg"
,"weapon_rayminigun"
,"weapon_emplauncher"
,"weapon_railgunxm3"

-- Shotguns
,"weapon_combatshotgun"
,"weapon_autoshotgun"
,"weapon_pumpshotgun"
,"weapon_heavyshotgun"
,"weapon_pumpshotgun_mk2"
,"weapon_sawnoffshotgun"
,"weapon_bullpupshotgun"
,"weapon_assaultshotgun"
,"weapon_dbshotgun"

-- Snipers
,"weapon_heavysniper"
,"weapon_marksmanrifle_mk2"
,"weapon_precisionrifle"
,"weapon_musket"
,"weapon_marksmanrifle"

-- Thrown
,"weapon_snowball"
,"weapon_ball"
,"weapon_molotov"
,"weapon_stickybomb"
,"weapon_flare"
,"weapon_grenade"
,"weapon_bzgas"
,"weapon_proxmine"
,"weapon_pipebomb"
,"weapon_acidpackage"
,"weapon_smokegrenade"

-- Pistols
,"weapon_vintagepistol"
,"weapon_pistol"
,"weapon_pistolxm3"
,"weapon_appistol"
,"weapon_ceramicpistol"
,"weapon_flaregun"
,"weapon_gadgetpistol"
,"weapon_combatpistol"
,"weapon_snspistol_mk2"
,"weapon_navyrevolver"
,"weapon_doubleaction"
,"weapon_pistol50"
,"weapon_raypistol"
,"weapon_snspistol"
,"weapon_pistol_mk2"
,"weapon_revolver"
,"weapon_revolver_mk2"
,"weapon_heavypistol"
,"weapon_marksmanpistol"

,"weapon_stungun"
,"weapon_stungun_mp"

-- SMGs
,"weapon_combatpdw"
,"weapon_microsmg"
,"weapon_tecpistol"
,"weapon_smg"
,"weapon_smg_mk2"
,"weapon_minismg"
,"weapon_machinepistol"
,"weapon_assaultsmg"

-- Rifles
,"weapon_assaultrifle_mk2"
,"weapon_compactrifle"
,"weapon_battlerifle"
,"weapon_bullpuprifle"
,"weapon_carbinerifle"
,"weapon_bullpuprifle_mk2"
,"weapon_specialcarbine_mk2"
,"weapon_militaryrifle"
,"weapon_advancedrifle"
,"weapon_assaultrifle"
,"weapon_specialcarbine"
,"weapon_heavyrifle"
,"weapon_tacticalrifle"
,"weapon_carbinerifle_mk2"

-- MGs
,"weapon_raycarbine"
,"weapon_gusenberg"
,"weapon_combatmg"
,"weapon_mg"
,"weapon_combatmg_mk2"

}
}
if config.enabled then Config.RegisterPluginConfig(config.pluginName, config) end
10 changes: 1 addition & 9 deletions sonorancad/configuration/config.CHANGEME.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,5 @@
"forceSetApiId": false,
"enablePushEventForwarding": false,
"pushEventForwardUrl": "https://host",
"disableOverride": false,
"bodycamEnabled": true,
"bodycamBeepFrequency": 300000,
"bodycamScreenshotFrequency": 2000,
"bodycamPlayBeeps": true,
"bodycamOverlayEnabled": true,
"bodycamOverlayLocation": "top-right",
"bodycamCommandToggle": "bodycam",
"bodycamCommandChangeFrequncy": "bodycamfreq"
"disableOverride": false
}
3 changes: 2 additions & 1 deletion sonorancad/configuration/ersintegration_config.dist.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ local config = {
enabled = false,
pluginName = "ersintegration", -- name your plugin here
pluginAuthor = "SonoranCAD", -- author
configVersion = "1.2",
configVersion = "1.3",
-- put your configuration options below
DOBFormat = "en", -- Make sure this matches | en: dd/mm/yyyy | us: mm/dd/yyyy | iso: yyyy/mm/dd
clearRecordsAfter = 30, -- Clear records after this many minutes (0 = never)
create911Call = true, -- Create a 911 call when an ERS callout is created
createEmergencyCall = true, -- Create an emergency call when an ERS callout is accepted
callPriority = 2, -- Priority of the call created in CAD (1-3) | Only used if createEmergencyCall is true
Expand Down
24 changes: 19 additions & 5 deletions sonorancad/configuration/vehreg_config.dist.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,22 @@

local config = {
enabled = false,
pluginName = "vehreg", -- name your plugin here
pluginName = "vehreg", -- name your plugin here
pluginAuthor = "Jordan.#2139", -- author
configVersion = "1.2",
configVersion = "1.4",

reigsterCommand = "reg", -- Command to register car
reigsterCommand = "reg", -- Command to register car
defaultRegExpire = '01/02/2030', -- The default date that all registrations will expire
defaultRegStatus = 'VALID', -- The default status that all registrations will have | MUST BE IN CAPS
defaultRegStatus = 'VALID', -- The default status that all registrations will have | MUST BE IN CAPS

language = {
notInVeh = "Player Not In Vehicle... Please Ensure You're In A Vehicle And Try Again!",
noApiId = "API ID NOT LINKED TO AN ACCOUNT IN THIS COMMUNITY",
plateAlrRegisted = "This plate has already been registered to another person",
helpMsg = 'Register your current vehicle in CAD',
noCharFound = "No character found. Please ensure you are logged in to a character.",
incompleteCharData = "Character data is incomplete. Please ensure you have all required data filled out in CAD. Unable to register vehicle.",
incompleteCharData =
"Character data is incomplete. Please ensure you have all required data filled out in CAD. Unable to register vehicle.",
--[[
Placeholders:
{{PLATE}} = The plate of the vehicle
Expand All @@ -35,8 +36,21 @@ local config = {
plateUid = "plate",
typeUid = "type",
modelUid = "model",
makeUid = "make",
yearUid = "year",
statusUid = "status",
expiresUid = "_imtoih149",
},
customData = {
["adder"] = {
model = "Adder",
make = "Truffade",
year = 2013
},
["blista"] = {
spawncode = "blista",
model = "Blista",
}
}
}

Expand Down
22 changes: 11 additions & 11 deletions sonorancad/core/apicheck.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,41 +68,41 @@ if Config.forceSetApiId then
AddEventHandler("sonoran:tablet:forceCheckApiId", function()
local identifier=GetIdentifiers(source)[Config.primaryIdentifier]
local plid=source

cadApiIdExists(identifier, function(exists)
if not exists then
TriggerClientEvent("sonoran:tablet:apiIdNotFound", plid)
TriggerClientEvent("SonoranCAD::Tablet::ApiIdNotLinked", plid)
else
TriggerClientEvent("sonoran:tablet:apiIdFound", plid)
end
end)
end)
RegisterNetEvent("sonoran:tablet:setApiId")
AddEventHandler("sonoran:tablet:setApiId", function(session,username)

RegisterNetEvent("SonoranCAD::Tablet::SetApiData")
AddEventHandler("SonoranCAD::Tablet::SetApiData", function(session,username)
local identifier=GetIdentifiers(source)[Config.primaryIdentifier]
local source = source
cadApiIdExists(identifier, function(exists)
if not exists then

registerApiType("SET_API_ID", "general")

local data = {{
["apiIds"] = { identifier },
["sessionId"] = session,
["username"] = username
}}

performApiRequest(data, "SET_API_ID", function(res, flag)
if (not flag) then
TriggerClientEvent("sonoran:tablet:failed", source, res)
end
end)

end
end)


end)

end
Loading