[STANDALONE] Tackle Script

Tackle Script

Ever felt the frustration of watching suspects slip away in the blink of an eye? Whether you’re a law enforcement officer or an ordinary citizen, this script gives you the power to bring fleeing suspects to justice with a swift and satisfying tackle.

:shopping_cart: Get it here: gamzkystore.com

(or get the script for free when your total basket value succeeds €10, excl. tackle-script)

:question: Support: Discord

:movie_camera: Detailed preview: Streamable

Features

  • A brief sprint boost is given as soon as you initiate a tackle, which ends with a forward jumping ragdoll to tackle a player.
  • If you hit a player during this ragdoll, you will tackle that player and force him to the ground.
  • The tackle is not a ‘lock-on’ tackle, you will need some skill to actually hit the tackle which prevents abuse.
  • The sprint boost, the tackle duration, the keybindings and more is easily configurable.
  • Fully standalone, no additional resources are required.
  • Unencrypted code allows you to easily implement additional features like a job-check.

Resmon: Idle: 0.00ms - Active: 0.03ms

How it works

  • Whenever you are sprinting, you can press and hold G to initiate a tackle.
  • While you are holding down G, you receive a slight configurable sprint boost to catch up to your target.
  • When you release G, or after the maximum sprint time has passed, your character will leap forward in the running direction.
  • Any player who is hit, will be tackled to the ground.
  • After a configurable cooldown, you can start another tackle again.
Code is accessible Yes
Subscription-based No
Lines (approximately) ~200
Requirements None
Support Yes
1 Like

Tbh it’s literally like 20 lines of code, also you can find many free versions on github…
I don’t see point of selling something like this :man_shrugging:

2 Likes

Around 200, but its more meant as a free reward for spending €10 on any other script from our store.

Still had people interested in only the tackle script despite this, so also gave the option to get just the tackle script. People are free the choose ofcourse :smile:

Don’t pay for such things, let GPT do it for you
GPT: ChatGPT - FiveM Tackle Script

If we add distance control for the server as an extra, we can prevent cheaters from abusing the event.

Client

local tackling = false

-- Function to get the nearest player
function GetClosestPlayer()
    local players = GetActivePlayers()
    local closestDistance = 2.0
    local closestPlayer = nil
    local playerPed = PlayerPedId()
    local playerCoords = GetEntityCoords(playerPed)

    for _, player in ipairs(players) do
        local targetPed = GetPlayerPed(player)
        if targetPed ~= playerPed then
            local targetCoords = GetEntityCoords(targetPed)
            local distance = #(playerCoords - targetCoords)
            if distance < closestDistance then
                closestDistance = distance
                closestPlayer = player
            end
        end
    end

    return closestPlayer
end

-- Listen for key press (Shift + E)
Citizen.CreateThread(function()
    while true do
        Citizen.Wait(0)
        if IsControlPressed(0, 21) and IsControlJustPressed(0, 38) then -- Shift + E
            if not tackling then
                local targetPlayer = GetClosestPlayer()
                if targetPlayer then
                    tackling = true
                    TriggerServerEvent("tackle:server", GetPlayerServerId(targetPlayer))
                    Citizen.Wait(3000) -- Cooldown to prevent spamming
                    tackling = false
                end
            end
        end
    end
end)

-- Apply ragdoll effect (client event)
RegisterNetEvent("tackle:apply")
AddEventHandler("tackle:apply", function()
    local playerPed = PlayerPedId()
    SetPedToRagdoll(playerPed, 5000, 5000, 0, 0, 0, 0) -- 5 seconds of ragdoll
end)

-- Apply ragdoll to the attacker as well
RegisterNetEvent("tackle:attacker")
AddEventHandler("tackle:attacker", function()
    local playerPed = PlayerPedId()
    SetPedToRagdoll(playerPed, 1500, 1500, 0, 0, 0, 0) -- 1.5 seconds of ragdoll
end)

Server

RegisterServerEvent("tackle:server")
AddEventHandler("tackle:server", function(targetId)
    local attackerId = source
    TriggerClientEvent("tackle:apply", targetId)   -- Apply ragdoll to the tackled player
    TriggerClientEvent("tackle:attacker", attackerId) -- Apply ragdoll to the attacker
end)
6 Likes

What the hell, tackle ? just a random ragdoll XD

LOL . this just free :joy:

Hey, I checked out this tackling script, and from what I see, it just finds the closest player and triggers a ragdoll native. For $10, that seems pretty basic, and I feel like charging for something this simple isn’t really justified. A nice way to give back to your community would be releasing it for free on GitHub or Discord instead. No hate, just my honest feedback—I’ll be putting out a free version soon anyway.

1 Like

Hi EV-BeansFL,

Thanks for the honest message first of all, that is appreciated. The goal of the script is to be a little extra reward for anyone who spends €10+ on our store, in that case the script is granted for a 100% discount.

I agree, this is a simple script, but we offer a lot more interesting scripts on our website. I will try to think of a way in the future to better handle this. Still fairly new to tebex and not sure if there is an options to add free scripts only when a purchase exceeds €10.

mega lul

Also I’m wondering what this script has to do with ESX?