[Standalone] [PAID] Slash Tires

Slash Tires

Showcase

Preview video (YouTube)
A short video (40 seconds) that shows me slashing the tires standing up, crouching, using a controller (see the top left) and using the targeting solution qTarget. There are some other features that aren’t directly shown, however, it sums the script up in a neat little video.

*Edit: RIB SOSAY (known as @ronnie5gt on the forums) made a short video showing the script in a much cooler way than I ever could. You can watch the video here on Youtube.

About

Slash Tires is a standalone script that allows players to slash the tires of vehicles with the use of any sharp weapon (can be configured). It is highly configurable which allows you to configure it to your needs and wants, including the disabled slashing of tires on emergency and/or specified vehicle models. Additionally, it uses fivem’s inbuilt key mapping system to allow players to customize their key binds, for both keyboard and controllers. Furthermore, it supports ox_target, qTarget, qb-target and bt-target if enabled in the config file. It also has server-sided checks to prevent abuse (because f*** cheaters), and can easily be translated to other languages if you so desire. On top of all of this, you can freely edit the source code to your heart’s content.

I have been testing the script for quite a while, so there shouldn’t be any bugs or problems. However, if you find any bugs, report them and I’ll fix them ASAP!

Key Features

  • Tire slashing (duh)
  • Highly configurable (See Configuration)
  • Key mapping (custom key binds) for both keyboard and controllers
  • Supports ox_target, qTarget, qb-target and bt-target
  • Optimized (0.00-0.04ms)
  • Localization; You can easily translate or change the text in the locales folder!
  • Server-side checks to prevent abuse.

Configuration

The script is highly configurable, click below to see the full config file.

Config.lua
Config = {}
-- If you have a cool suggestion or if anything is unclear please leave a comment on the forum post :D

