[Release]Drag command

Well, I don’t want to be able to drag myself. That’s the point, currently if I type in my own ID, the game will crash.

I can not write /drag [ID] something wrong?

You need to put it in a f8 menu sometimes

Issue I have with this… Someone can be in LS and i’m in Paleto, If I type /drag ID (Their id in LS) I can insta drag them to me in Paleto. Any way to remove the ID part and do it based on if they’re within a reasonable distance in front of you?

1 Like

Hi there, I’d like to offset the dragged player half a car length in front, if possible… I figured the relevant line was here:

AttachEntityToEntity(myped, ped, 4103, 11816, 0.48, 5.00, 0.0, 0.0, 0.0, 0.0, false, false, false, false, 2, true)

Where I changed the Y from 0.00 to 5.00

I must be misinterpreting what this Y value is actually doing.
thanks if anyone familiar with the Drag script can tell me!

We used this for MadMax “Bloodbag” drag like in the movies
and cloned the script changing this line

AttachEntityToEntity(myped, ped, 4103, 11816, 2.4, 0.75, 0.5, 0.0, 0.0, 0.0, false, false, false, false, 2, true)

Is there a way to make it where it drag the nearest person to you not so you have to enter the id

https://runtime.fivem.net/doc/natives/#_0xC33AB876A77F8164

Anyone converted this yet and care to share of a version that is /drag without the id and grabs closest player?

i’ll do it when i wake up

Uploaded it for you

1 Like

You are amazing

Hello,

Can you help me out what i’m doing wrong? I want that is only the ambulance will be able to use your script:

RegisterCommand("drag", function(source, args, fullCommand)
	local Player, Distance = Drag:GetClosestPlayer()
	if PlayerData.job.name == "ambulance" then
		TriggerServerEvent("Drag", GetPlayerServerId(Player))
	else
		ESX.ShowNotification("You are not allowed!") 
	end
end, false)

Thank You

Is there a way to add an animation to this?

Will this work with NPC peds ?

With permission from you, I have edited your script to include a distance factor before dragging a player. If they are not within the distance of 10 meters, then a player cannot be dragged. Players on my server were abusing /drag from all over. I was hoping you had a GitHub I could fork and pull-request, but it seems not. Can I post it on GitHub, then link it here (maybe you can put it in the original post). I’ll definitely give you credit on GitHub for the original code.

Best Regards,
Badger

Any update on this?

I tried to combine the scripts so basically when you do /drag (id) it drags that id only if they are within the X set distance radius. I tried but it didn’t work and I am slowly learning Lua. Does this already exist or should I attempt to keep trying? Sadly people are abusing it where they are dragging others across the map so that is why I am curious and trying to do this.

Hi mate,

Have you still got the part where it only does it from a certain distance?

Kind regards,

Shane :slight_smile:

Yes, here you are

drag.zip (1.4 KB)

1 Like