Guest User

Untitled

a guest
Jan 11th, 2020
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. RegisterNetEvent('esx_extraitems:rollingpaper')
  2. AddEventHandler('esx_extraitems:rollingpaper', function()
  3. local playerPed = GetPlayerPed(-1)
  4. local coords = GetEntityCoords(playerPed)
  5. local boneIndex = GetPedBoneIndex(playerPed, 18905)
  6. local boneIndex2 = GetPedBoneIndex(playerPed, 57005)
  7.  
  8. RequestAnimDict("anim@amb@business@weed@weed_sorting_seated@")
  9. while not HasAnimDictLoaded("anim@amb@business@weed@weed_sorting_seated@") do
  10. Citizen.Wait(1)
  11. end
  12.  
  13. ESX.Game.SpawnObject('bkr_prop_weed_bud_pruned_01a', {
  14. x = coords.x,
  15. y = coords.y,
  16. z = coords.z - 3
  17. }, function(object)
  18. TaskPlayAnim(playerPed, "anim@amb@business@weed@weed_sorting_seated@", "sorter_right_sort_v3_sorter02", 8.0, -8, -1, 49, 0, 0, 0, 0)
  19. AttachEntityToEntity(object, playerPed, boneIndex2, 0.15, 0.01, -0.06, 185.0, 215.0, 180.0, true, true, false, true, 1, true)
  20. Citizen.Wait(6500)
  21. DeleteObject(object)
  22. ClearPedSecondaryTask(playerPed)
  23. end)
  24. end)
Advertisement
Add Comment
Please, Sign In to add comment