Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- HOLD WEAPON HOLSTER ANIMATION --
- Citizen.CreateThread( function()
- while true do
- Citizen.Wait( 0 )
- local ped = PlayerPedId()
- if DoesEntityExist( ped ) and not IsEntityDead( ped ) and not IsPedInAnyVehicle(PlayerPedId(), true) and CheckSkin(ped) then
- DisableControlAction( 0, 249, true ) -- INPUT_MULTIPLAYER_INFO (n)
- if not IsPauseMenuActive() then
- loadAnimDict( "reaction@intimidation@cop@unarmed" )
- if IsDisabledControlJustReleased( 0, 249 ) then -- INPUT_MULTIPLAYER_INFO (n)
- ClearPedTasks(ped)
- SetEnableHandcuffs(ped, false)
- SetCurrentPedWeapon(ped, GetHashKey("WEAPON_UNARMED"), true)
- else
- if IsDisabledControlJustPressed( 0, 249 ) and CheckSkin(ped) then -- INPUT_MULTIPLAYER_INFO (n)
- SetEnableHandcuffs(ped, true)
- SetCurrentPedWeapon(ped, GetHashKey("WEAPON_UNARMED"), true)
- TaskPlayAnim(ped, "reaction@intimidation@cop@unarmed", "intro", 8.0, 2.0, -1, 50, 2.0, 0, 0, 0 )
- end
- if IsEntityPlayingAnim(GetPlayerPed(PlayerId()), "reaction@intimidation@cop@unarmed", "intro", 3) then
- DisableActions(ped)
- end
- end
- end
- end
- end
- end )
- -- HOLSTER/UNHOLSTER PISTOL --
- Citizen.CreateThread(function()
- while true do
- Citizen.Wait(0)
- local ped = PlayerPedId()
- if DoesEntityExist( ped ) and not IsEntityDead( ped ) and not IsPedInAnyVehicle(PlayerPedId(), true) and CheckSkin(ped) then
- loadAnimDict( "rcmjosh4" )
- loadAnimDict( "weapons@pistol@" )
- if CheckWeapon(ped) then
- if holstered then
- TaskPlayAnim(ped, "rcmjosh4", "josh_leadout_cop2", 8.0, 2.0, -1, 48, 10, 0, 0, 0 )
- Citizen.Wait(600)
- ClearPedTasks(ped)
- holstered = false
- end
- SetPedComponentVariation(ped, 9, 0, 0, 0)
- elseif not CheckWeapon(ped) then
- if not holstered then
- TaskPlayAnim(ped, "weapons@pistol@", "aim_2_holster", 8.0, 2.0, -1, 48, 10, 0, 0, 0 )
- Citizen.Wait(500)
- ClearPedTasks(ped)
- holstered = true
- end
- SetPedComponentVariation(ped, 9, 1, 0, 0)
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement