if IsControlPressed(0, 21) and IsControlPressed(0, 38) and not isTackling and GetGameTimer() - lastTackleTime > 10 * 1000 then
if IsControlPressed(0, Keys['LEFTSHIFT']) and IsControlPressed(0, Keys['G']) and not isTackling and GetGameTimer() - lastTackleTime > 10 * 1000 and PlayerData.job.name == PoliceJob then
Citizen.Wait(10)
Citizen.Wait(10)
local closestPlayer = GetClosestPlayer()
local closestPlayer, distance = ESX.Game.GetClosestPlayer()
if closestPlayer.distance ~= -1 and closestPlayer.distance <= Config.TackleDistance and not isTackling and not isGettingTackled and not IsPedInAnyVehicle(GetPlayerPed(-1)) and not IsPedInAnyVehicle(GetPlayerPed(closestPlayer.playerid)) then
if distance ~= -1 and distance <= Config.TackleDistance and not isTackling and not isGettingTackled and not IsPedInAnyVehicle(GetPlayerPed(-1)) and not IsPedInAnyVehicle(GetPlayerPed(closestPlayer)) then