@@ -166,7 +166,6 @@ AddEventHandler('EngineToggle:hotwire', function()
166
166
local vehicle
167
167
local animation
168
168
local chance = math.random (100 )
169
- local alarm = math.random (100 )
170
169
171
170
if IsPedInAnyVehicle (playerPed , false ) then
172
171
vehicle = GetVehiclePedIsIn (playerPed , false )
@@ -177,7 +176,7 @@ AddEventHandler('EngineToggle:hotwire', function()
177
176
end
178
177
179
178
if DoesEntityExist (vehicle ) then
180
- if alarm <= Config .Probability .alarm then
179
+ if chance <= Config .Probability .alarm then
181
180
SetVehicleAlarm (vehicle , true )
182
181
StartVehicleAlarm (vehicle )
183
182
end
@@ -239,19 +238,16 @@ AddEventHandler('EngineToggle:hotwire', function()
239
238
local vehicle2 = GetVehiclePedIsIn (playerPed , false )
240
239
local plate = GetVehicleNumberPlateText (vehicle2 )
241
240
242
- if Config .Notifications then
243
- TriggerEvent (' notifications' , " #FF0000" , _U (' header' ), _U (' hotwiring_foundkey' ))
244
- elseif Config .OkokNotify then
245
- exports [' okokNotify' ]:Alert (_U (' header' ), _U (' hotwiring_foundkey' ), 5000 , ' info' )
246
- else
247
- TriggerEvent (' esx:showNotification' , _U (' hotwiring_foundkey' ))
248
- end
249
-
250
241
TriggerServerEvent (' EngineToggle:addcarkeys' , plate )
251
242
Citizen .Wait (200 )
252
- TriggerEvent (' EngineToggle:Engine' )
243
+
244
+ if Config .startEngine then
245
+ TriggerEvent (' EngineToggle:Engine' )
246
+ end
253
247
else
254
- TriggerEvent (' EngineToggle:Engine' )
248
+ if Config .startEngine then
249
+ TriggerEvent (' EngineToggle:Engine' )
250
+ end
255
251
end
256
252
end )
257
253
end
0 commit comments