[Release] ngrp_dmgsys

POST REMOVED

Please remove it.

9 Likes

Can the bleed out time be adjusted?

Great work on that man!!!

Yes, need to go /client/main.lua and search for:

SetEntityHealth(ped, currentHealth - 5)
Citizen.Wait(5000)

And change that to what ever you want :wink:

Thanks man. Nice work.

1 Like

DO I change the current health or the citizen wait to increase the seconds?

If you want to change the time you need to change this:

Citizen.Wait(5000)

To f.ex Citizen.Wait(10000) = 10 seconds
If you want to change the hp when bleeding you need to change this:

SetEntityHealth(ped, currentHealth - 5)

to f.ex SetEntityHealth(ped, currentHealth - 10)
Witch will give you 10hp every 5seconds when bleeding

OK I get it now. Very easy to understand. Thanks.

No problem, i’m here to help! :stuck_out_tongue:

1 Like

Awesome script!
I was just wondering how you get fully healed? The % limb damage doesnt go away after medic revives/heals major or minor wounds. Am I missing something? :stuck_out_tongue:

It work’s just fine on my server hmm any errors in the console?

I would really really love u if u made it for vrp

Maybe in the future :wink:

Agreed a vRP version would be nice

Hey, are you going to make a version of this for vRP? it would be amazing thanks

Nice release,

but when getting healed the % of the damage is still there.
Or will there come any modification so the esx_ambulance can heal echt wound seperatly?
this would make sense anf would be awesome

I’ll look into it, because it is working on my server. If there is any issue i’ll release new version of it.

1 Like

Maybe in the future, who knows! :smiley:

Is there no way to remove the damage like using a bandage or something? that should be a thing I cant see it anywhere in the code just storing and sending damage thats about it how do we go about reseting their damage? to be healed?

Here is a few things I added also to my script
Walking Injured when lossing health

Citizen.CreateThread(function()
  local ped = GetPlayerPed(-1)
  while true do
    Citizen.Wait(0)
    for k, part in pairs(damagedParts) do
        while part.count * 25 >= 75 and not IsEntityDead(ped) do
          local boneName = getBoneName(part.value)
          local currentHealth = GetEntityHealth(ped)
          RequestAnimSet("move_m@injured")
          while not HasAnimSetLoaded("move_m@injured") do
          Citizen.Wait(0)
          end
          SetPedMovementClipset(GetPlayerPed(-1), "move_m@injured", true)
          Citizen.Wait(waitperiod)
        end
      end
  end
end)

Also keep in mind that I have my damage set to when its 75% damaged instead of 100% causing bleeding and (waitperiod) I have a local variable set up so you can change that to whatever amount of seconds in milliseconds while part.count * 25 >= 75 change 75 to whatever percent you want the damage to be.

By default the script is set to 100 btw not 50%

Also did you not release it with the ability to remove damage or is that something you are working on?

Here is how you can remove the damage.

In client/main.lua

Blockquote
RegisterNetEvent(‘adrp_dmgsys:clearDamage’)
AddEventHandler(‘adrp_dmgsys:clearDamage’, function()
damagedParts = {}
local id = PlayerId()
TriggerServerEvent(‘adrp_dmgsys:removeDamage’, damagedParts, id)
end)

In Server/main.lua

Blockquote
RegisterServerEvent(‘adrp_dmgsys:removeDamage’)
AddEventHandler(‘adrp_dmgsys:removeDamage’, function(damageRemoved, id)
damagedParts[id] = damageRemoved
end)

Then just call the client event on your pills/medkits/ondeath to remove the damage.

1 Like