dracuslayer

handupkneeledit

Feb 23rd, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. function loadAnimDict( dict )
  2. while ( not HasAnimDictLoaded( dict ) ) do
  3. RequestAnimDict( dict )
  4. Citizen.Wait( 5 )
  5. end
  6. end
  7.  
  8. local player = GetPlayerPed( -1 )
  9.  
  10. Citizen.CreateThread(function()
  11. while true do
  12. Wait(0)
  13.  
  14. if once then
  15. once = false
  16. end
  17.  
  18. if not keyPressed then
  19. if IsControlPressed(0, 311) and ( DoesEntityExist( player ) and not IsEntityDead( player )) then
  20. loadAnimDict( "random@arrests" )
  21. loadAnimDict( "random@arrests@busted" )
  22. if ( IsEntityPlayingAnim( player, "random@arrests@busted", "idle_a", 3 ) ) then
  23. TaskPlayAnim( player, "random@arrests@busted", "exit", 8.0, 1.0, -1, 2, 0, 0, 0, 0 )
  24. Wait (3000)
  25. TaskPlayAnim( player, "random@arrests", "kneeling_arrest_get_up", 8.0, 1.0, -1, 128, 0, 0, 0, 0 )
  26. else
  27. TaskPlayAnim( player, "random@arrests", "idle_2_hands_up", 8.0, 1.0, -1, 2, 0, 0, 0, 0 )
  28. Wait (4000)
  29. TaskPlayAnim( player, "random@arrests", "kneeling_arrest_idle", 8.0, 1.0, -1, 2, 0, 0, 0, 0 )
  30. Wait (500)
  31. TaskPlayAnim( player, "random@arrests@busted", "enter", 8.0, 1.0, -1, 2, 0, 0, 0, 0 )
  32. Wait (1000)
  33. TaskPlayAnim( player, "random@arrests@busted", "idle_a", 8.0, 1.0, -1, 9, 0, 0, 0, 0 )
  34. end
  35. end
  36. end
  37. end )
  38.  
  39. Citizen.CreateThread(function()
  40. while true do
  41. Citizen.Wait(0)
  42. if IsEntityPlayingAnim(GetPlayerPed(PlayerId()), "random@arrests@busted", "idle_a", 3) then
  43. DisableControlAction(1, 140, true)
  44. DisableControlAction(1, 141, true)
  45. DisableControlAction(1, 142, true)
  46. DisableControlAction(0,21,true)
  47. end
  48. end
  49. end)
Advertisement
Add Comment
Please, Sign In to add comment