This will be nice to use in my Roleplay server. Very excited!
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!
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)
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.
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.
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
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.
Just tested with the latest artifact & latest version from the repo. Its working fine for me 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