Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit47d8276

Browse files
authored
Merge pull request#74 from FearlessNite345/master
feat(vehreg): Add Make and Year support, fix customData nil bug
2 parents034ef71 +5614dae commit47d8276

21 files changed

+856
-1039
lines changed

‎LICENSE‎

Lines changed: 18 additions & 668 deletions
Large diffs are not rendered by default.
Lines changed: 208 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,208 @@
1+
--[[
2+
Sonoran Plugins
3+
4+
Plugin Configuration
5+
6+
Put all needed configuration in this file.
7+
8+
]]
9+
localconfig= {
10+
enabled=true,
11+
pluginName="bodycam",-- name your plugin here
12+
pluginAuthor="digitalfire",-- author
13+
configVersion="1.0",
14+
15+
-- The command name to toggle your body camera on or off.
16+
command="bodycam",
17+
18+
requireUnitDuty=true,-- if true, the player must be onduty in CAD to use the bodycam
19+
20+
-- Enables or disables animations on start up
21+
enableAnimation=true,
22+
23+
-- Enables or disables the blinking body camera image on screen when enabled.
24+
enableOverlay=true,
25+
26+
--[[
27+
The position (corner) of the screen where the body camera image is displayed.
28+
29+
Options:
30+
- top-left
31+
- top-right
32+
- bottom-left
33+
- bottom-right
34+
]]
35+
overlayLocation='top-right',
36+
37+
-- Enables or disables the body camera beeping when turned on.
38+
enableBeeps=true,
39+
40+
--[[
41+
Type of audio that the beeps use.
42+
43+
native: GtaV Native Sounds
44+
45+
nui/custom: Custom Sound File
46+
]]
47+
beepType="nui",
48+
49+
-- Adjusts the frequency at which unit body camera beeps when turned on(in milliseconds).
50+
beepFrequency=10000,
51+
52+
-- Adjusts the range at which a person can hear the bodycam beeps
53+
beepRange=19.99,
54+
55+
-- Adjusts the frequency at which unit body cameras update (in milliseconds).
56+
screenshotFrequency=2000,
57+
58+
-- The default keybind for toggling the bodycam.
59+
defaultKeybind="",
60+
61+
-- Automaticlly enable bodycam when lights are enabled / disabled
62+
autoEnableWithLights=true,
63+
64+
-- Automaticlly enable bodycam when a weapon is drawn.
65+
autoEnableWithWeapons=true,
66+
67+
--[[
68+
If you want to use ped/clothing based bodycams, you can add them here.
69+
70+
Examples:
71+
{ ped = "s_m_y_cop_01" }
72+
{
73+
ped = "mp_f_freemode_01",
74+
component = 8,
75+
drawable = 148,
76+
}
77+
{
78+
ped = "mp_m_freemode_01",
79+
component = 8,
80+
drawable = 148,
81+
textures = {2, 4},
82+
}
83+
84+
----
85+
86+
Components:
87+
0 - Head
88+
1 - Beard
89+
2 - Hair
90+
3 - Torso
91+
4 - Legs
92+
5 - Hands
93+
6 - Foot
94+
7 - Scarfs/Neck Accessories
95+
8 - Accessories 1
96+
9 - Accessories 2
97+
10 - Decals
98+
11 - Auxiliary parts for torso
99+
]]
100+
clothing= {},
101+
102+
-- Weapons that when drawn enable bodycam.
103+
weapons= {
104+
-- Heavy
105+
"weapon_snowlauncher"
106+
,"weapon_compactlauncher"
107+
,"weapon_minigun"
108+
,"weapon_grenadelauncher_smoke"
109+
,"weapon_hominglauncher"
110+
,"weapon_railgun"
111+
,"weapon_firework"
112+
,"weapon_grenadelauncher"
113+
,"weapon_rpg"
114+
,"weapon_rayminigun"
115+
,"weapon_emplauncher"
116+
,"weapon_railgunxm3"
117+
118+
-- Shotguns
119+
,"weapon_combatshotgun"
120+
,"weapon_autoshotgun"
121+
,"weapon_pumpshotgun"
122+
,"weapon_heavyshotgun"
123+
,"weapon_pumpshotgun_mk2"
124+
,"weapon_sawnoffshotgun"
125+
,"weapon_bullpupshotgun"
126+
,"weapon_assaultshotgun"
127+
,"weapon_dbshotgun"
128+
129+
-- Snipers
130+
,"weapon_heavysniper"
131+
,"weapon_marksmanrifle_mk2"
132+
,"weapon_precisionrifle"
133+
,"weapon_musket"
134+
,"weapon_marksmanrifle"
135+
136+
-- Thrown
137+
,"weapon_snowball"
138+
,"weapon_ball"
139+
,"weapon_molotov"
140+
,"weapon_stickybomb"
141+
,"weapon_flare"
142+
,"weapon_grenade"
143+
,"weapon_bzgas"
144+
,"weapon_proxmine"
145+
,"weapon_pipebomb"
146+
,"weapon_acidpackage"
147+
,"weapon_smokegrenade"
148+
149+
-- Pistols
150+
,"weapon_vintagepistol"
151+
,"weapon_pistol"
152+
,"weapon_pistolxm3"
153+
,"weapon_appistol"
154+
,"weapon_ceramicpistol"
155+
,"weapon_flaregun"
156+
,"weapon_gadgetpistol"
157+
,"weapon_combatpistol"
158+
,"weapon_snspistol_mk2"
159+
,"weapon_navyrevolver"
160+
,"weapon_doubleaction"
161+
,"weapon_pistol50"
162+
,"weapon_raypistol"
163+
,"weapon_snspistol"
164+
,"weapon_pistol_mk2"
165+
,"weapon_revolver"
166+
,"weapon_revolver_mk2"
167+
,"weapon_heavypistol"
168+
,"weapon_marksmanpistol"
169+
170+
,"weapon_stungun"
171+
,"weapon_stungun_mp"
172+
173+
-- SMGs
174+
,"weapon_combatpdw"
175+
,"weapon_microsmg"
176+
,"weapon_tecpistol"
177+
,"weapon_smg"
178+
,"weapon_smg_mk2"
179+
,"weapon_minismg"
180+
,"weapon_machinepistol"
181+
,"weapon_assaultsmg"
182+
183+
-- Rifles
184+
,"weapon_assaultrifle_mk2"
185+
,"weapon_compactrifle"
186+
,"weapon_battlerifle"
187+
,"weapon_bullpuprifle"
188+
,"weapon_carbinerifle"
189+
,"weapon_bullpuprifle_mk2"
190+
,"weapon_specialcarbine_mk2"
191+
,"weapon_militaryrifle"
192+
,"weapon_advancedrifle"
193+
,"weapon_assaultrifle"
194+
,"weapon_specialcarbine"
195+
,"weapon_heavyrifle"
196+
,"weapon_tacticalrifle"
197+
,"weapon_carbinerifle_mk2"
198+
199+
-- MGs
200+
,"weapon_raycarbine"
201+
,"weapon_gusenberg"
202+
,"weapon_combatmg"
203+
,"weapon_mg"
204+
,"weapon_combatmg_mk2"
205+
206+
}
207+
}
208+
ifconfig.enabledthenConfig.RegisterPluginConfig(config.pluginName,config)end

