Hello,
so basically I have a handcuff resource on my server that was handled by a menu. I recently changed the handle method to ox_target and can’t really get the resource to working. In the handcuff resource i have various tasks, like putting a player in the vehicle, restraining and dragging a player. The method I am using to drag a player is AttachEntityToEntity(playerPed, targetPed, 11816, 0.54, 0.54, 0.0, 0.0, 0.0, 0.0, false, true, false, true, 2, true)
After adding it to ox_target (as an option):
It’s because you don’t have collision with dragged Entity. The way that targets works is that they raycast and search for entities, if entity doesn’t have any collision, it just wont register any raycast hit and entity won’t be found. You just need to change collision option in attachEntityToEntity and it should work
What i mean is:
I have a script that allows me to cuff/uncuff/move player. One additional option is putting player in the vehicle and dragging him out of the vehicle. Putting player in the vehicle is not a problem with ox_target, the problem is when i want to drag the player out of the vehicle → i cant figure out a way to target the player not the vehicle
You need to create global vehicle lime you did with handcuffs and then what you want to do is to create 4 options for each seat in that car, and check if There is any ped in this seat and then check if this ped is a player and is cuffed. I Think There is no other way to do it.