Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Citizen.CreateThread( function()
- while true do
- Citizen.Wait(0)
- -- hands up animation
- if (IsControlJustPressed(0,handsUpButton)) then
- local ped = PlayerPedId()
- if ( DoesEntityExist( ped ) and not IsEntityDead( ped ) ) then
- RequestAnimDict( "random@mugging3" )
- while ( not HasAnimDictLoaded( "random@mugging3" ) ) do
- Citizen.Wait( 100 )
- end
- if IsEntityPlayingAnim(ped, "random@mugging3", "handsup_standing_base", 3) then
- ClearPedSecondaryTask(ped)
- else
- TaskPlayAnim(ped, "random@mugging3", "handsup_standing_base", 2.0, 2.5, -1, 49, 0, 0, 0, 0 )
- local prop_name = prop_name
- local secondaryprop_name = secondaryprop_name
- DetachEntity(prop, 1, 1)
- DeleteObject(prop)
- DetachEntity(secondaryprop, 1, 1)
- DeleteObject(secondaryprop)
- end
- end
- end
- -- cancel animations
- if (IsControlJustPressed(0,cancelAnimation)) then
- local ped = PlayerPedId()
- if ( DoesEntityExist( ped ) and not IsEntityDead( ped ) ) then
- radioActive = false
- ClearPedSecondaryTask(ped)
- DetachEntity(prop, 1, 1)
- DeleteObject(prop)
- DetachEntity(secondaryprop, 1, 1)
- DeleteObject(secondaryprop)
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement