[PAID] vsHeadshot

[PAID] vsHeadshot

Description

Always wanted every shot on your server to be a hit? With vsHeadshot you get the easy possibility to do balancing.

You can specify in an easy-to-understand config how many shots a helmet should withstand.

For example, the army helmet that can withstand 2 shots can be set to withstand only one or none with this new system.

It is designed with the idea of giving hardcore or midcore RP-Servers a way to easily weaken motorcycle helmets or army helmets without the need to change a weapon’s damage one by one.

By the way, the script is also protected against simple event spamming.

Go to our Tebex-shop and choose your version for only 7.49€ (available for ESX)

Showcase

Link to the Showcase Video

Config

Config = {}

Config.ResetTime = 5                -- Reset the headshot counter after a certain time in MIN since the last hit

Config.ResetEvents = {              -- List events that should reset the headshot counter, i.e. events that heal the player or kill the player
    --ESX
    'esx:onPlayerDeath',
    'esx_ambulancejob:revive',
    --qbCore

    --BaseEvents
    'baseevents:onPlayerKilled',
    'baseevents:onPlayerDied',
}

Config.DeathEvent = function (killer, victim, weaponHash)   --can be used to log the killing of a player, triggered clientsided
    local deathReason = "killed with a headshot"            --the reason that is stated in a log
    TriggerServerEvent('Prefech:playerDied', { type = 2, player_id = victim, player_2_id = killer, death_reason = deathReason, weapon = WeaponNames[weaponHash]}) --default log function for jd-logs
end

Config.EnableExports = false        --Enable/Disable following Exports: | func:SwitchHeadshot(status) status:true=on,false=off side:client |

Config.EveryOneshot = false         -- This setting makes every helmet oneshot
Config.BuffingHelmets = false       -- Enable this setting only if you want to make helmets stronger than usual
Config.GlobalHitLimit = -1          -- Global limit of hits works the same way as Config.Helmet set -1 to dissable
Config.DamageModifier = 1.0         -- If its still not enough with the upper value you can additionaly reduce the overall damage of selected weapon 
                                    -- (1.0 = 100% damage, less is less damage --> you can withstand more)
Config.MaximumDistance = 0          -- Maximum distance ant which the shot can oneshot. Set to 0/false/nil if not used.
Config.DropoffDistance = 0          -- Distance after a shot only counts as half a headshot.
Config.DropoffPercentage = 0.5      -- The percentage that the "damage" is reduced to. 0.5 = a hit is worth 0.5 hits, 0.25 a hit is worth 0.25 hits.

Config.UseGenderDifference = false  -- Enable if you want to differentiate between genders

Config.Helmet = {                   -- [id of helmet (default gta:)] = number of hits the helmet should take, exceeding the default number of hits in GTA can lead to errors
    --example for helmet 10: [10] = 1,
    
}

Config.HelmetMale = {                   -- [id of helmet (default gta:)] = number of hits the helmet should take, exceeding the default number of hits in GTA can lead to errors
    --example for helmet 10: [10] = 1,
    
}

Config.HelmetFemale = {                   -- [id of helmet (default gta:)] = number of hits the helmet should take, exceeding the default number of hits in GTA can lead to errors
    --example for helmet 10: [10] = 1,
    
}

Config.BlacklistedWeapons = {       -- [weapon models (https://wiki.■■■■■■■■■■■/index.php?title=Weapons_Models)] = true to disable the function for it
    --example for "stungun": [911657153] = true,

}

Config.WhitlistedDamage = {         -- set true to let players die from certain damage
    [1] = false,                        --no damage (flare,snowball, petrolcan)
    [2] = false,                        --melee
    [3] = true,                         --bullet
    [5] = false,                        --explosive (RPG, Railgun, grenade)
    [10] = false,                       --electric
    [14] = false,                       --water cannon(WEAPON_HIT_BY_WATER_CANNON) 
}

Config.Debug = false
Config.AdvancedDebug = false

Optimization

  • IDLE: 0.00ms
  • RUNNING: 0.00ms

Further Information

TEBEX: vsHeadshot

Code is accessible No
Subscription-based No
Lines (approximately) 100
Requirements ESX
Support Yes
6 Likes

interesting

2 Likes

Very Nice works perfect

2 Likes

Nice work. Same Quality as the vsSafe script. And nice Customer Service

1 Like

Yes it is.