‎sonorancad/configuration/config.CHANGEME.json‎

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,5 @@
1616
"forceSetApiId":false,
1717
"enablePushEventForwarding":false,
1818
"pushEventForwardUrl":"https://host",
19-
"disableOverride":false,
20-
"bodycamEnabled":true,
21-
"bodycamBeepFrequency":300000,
22-
"bodycamScreenshotFrequency":2000,
23-
"bodycamPlayBeeps":true,
24-
"bodycamOverlayEnabled":true,
25-
"bodycamOverlayLocation":"top-right",
26-
"bodycamCommandToggle":"bodycam",
27-
"bodycamCommandChangeFrequncy":"bodycamfreq"
19+
"disableOverride":false
2820
}

‎sonorancad/configuration/ersintegration_config.dist.lua‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ local config = {
99
enabled=false,
1010
pluginName="ersintegration",-- name your plugin here
1111
pluginAuthor="SonoranCAD",-- author
12-
configVersion="1.2",
12+
configVersion="1.3",
1313
-- put your configuration options below
1414
DOBFormat="en",-- Make sure this matches | en: dd/mm/yyyy | us: mm/dd/yyyy | iso: yyyy/mm/dd
15+
clearRecordsAfter=30,-- Clear records after this many minutes (0 = never)
1516
create911Call=true,-- Create a 911 call when an ERS callout is created
1617
createEmergencyCall=true,-- Create an emergency call when an ERS callout is accepted
1718
callPriority=2,-- Priority of the call created in CAD (1-3) | Only used if createEmergencyCall is true

‎sonorancad/configuration/vehreg_config.dist.lua‎

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,22 @@
66

77
localconfig= {
88
enabled=false,
9-
pluginName="vehreg",-- name your plugin here
9+
pluginName="vehreg",-- name your plugin here
1010
pluginAuthor="Jordan.#2139",-- author
11-
configVersion="1.2",
11+
configVersion="1.4",
1212

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

1717
language= {
1818
notInVeh="Player Not In Vehicle... Please Ensure You're In A Vehicle And Try Again!",
1919
noApiId="API ID NOT LINKED TO AN ACCOUNT IN THIS COMMUNITY",
2020
plateAlrRegisted="This plate has already been registered to another person",
2121
helpMsg='Register your current vehicle in CAD',
2222
noCharFound="No character found. Please ensure you are logged in to a character.",
23-
incompleteCharData="Character data is incomplete. Please ensure you have all required data filled out in CAD. Unable to register vehicle.",
23+
incompleteCharData=
24+
"Character data is incomplete. Please ensure you have all required data filled out in CAD. Unable to register vehicle.",
2425
--[[
2526
Placeholders:
2627
{{PLATE}} = The plate of the vehicle
@@ -35,8 +36,21 @@ local config = {
3536
plateUid="plate",
3637
typeUid="type",
3738
modelUid="model",
39+
makeUid="make",
40+
yearUid="year",
3841
statusUid="status",
3942
expiresUid="_imtoih149",
43+
},
44+
customData= {
45+
["adder"]= {
46+
model="Adder",
47+
make="Truffade",
48+
year=2013
49+
},
50+
["blista"]= {
51+
spawncode="blista",
52+
model="Blista",
53+
}
4054
}
4155
}
4256

‎sonorancad/core/apicheck.lua‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -68,41 +68,41 @@ if Config.forceSetApiId then
6868
AddEventHandler("sonoran:tablet:forceCheckApiId",function()
6969
localidentifier=GetIdentifiers(source)[Config.primaryIdentifier]
7070
localplid=source
71-
71+
7272
cadApiIdExists(identifier,function(exists)
7373
ifnotexiststhen
74-
TriggerClientEvent("sonoran:tablet:apiIdNotFound",plid)
74+
TriggerClientEvent("SonoranCAD::Tablet::ApiIdNotLinked",plid)
7575
else
7676
TriggerClientEvent("sonoran:tablet:apiIdFound",plid)
7777
end
7878
end)
7979
end)
80-
81-
RegisterNetEvent("sonoran:tablet:setApiId")
82-
AddEventHandler("sonoran:tablet:setApiId",function(session,username)
80+
81+
RegisterNetEvent("SonoranCAD::Tablet::SetApiData")
82+
AddEventHandler("SonoranCAD::Tablet::SetApiData",function(session,username)
8383
localidentifier=GetIdentifiers(source)[Config.primaryIdentifier]
8484
localsource=source
8585
cadApiIdExists(identifier,function(exists)
8686
ifnotexiststhen
87-
87+
8888
registerApiType("SET_API_ID","general")
89-
89+
9090
localdata= {{
9191
["apiIds"]= {identifier },
9292
["sessionId"]=session,
9393
["username"]=username
9494
}}
95-
95+
9696
performApiRequest(data,"SET_API_ID",function(res,flag)
9797
if (notflag)then
9898
TriggerClientEvent("sonoran:tablet:failed",source,res)
9999
end
100100
end)
101-
101+
102102
end
103103
end)
104-
105-
104+
105+
106106
end)
107107

108108
end

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp