Ahh Ok, So its missing the fundemental parts from the policejob scirpt I mean I’d put the entire policejob esx script in here but we are talking thousands of lines . Yea RIP I can’t find what Im missing here… ;/ kinda lost
ESX = nil
local CurrentActionData = {}
local lastTime = 0
local IsHandcuffed = false
local PlayerData = {}
local GUI = {}
local HasAlreadyEnteredMarker = false
local LastStation = nil
local LastPart = nil
local LastPartNum = nil
local LastEntity = nil
local CurrentActionMsg = ''
local IsHandcuffed = false
local IsDragged = false
local CopPed = 0
RegisterNetEvent('esx_useitem:handcuff')
AddEventHandler('esx_useitem:handcuff', function()
IsHandcuffed = not IsHandcuffed;
local playerPed = GetPlayerPed(-1)
Citizen.CreateThread(function()
if IsHandcuffed then
RequestAnimDict('mp_arresting')
while not HasAnimDictLoaded('mp_arresting') do
Wait(100)
end
TaskPlayAnim(playerPed, 'mp_arresting', 'idle', 8.0, -8, -1, 49, 0, 0, 0, 0)
SetEnableHandcuffs(playerPed, true)
SetPedCanPlayGestureAnims(playerPed, false)
FreezeEntityPosition(playerPed, true)
else
ClearPedSecondaryTask(playerPed)
SetEnableHandcuffs(playerPed, false)
SetPedCanPlayGestureAnims(playerPed, true)
FreezeEntityPosition(playerPed, false)
end
end)
end)
Citizen.CreateThread(function()
while true do
Wait(0)
if IsHandcuffed then
if IsDragged then
local ped = GetPlayerPed(GetPlayerFromServerId(CopPed))
local myped = GetPlayerPed(-1)
AttachEntityToEntity(myped, ped, 11816, 0.54, 0.54, 0.0, 0.0, 0.0, 0.0, false, false, false, false, 2, true)
else
DetachEntity(GetPlayerPed(-1), true, false)
end
end
end
end)
It results in cuffing the player who uses the item instead of the person infront of them… I’ve looked all threw the esx_policejob and have not found anything about getting other players around you so I’m lost… If someone could assist that would be great
Fucking awesome man, i beed trying also to do this but i was lost cause marijuana so good haha, can you send me private message and code in it, that would be nice bro
I could share the code but I believe it would be a unnecessary release tbh… but I could share it but its 2 resources a resource for the rope (Drag) and a resource for the handcuffs(cuffing) so Idk I may release it but I don’t want to get hate for a unnecessary release.
Can i ask question if i am police the rope and handcuff work well but if i am ordinary player the animations work but the effect of cuff it did not work ? how can i fix it
Hello my friend, some of the players that enter the server do not show anything with the HUD icons, and when they press the F9 button, only the mouse is displayed, and when I reset the source, it is shown, but because of the status, it looks like a picture, only I’m involved, this is an error that says he does not know