Skip to content

Commit

Permalink
refactor(client): rename attemptPoliceAlert to sendPoliceAlertAttempt (
Browse files Browse the repository at this point in the history
  • Loading branch information
artur-michalak authored Jul 9, 2024
1 parent 17120a3 commit 71f7043
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions client/functions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function public.getIsVehicleAlwaysUnlocked(vehicle)
return getIsVehicleAlwaysUnlocked(vehicle)
end

function public.attemptPoliceAlert(type)
function public.sendPoliceAlertAttempt(type)
if not alertSend then
alertSend = true
local chance = config.policeAlertChance
Expand Down Expand Up @@ -163,7 +163,7 @@ local function lockpickCallback(vehicle, isAdvancedLockedpick, isSuccess)
if isSuccess then
lockpickSuccessCallback(vehicle)
else -- if player fails quickevent
public.attemptPoliceAlert('carjack')
public.sendPoliceAlertAttempt('carjack')
SetVehicleAlarm(vehicle, false)
SetVehicleAlarmTimeLeft(vehicle, config.vehicleAlarmDuration)
TriggerServerEvent('hud:server:GainStress', math.random(1, 4))
Expand Down Expand Up @@ -232,7 +232,7 @@ local function hotwireCallback(vehicle, isAdvancedLockedpick, isSuccess)
if isSuccess then
hotwireSuccessCallback(vehicle)
else -- if player fails quickevent
public.attemptPoliceAlert('carjack')
public.sendPoliceAlertAttempt('carjack')
TriggerServerEvent('hud:server:GainStress', math.random(1, 4))
exports.qbx_core:Notify(locale('notify.failed_lockedpick'), 'error')
end
Expand Down
6 changes: 3 additions & 3 deletions client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ local hasKeys = functions.hasKeys
local hotwire = functions.hotwire
local lockpickDoor = functions.lockpickDoor
local getVehicleInFront = functions.getVehicleInFront
local attemptPoliceAlert = functions.attemptPoliceAlert
local sendPoliceAlertAttempt = functions.sendPoliceAlertAttempt
local getIsBlacklistedWeapon = functions.getIsBlacklistedWeapon
local getIsVehicleAlwaysUnlocked = functions.getIsVehicleAlwaysUnlocked
local areKeysJobShared = functions.areKeysJobShared
Expand Down Expand Up @@ -135,7 +135,7 @@ local function showHotwiringLabel()
findKeys(GetVehicleClass(cache.vehicle), plate)
Wait(config.timeBetweenHotwires)
SetTimeout(10000, function()
attemptPoliceAlert('steal')
sendPoliceAlertAttempt('steal')
end)
isSearchAllowed = true
end)
Expand Down Expand Up @@ -236,7 +236,7 @@ local function carjackVehicle(target)
end
isCarjacking = false
Wait(2000)
attemptPoliceAlert('carjack')
sendPoliceAlertAttempt('carjack')
end
else
ClearPedTasks(target)
Expand Down

0 comments on commit 71f7043

Please sign in to comment.