With this animation you can drag some body(dead or alive PLAYER) from point A to point B
| 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.
| Resmon after script start
| Resmon if players are in animation
| Resmon after end of animation
| 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)
| Steps For Use:
- You drag the folder into your server
- Write name of this resource into server.cfg
- You can config command name, language and type of notifications as you wish
- restart the server
- 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)
| Video: Watch DragBodyAnimation | Streamable
| Price: 4.95€ + tax
| Created by: Svejdarpa#4136
Buy: https://svejdascripts.tebex.io/package/4545800