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):
{
name = ‘drag’,
icon = ‘fa-thin fa-person-walking’,
label = ‘moven’,
distance = 0,
onSelect = function(data)
local closestPlayer = ESX.Game.GetClosestPlayer()
TriggerServerEvent(‘esx_cuff:drag’, GetPlayerServerId(closestPlayer))
end,
canInteract = function(entity)
return IsPedInAnyVehicle(PlayerPedId(-1))
end
},
I can start dragging a player, the eye appears, but when I try to stop the eye won’t target the player. Is there any solution to this?