Hello there, Right now I have this script:
triggerClientEvent (cuffedPlayer,"onPlayerunCuffed", cuffedPlayer,true)
setPedAnimation(cuffedPlayer,false)
setElementFrozen(cuffedPlayer,false)
setElementData(cuffedPlayer,"cuffed",0)
setElementData(cuffedPlayer,"tazed",0)
setElementData(cuffedPlayer,"jailed",1)
setElementData(cuffedPlayer,"BeingArrested",1)
setElementData(playerSource,"ArrestingPlayer",otherPlayer)
setElementData(playerSource,"Arresting",1)
local theVehicle = getPedOccupiedVehicle ( playerSource )
warpPedIntoVehicle(cuffedPlayer, theVehicle,1)
triggerClientEvent (playerSource, "showArrestMarker", playerSource,true)
I put this script in /arrest ommand but when the cuffedPlayer is wrapped inside the vehicle he gets out of it and he returns back to the spawn position (I have no Idea why)
"onPlayerunCuffed" client side:
function onPlayerunCuffed()
uncuffPlayer()
end
function uncuffPlayer()
if isTimer ( uncuffTimer ) then
killTimer(uncuffTimer)
end
setElementFrozen(localPlayer,false)
setElementData(localPlayer,"cuffed",0)
setPedAnimation(localPlayer,false)
end
Can anyone please help?