Jump to content

WarpPedIntoVehicle Works for a second then player gets out?


Eth

Recommended Posts

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?

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...