[Release] [PAID] [ESX] Drag Body Animation

A script by Pavel_Svejdar

No reviews yet.
[Release] [PAID] [ESX] Drag Body Animation main image

Full Description

With this animation you can drag some body(dead or alive PLAYER) from point A to point B

:star2: | This script has protection to bug in the drag animation:

  • if the dragged (target) person’s game crashed
  • if the dragging (you) person’s game crashed
  • if the dragging (you) person was killed
  • if resource stop

If dragged person is alive, that person must confirm dragging. If dragged person is dead, person do not have to.

:star2: | Resmon after script start
afterstart

:star2: | Resmon if players are in animation
inanimation

:star2: | Resmon after end of animation
afterend

:star2: | Configurable

Config = {}
Config.Language = 'en'                      -- 'en'/'cs'/'sk'/'custom - IF YOU CAN USE OTHER THAN THESE config language'
Config.TestMode = false                     --FOR TEST ONLY, OR DISABLE ALLOWING BY DRAGGED PERSON IF HE ALIVE
Config.EnableReloadDeath = false            --if you use reload death or any animation if you are dead, you need our modify into this script, please contact us, it is for free
Config.Command = 'drag'                     -- command name

Config.DistanceFromPed = 2.0                -- distance on detect target

Config.Text2DPosX = 0.815
Config.Text2DPosY = 1.41
Config.Text = {font = 0, scale = 0.335, r = 255, g = 255, b = 255, a = 255}

Config.Text_custom = {                      --IF YOU CAN USE OTHER THAN THESE config language
    cancel = '\nHold ~r~[H]~w~ to cancel dragging' , 
    accept_deny = '~g~[E]~w~ Accept dragging\n~r~[H]~w~ Reject dragging'
}
Config.Notifications_custom = {             --IF YOU CAN USE OTHER THAN THESE config language
    accept = 'Accepted', 
    reject = 'Rejected', 
    noplayernearby = 'No player nearby', 
    nostrength = 'You don´t have enough strength to drag another person'
}

-- Down you can implement your own notification exports
-- Client side notifications
function ClientNotification(type, text)
    if type == 'error' then
        exports['mythic_notify']:SendAlert('error', text)
    elseif type == 'success' then
        exports['mythic_notify']:SendAlert('success', text)
    end
end

-- FOR DEVELOPERS - This function you can use as you wish Here is example of command and example of event. For examle in player menu etc.
RegisterCommand(Config.Command, function()
    DragDeadBody()                          
end)

--RegisterNetEvent('svejdarpa_dragbody:startdragging')
--AddEventHandler('svejdarpa_dragbody:startdragging', function()
    --DragDeadBody()
--end)

:star2: | Steps For Use:

  1. You drag the folder into your server
  2. Write name of this resource into server.cfg
  3. You can config command name, language and type of notifications as you wish
  4. restart the server
  5. in game you use your command if you stand close to dead or alive person

if you have any problem with script, put this line into ambulancejob into any while true do thread, or contact our support: SetPlayerHealthRechargeMultiplier(PlayerId(), 0.0)

:computer: | Video: Watch DragBodyAnimation | Streamable
:moneybag: | Price: 3.12€ + tax (3,78€) 40% SALE
:hammer_and_wrench: | Created by: Svejdarpa#4136
Buy: https://svejdascripts.tebex.io/package/4545800