[PAID] [ESX] PSZ | Knockout

PandaScriptZ | Knockout

Hello!
This knockout system gives your players the ability to attack people to make them unconscious. They can use an item that is followed by a synced attack animation that causes the victim to collapse and be unconscious for a specified time.

Features:

  • Use multiple animations (randomly selected)
  • Synced animations for attacker and victim
  • Props bound to the attacking player during the animation
  • Playing sounds while knocked out (Optional feature using interact sound)
  • Camera effect after being knocked out (Possible to turn off in the config)
  • Cooldown between attacks (editable in the config)
  • Config to also knockout players when fighting (f.e Boxing)
  • Running on 0.00 ms in idle and active
  • Easily change the notification system
Config
Config = {}

Config.item = 'syringe'                               -- Which item is needed for usage
Config.interactRange = 2                              -- What is the maximum distance to knock out a person
Config.knockoutTime = 5                               -- How long the player should be knocked out | Time in seconds
Config.AnimsDict = 'melee@small_wpn@streamed_core'    -- All anims need to be from the same dict!      
Config.Anims = {
{attacker = 'plyr_stealth_kill', victim = 'victim_stealth_kill'},
{...}
}              
Config.UseInteractsound = true                        -- set to true if using interact sound and want to have a sound playing during knockout
Config.Soundfile = 'heartbeatsound'                                 -- The name of your sound file inside Interact-Sound
Config.Cooldown = true                                -- Should the player get a cooldown on usage
Config.CooldownTime = 1                               -- Time until being able to knock out again | Time in minutes
Config.effectAfterKO = true                           -- Show visual effect after being Knockedout
Config.effectAfterKOTime = 30                         -- Time in seconds

Config.KnockoutOnPunch = true -- If you want to enable the option that players are being knocked out when they get punched below a certain health threshold
Config.KnockoutOnPunchHealth = 40 -- The health threshold that players get knocked out when they get punched below this threshold (Value between 0 and 100 (0 NOT RECOMMENDED, may cause problems with ambulance job))
Config.KnockoutWeapons = {'WEAPON_UNARMED', 'WEAPON_KNUCKLE', 'WEAPON_NIGHTSTICK'} -- You can add any weapon hash here that should be able to knock out players.


Config.Messages = {
['no_player'] = 'There is no person near you',
['used_item'] = 'You used your syringe to knock out a person',
['got_ko'] = 'You have been knocked out by another person',
['recovered'] = 'You recovered from your knockout',
-- If cooldown enabled -- 
['on_cooldown'] = 'You need to wait until you can knock out again',
}

-- change the below functions to your notification system
-- Current example using standard ESX
function ShowInfoNotification(message)
ESX.ShowNotification("~y~"..message)
end

function ShowErrorNotification(message)
    ESX.ShowNotification("~r~"..message)
end

function ShowSuccessNotification(message)
    ESX.ShowNotification("~g~"..message)
end```

Preview

YouTube

Packages

Escrow [2$]
Opensource [5$]

Plans for future updates:

  • Option for item usage (Either use item or use option on proximity)
  • Adapt for QB-Core (maybe also standalone)
  • Option for choosing between different effects
  • Ability to defend yourself from an attack (QuickTime event)

|-------------------------------------|----------------------------|
| Code is accessible | Yes (if opensource version)
| Subscription-based | No
| Lines (approximately) | ~ 230 Lines
| Requirements | ESX, interact-sound (optional)
| Support | No, unmaintained

5 Likes

Sounds good! :smile:

2 Likes

is it allowed to put things on for free if its escrowed?

1 Like

Was not able to find anything against it inside the TOS or FAQ.

Is not allowed

Do you have any proof of what you are saying? If so would you mind sharing it with us?

Showcase?

New Update

  • Added possibility to punch people knockout
  • Added possibility to select the wanted weapons for the knockout effect
  • Reinforced code, to prevent errors
  • Fixed some small bugs

Hello by any chance do you know how to disable stealth kills on switch blade and other melee weapons?


files are locked or id fix it myself

Hey,
are you using the newest version aswell set the correct setting inside the Config?
There is a setting for your esx version

thats all i see in the config

This is the outdates version. Ill check the keymaster again as soon as I am home

New Update

  • Fixed the script for newer ESX versions

visn_are compatible?

trying to firgure out why this is happening
Screenshot 2025-03-23 204228