-- The targeting solution (3rd eye) to use (if you don't want to use any then either just use the /slashtire command or set Config.HelpText to 'auto'/whatever system you use)
-- false       : Don't use any targeting solution.
-- 'ox_target' : ox_target by the overextended team and its many other contributors. (https://github.com/overextended/ox_target)
-- 'qb-target' : qb-target by BerkieBb and its many other contributors. (https://github.com/BerkieBb/qb-target)
-- 'qtarget'   : qtarget by Linden (thelindat), Noms (OfficialNoms) and its many other contributors. (https://github.com/overextended/qtarget)
-- 'bt-target' : bt-target by brentN5 (https://github.com/brentN5/bt-target). I advise against using this option due to how old it is.
-- 'auto'      : auto detect a target system, defaults to false if no supported scripts was found
Config.Target = 'auto'

-- The icon that will be shown beside the text when using the 3rd eye. Only used if any of the targeting solutions are enabled.
Config.TargetIcon = 'fas fa-hand-scissors'

-- The system we should use for the help text/prompt system if wanted
-- false        : Don't use any help text/prompt system.
-- 'ox'         : ox_lib's text ui module (make sure to include '@ox_lib/init.lua' in the fxmanifest)
-- 'qb'         : QBCore's DrawText export
-- 'esx'        : ESX's ShowHelpNotification (basically the same same as standalone but trough esx)
-- 'standalone' : Using gta natives to show a help text in the top right
-- 'auto'       : auto detect a supported help text system, defaults to standalone if no supported scripts was found
Config.HelpText = 'auto'

-- The default keybind for keyboard, leave it empty ('') for no default.
Config.DefaultKey = 'E'

-- The default button for controllers, see possible controls here: https://github.com/citizenfx/fivem-docs/blob/master/content/docs/game-references/input-mapper-parameter-ids/pad_analogbutton.md
Config.DefaultPadAnalogButton = 'L2_INDEX' -- Left Trigger

-- What framework to use. Supported "frameworks" and what they are used for:
-- 'ox'         : Uses OX oriented player states (client/server) and ox_lib's logger function (server) (make sure to include '@ox_lib/init.lua' in the fxmanifest)
-- 'qb'         : Uses QB player metadata (client/server) and qb-log event (server)
-- 'esx'        : Uses ESX player data (client), ESX oriented player states (server) and ESX discord log (server)
-- 'nd'         : ND_core, uses lib.logger (ox_lib) and player states (not tested)
-- 'standalone' : Uses gta natives as checks and prints the log to the server console
-- 'auto'       : Attempts to auto detect a framework, defaults to standalone if no supported scripts was found
Config.Framework = 'auto'

-- 'ox'         : ox_inventory or any that can provide for it
-- 'qb'         : qb-inventory or a framework that supports qbcore inventory related functions
-- 'esx'        : ESX core inventory
-- 'standalone' : Standalone checking, uses gta 5 natives where possible
-- 'auto'       : Attempts to auto detect a supported inventory script, defaults to standalone if no supported scripts was found
Config.Inventory = 'auto'

-- 'ox'         : ox_lib's notifications
-- 'qb'         : QB notifications (event)
-- 'esx'        : ESX notifications
-- 'standalone' : GTA natives (shows notif above the minimap)
-- 'auto'       : Attempts to auto detect a notification script, defaults to standalone if no supported scripts was found
Config.Notification = 'auto'

-- false    : No dispatch alerts
-- 'ps'     : ps-dispatch by Project Sloth
-- 'nd'     : Dispatch alerts for ND_MDT for ND_core
-- 'ox'     : Bridge for ox_mdt
-- 'core'   : Bridge for core_dispatch
-- 'rcore'  : Bridge for rcore_dispatch
-- 'quasar' : Bridge for qs-dispatch (This has not been tested)
-- 'auto'   : Attempts to auto detect a supported dispatch/mdt script. Defaults to false if none was found.
Config.Dispatch = 'auto'

-- The % chance to give an alert if there is a NPC nearby that observes the slashing
Config.DispatchAlertChance = 25.0 -- 25%

-- The language localization to load, add your own to the locales folder if needed!
-- Avalible ones per now is: 'en' (english) and 'no' (norwegian bokmål)
Config.Language = 'en'

-- The maximum distance from the player you want it to detect tires, this allows for the Config.Lang.TooFar message to be shown between this and Config.MaxTireInteractionDist.
Config.MaxTireDetectionDist = 2.0

-- The maximum distance from the tire the player can be for it to allow them to interact with it.
Config.MaxTireInteractionDist = 1.2

-- The animtion used when slashing a tire
Config.SlashTireAnimation = {
    Dict = 'melee@knife@streamed_core_fps',
    Name = 'ground_attack_on_spot'
}

-- How the script should handle bulletproof tires.
-- Options:
-- ignore: Ignores whether or not the tire is bulletproof. However, bulletproof tires will never go down to the rim, and only ever be "deflated".
-- limit: Allows the weapons with the canSlashBulletProof parameter set to true to puncture bulletproof tires.
-- proof: Makes the bulletproof tires slash proof.
Config.BulletproofSetting = 'ignore'

-- If the script should attempt to make the player ped face the tire or not.
Config.DoFaceCoordTask = true

-- Check if the player is doing the animation before slashing the tire, times out (stops the slashing attempt) after 3 seconds.
-- This is supposed to make the animation and burst of the tire to be more synchronous.
Config.DoAnimationCheckLoop = true

-- If true it makes all the npc's close by react and flee from the player when they slash a tire.
Config.AIReactAndFlee = true

-- All AI peds within this distance will react and flee from the player when he/she slashes a tire. (if Config.AIReactAndFlee is set to true)
Config.AIReactionDistance = 10.0

-- If enabled, adds help text to the /slashtire command. This is designed to work with fivem's default chat resource.
Config.AddChatSuggestion = true

-- Toggle whether or not to have a chance of weapons breaking.
-- You may need to add some code yourself (trigger an event or export) if you are using this in combination with an inventory script that has weapons as items. See the removeWeapon function in server.lua
Config.CanWeaponsBreak = true

-- If the item (weapon) used to slash a tire should get reduced durability
Config.ReducedItemDurability = true

-- A list of the hashes of the weapons that can be used to slash tires.
Config.AllowedWeapons = {
    [`weapon_knife`] = {
        name = 'weapon_knife',      -- The name of the weapon, only used if you want to setup stuff for inventory scripts
        breakChance = 8,            -- The % chance for the weapon to break, this is only used if Config.CanWeaponsBreak is set to true. Values must be between 0 and 100, 0 = never break. 100 = always break.
        durability = 10.0,          -- The amount of durability to remove when the weapon is used to slash a tire (for this to work Config.ReducedItemDurability needs to be set to true and the framework/inventory script needs to support durability!)
        canSlashBulletProof = false -- If this weapon can slash bulletproof tires when Config.BulletproofSetting is set to 'limit'
    },
    [`weapon_hammer`] = {
        name = 'weapon_hammer',
        durability = 10.0,
        breakChance = 15
    },
    [`weapon_crowbar`] = {
        name = 'weapon_crowbar',
        durability = 10.0,
        breakChance = 10
    },
    [`weapon_bottle`] = {
        name = 'weapon_bottle',
        durability = 25.0,
        breakChance = 20
    },
    [`weapon_dagger`] = {
        name = 'weapon_dagger',
        durability = 5.0,
        breakChance = 2,
        canSlashBulletProof = true
    },
    [`weapon_hatchet`] = {
        name = 'weapon_hatchet',
        durability = 10.0,
        breakChance = 7
    },
    [`weapon_machete`] = {
        name = 'weapon_machete',
        durability = 10.0,
        breakChance = 8
    },
    [`weapon_switchblade`] = {
        name = 'weapon_switchblade',
        durability = 8.0,
        breakChance = 5
    },
    [`weapon_battleaxe`] = {
        name = 'weapon_battleaxe',
        durability = 10.0,
        breakChance = 6
    },
    [`weapon_stone_hatchet`] = {
        name = 'weapon_stone_hatchet',
        durability = 10.0,
        breakChance = 8
    }
}

-- Whether or not to allow people to slash emergency vehicles.
Config.CanSlashEmergencyVehicles = true

-- Vehicles that can't have their tires slashed.
-- 1 = vehicle_is_blacklisted;  block slashing, give generic message to player
-- 2 = tire_is_indestructible;  block slashing, tell player that the tire seems indestructible
-- 3 = vehicle_is_emergency;    block slashing, tell player they can't slash the tires of emergency vehicles (setting Config.CanSlashEmergencyVehicles will make all emergancy class vehicles return this reason)
-- 4 = tire_is_track;           hide slashing option, tell player (if done trough command) that they can't slash tracks
-- 5 = tire_is_train_wheel;     hide slashing option, tell player (if done trough command) that they can't train wheels
-- 6 = tire_is_invisible;       hide slashing option, tell player (if done trough command) that there are no nearby tires to slash
Config.VehicleBlacklist = {
    -- Indestructible tires (planes and helicopters)
    [`akula`] = 2,
    [`alkonost`] = 2,
    [`annihilator`] = 2,
    [`annihilator2`] = 2,
    [`avenger`] = 2,
    [`avenger2`] = 2,
    [`avenger3`] = 2,
    [`avenger4`] = 2,
    [`blimp`] = 2,
    [`blimp2`] = 2,
    [`blimp3`] = 2,
    [`bombushka`] = 2,
    [`buzzard`] = 2,
    [`buzzard2`] = 2,
    [`cargobob`] = 2,
    [`cargobob2`] = 2,
    [`cargobob3`] = 2,
    [`cargobob4`] = 2,
    [`frogger`] = 2,
    [`frogger2`] = 2,
    [`howard`] = 2,
    [`hunter`] = 2,
    [`maverick`] = 2,
    [`microlight`] = 2,
    [`pyro`] = 2,
    [`savage`] = 2,
    [`seabreeze`] = 2,
    [`skylift`] = 2,
    [`swift`] = 2,
    [`swift2`] = 2,
    [`tula`] = 2,
    [`volatol`] = 2,
    [`volatus`] = 2,

    -- Indestructible tires (other vehicles)
    [`apc`] = 2,
    [`blazer4`] = 2,
    [`cerberus`] = 2,
    [`cerberus2`] = 2,
    [`cerberus3`] = 2,
    [`deathbike2`] = 2,
    [`dukes2`] = 2,
    [`halftrack`] = 2,
    [`insurgent`] = 2,
    [`insurgent2`] = 2,
    [`insurgent3`] = 2,
    [`kuruma2`] = 2,
    [`marshall`] = 2,
    [`menacer`] = 2,
    [`monster`] = 2,
    [`monster3`] = 2,
    [`monster4`] = 2,
    [`monster5`] = 2,
    [`nightshark`] = 2,
    [`paragon2`] = 2,
    [`pounder2`] = 2,
    [`rcbandito`] = 2,
    [`scramjet`] = 2,
    [`tractor`] = 2,
    [`trailersmall2`] = 2,
    [`veto`] = 2,
    [`veto2`] = 2,
    [`vigilante`] = 2,
    [`zhaba`] = 2,

    -- Tracked vehicles
    [`bulldozer`] = 4,
    [`khanjali`] = 4,
    [`minitank`] = 4,
    [`rhino`] = 4,
    [`scarab`] = 4,
    [`scarab2`] = 4,
    [`scarab3`] = 4,

    -- Train wheels
    [`freight`] = 5,
    [`freight2`] = 5,
    [`freightcar`] = 5,
    [`freightcar2`] = 5,
    [`freightcont1`] = 5,
    [`freightcont2`] = 5,
    [`freightgrain`] = 5,
    [`metrotrain`] = 5,
    [`tankercar`] = 5,

    -- Fake/invisible tires
    [`conada`] = 6,
    [`conada2`] = 6,
    [`havok`] = 6,
    [`oppressor2`] = 6,
    [`polmav`] = 6,
    [`raketrailer`] = 6,
    [`seasparrow`] = 6,
    [`seasparrow2`] = 6,
    [`seasparrow3`] = 6,
    [`supervolito`] = 6,
    [`supervolito2`] = 6,
    [`thruster`] = 6,
    [`valkyrie`] = 6,
    [`valkyrie2`] = 6,

    -- Custom
    -- [`myfancycar`] = 1, -- This is an example
}

Click on them or open them in a new tab to get a better look if necessary.

Purchase on Tebex

You can purchase it here through Tebex. (5.00 USD + tax)

Some of my other scripts
[Standalone] [Paid] Sit Anywhere
[Release] Telescopes
[Standalone] Crutches

If you have any questions or suggestions feel free to post them below, and I’ll answer them as soon as I can. :smile:

Code is accessible Yes
Subscription-based No
Lines (approximately) 500
Support Yes
4 Likes

Would 100% buy this if you could add a configuration for a chance that the weapon breaks. Also, is it only the switchblade or other knives that can be used?

Nice Release :heart:

Suggestion

  • Add tire theft as well. :face_with_hand_over_mouth:

Your script obfuscated or ip-lock ?

1 Like

Nope, the script is not obfuscated or ip-locked. You can freely edit the source code :smile:

1 Like

Any sharp weapon can be used (these can be changed in the config file), I suppose I should have mentioned that lol.
edit: I added it to the post.

What about the first part? :smiley:

I’ll look into that, it’s very possible that I’ll add that in tomorrow. :wink:
Thanks for the suggestion!

Tire theft sounds like a cool idea in and out of itself. I’m not sure if I could remove the entire tire, but I’ll see what’s possible.

1 Like

Just bought it, very nice, I like it. Escrow thing not working, you should sort it out.

*edit: I think You can set up in a way that the code is ‘ignored’ by the escrow encryption. So the code can be modified, and people can download through escrow - it’s a win-win.

It’s not intended to use Escrow. This is to allow people to change the source code if they desire. Sure, someone will probably leak it, but allowing people who buy it to change the source code is worth it to me.

But thanks for letting me know anyway. :+1:

*edit: I’ll look into it.

2 Likes

I think the Escrow system should be set up now.

why are you selling something that been out for a few years [Release] Slash Tires

2 Likes

The concept is the same (slashing tires), however, my script is different in almost every way. Unlike the one made by xander 3 years ago, mine is configurable to a high degree, supports 3rd eye solutions, uses fivem’s key mapping system to allow custom keybinds, can be easily translated to other languages, has server-side checks to prevent abuse and has many more features that it does not have. My script was also made with more up-to-date programming practices, that’s one of the reasons it’s more optimized for example.

I have of course seen his before I made mine, and I respect his work, the script was good for its time but is now outdated. I made this one from the ground up, so I’m in no way “selling something that been out for a few years”.

Applying your logic would make any inventory, phone or admin menu script out there just a “copy”, and not necessary, which is not true. I’m trying to innovate, just like everyone else.

2 Likes

I respect you looking out but honestly my resource hasn’t been maintained in years and honestly it is about time someone made something better out of the idea.

If my resources are free and public. I don’t care about them.

1 Like

I want to give a special thanks to @ronnie5gt (RIB SOSAY) for making a video showing the script. I couldn’t have done it any better myself! You can watch the video here on Youtube.

1 Like

Update!
Hello again! I’ve gone through the script and added some stuff to the script, including a chance for weapons to break (this is disabled by default, can be enabled in the config file.) and fixed a small issue that I had somehow overlooked. Anyone who has already bought the script can go on to the Cfx.re Keymaster and re-download the resource to get the updated version.

Here is a complete list of all the changes for update 1.1.0:

  • Added a chance for weapons to break, it’s disabled by default but can be toggled on in the config file. The chance for it to break can be set for each and every weapon in the config file. A special thanks goes to @seawolph for suggesting this!

  • Added an extra check to see if the player has a valid weapon equipped when doing the slashing animation (this is to prevent them from taking the weapon away so it won’t break if you have that enabled)

  • Added in the possibility to use the GTA 5 native notification system, this is in case someone doesn’t use mythic notify and for some reason don’t have any other notification system, this can be enabled in the config settings. This is really just to ensure that the script is completely standalone and doesn’t require any other resource but itself to run.

  • Added a simple log (print) on the server-side when people slash tires. This should be replaced with your own logging system or commented out.

  • Fixed issue with tires not popping when a different player had network control over the vehicle.

  • You now need server version 4752 or above, due to the Asset Escrow system.

You rule. Purchasing today.

1 Like

Purchased, script works great right out of the box. Highly recommend.

2 Likes

Another small update!
Hello again (again)! I’ve done some small changes to the script.
Here is a list of the changes for update 1.2.0:

  • Moved the remaining text over to the config file. All the text should now be referenced in the config file. This also includes removing key/button labels from the localization and replacing it with a string.format function on startup to make the localization look more user friendly.

  • Updated the names of some natives. This should not have been, or for that matter ever become an issue, due to Fivem’s backwards compatibility. However, to keep things as clean as possible I went ahead and changed them anyway.

  • Renamed the Config.AddChatHelpText to Config.AddChatSuggestion so it wouldn’t be confused with the actual help text function.

hello does the script work with adddon tires or rims?