Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function loadAnimDict( dict )
- while ( not HasAnimDictLoaded( dict ) ) do
- RequestAnimDict( dict )
- Citizen.Wait( 5 )
- end
- end
- local player = GetPlayerPed( -1 )
- Citizen.CreateThread(function()
- while true do
- Wait(0)
- if once then
- once = false
- end
- if not keyPressed then
- if IsControlPressed(0, 311) and ( DoesEntityExist( player ) and not IsEntityDead( player )) then
- loadAnimDict( "random@arrests" )
- loadAnimDict( "random@arrests@busted" )
- if ( IsEntityPlayingAnim( player, "random@arrests@busted", "idle_a", 3 ) ) then
- TaskPlayAnim( player, "random@arrests@busted", "exit", 8.0, 1.0, -1, 2, 0, 0, 0, 0 )
- Wait (3000)
- TaskPlayAnim( player, "random@arrests", "kneeling_arrest_get_up", 8.0, 1.0, -1, 128, 0, 0, 0, 0 )
- else
- TaskPlayAnim( player, "random@arrests", "idle_2_hands_up", 8.0, 1.0, -1, 2, 0, 0, 0, 0 )
- Wait (4000)
- TaskPlayAnim( player, "random@arrests", "kneeling_arrest_idle", 8.0, 1.0, -1, 2, 0, 0, 0, 0 )
- Wait (500)
- TaskPlayAnim( player, "random@arrests@busted", "enter", 8.0, 1.0, -1, 2, 0, 0, 0, 0 )
- Wait (1000)
- TaskPlayAnim( player, "random@arrests@busted", "idle_a", 8.0, 1.0, -1, 9, 0, 0, 0, 0 )
- end
- end
- end
- end )
- Citizen.CreateThread(function()
- while true do
- Citizen.Wait(0)
- if IsEntityPlayingAnim(GetPlayerPed(PlayerId()), "random@arrests@busted", "idle_a", 3) then
- DisableControlAction(1, 140, true)
- DisableControlAction(1, 141, true)
- DisableControlAction(1, 142, true)
- DisableControlAction(0,21,true)
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement