[Release] Carry people over your shoulder

This will be nice to use in my Roleplay server. Very excited!

1 Like

Can you add ā€˜disable’ all/most inputs when the animation is in progress?

Sorry for the late reply but yes, on our RP server we are currently reviving and then carrying the ā€œpassed outā€ patient with this script and itĀ“s working great!

1 Like

hello it is possible to replace the registercommand by the possiblity to put a touch a bit like the propose a person on the addons take a hostage

in the style :

– Key to take hostage
Citizen.CreateThread (function ()
while true do
Citizen.Wait (5)
if IsControlJustPressed (1, 124) and IsControlPressed (1, 124) then
takeHostage ()
end
end
end)

1 Like

I need it too

so if i can detachentity a truck on my shoulder?

How do I add something that makes one player only carry the other if he is handcuffed or with his hands up? sorry my bad english i not american

I tried like this

local animation = {dict = ā€œrandom@mugging3ā€, name = ā€œhandsup_standing_baseā€}
local unarmed = GetHashKey(ā€œWEAPON_UNARMEDā€)

RegisterNetEvent(ā€œhandsupā€)
AddEventHandler(ā€œhandsupā€, function()
local player = PlayerId()
local plyPed = GetPlayerPed(player)
if DoesEntityExist(plyPed) then
if not carryingBackInProgress then
if handsup then
ClearPedSecondaryTask(plyPed)
SetEnableHandcuffs(plyPed, false)
SetCurrentPedWeapon(plyPed, unarmed, true)
TriggerEvent(ā€œchatMessageā€, ā€œ^1Your hands are downā€)
handsup = false
else
RequestAnimDict(animation.dict)
while not HasAnimDictLoaded(animation.dict) do
Citizen.Wait(100)
end
TaskPlayAnim(plyPed, animation.dict, animation.name, 8.0, -8, -1, 49, 0, 0, 0, 0)
SetEnableHandcuffs(plyPed, true)
SetCurrentPedWeapon(plyPed, unarmed, true)
TriggerEvent(ā€œchatMessageā€, ā€œ^1Your hands are upā€)
handsup = true
end
end
end)

Does this work if the person is dead IG if a cop needed to get another civ or cop

Yes, it does Indeed.
It looks kinda weird when carrying a dead guy (the position get messed up)…but it works.

1 Like

It depends on your server’s death system, but if when they are dead they ragdoll (most servers) then yeah it’ll look weird as you can’t play an animation on someone thats ragdolled.

1 Like

Is it possible to forcensomeone your carrying in the trunk of a car ?

Is it possible to add a small menu option where the player can decide whether to raise or not?

Update:
Added force the carry animation every frame if another script or something cancels the animation
Fixed an error in the server console when the person did /carry when no one is nearby
Removed debug prints

Please update to latest!

Any way to carry only death people? with esx

Udklip
i get this when i try 2 carry someone

On the most recent fxserver update carry and anything like that stopped working. Any idea why?

I get the same error. Any way to fix this guys?

i also face this problem. :frowning:

Just tested with the latest artifact & latest version from the repo. Its working fine for me :confused: can you post anymore details about whats not working & errors? (And make sure you’re on the latest version).

Well i ended up finding out a certain script was messing with it so i fixed that problem. But, if i do /carry when no one is around or too far away it freezes my character and you cant undo it and you have to relog or restart the script. Thats when i get the error listed above about failed execution of native