🔫hd-shootingrange

Dependencies

Installation

  1. Download the asset from your keymaster https://keymaster.fivem.net/

  2. Drag en drop the script into your resources folder

  3. Put this in your cfg:

ensure ox_lib
ensure hd-shootingrange
  1. Copy the bullethit.ogg that is located inside the assets folder into your interact-sound/client/html/sounds

Integrate skill level

Only do this if you now what you´re doing!

You can use the "shootingrangePoints" GlobalState in any script and in any client/server sided code. This GlobalState stores your skill data level.

This is an example that I´ve done to my recoil script to make it possible for players to reduce their "swing" when aming.

if IsPedInAnyVehicle(playerPed, false) then
    if not playerInVehicleAiming and isWeaponWithShake then
        local swingRate = (1 - LocalPlayer.state.shootingrangePoints / 100) * 5.0
        ShakeGameplayCam("HAND_SHAKE", swingRate)
        playerInVehicleAiming = true
    end
else
    if not playerOnFootAiming and isWeaponWithShake then
        local swingRate = (1 - LocalPlayer.state.shootingrangePoints / 100) * 2.0
        ShakeGameplayCam("HAND_SHAKE", swingRate)
        playerOnFootAiming = true
    end
end

Last updated