Advertisement
Guest User

Untitled

a guest
Oct 5th, 2019
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.94 KB | None | 0 0
  1. Citizen.CreateThread(function()
  2. while true do
  3. Citizen.Wait(1)
  4. if emservico then
  5. local ped = PlayerPedId()
  6. local distance = GetDistanceBetweenCoords(GetEntityCoords(ped),-186.1,-893.5,29.3,true)
  7. if distance <= 2100 then
  8. local random,npc = FindFirstPed()
  9. repeat
  10. local distancia = GetDistanceBetweenCoords(GetEntityCoords(ped),GetEntityCoords(npc),true)
  11. if IsPedDeadOrDying(npc) and not IsPedAPlayer(npc) and distancia <= 1.5 and not IsPedInAnyVehicle(ped) and not IsPedInAnyVehicle(npc) and not selectnpc and GetPedType(npc) ~= 28 and not pedlist[npc] then
  12. drawTxt("PRESSIONE ~b~E~w~ PARA RETIRAR OS ÓRGÃOS",4,0.5,0.93,0.50,255,255,255,180)
  13. if IsControlJustPressed(0,38) then
  14. if GetSelectedPedWeapon(ped) == GetHashKey("WEAPON_KNIFE") or GetSelectedPedWeapon(ped) == GetHashKey("WEAPON_DAGGER") or GetSelectedPedWeapon(ped) == GetHashKey("WEAPON_MACHETE") or GetSelectedPedWeapon(ped) == GetHashKey("WEAPON_SWITCHBLADE") or GetSelectedPedWeapon(ped) == GetHashKey("WEAPON_HATCHET") or GetSelectedPedWeapon(ped) == GetHashKey("WEAPON_BATTLEAXE") or GetSelectedPedWeapon(ped) == GetHashKey("WEAPON_STONE_HATCHET") then
  15. if emP.checkPayment() then
  16. selectnpc = npc
  17. pedlist[npc] = true
  18. segundos = 3
  19. vRP._playAnim(false,{{"amb@medic@standing@kneel@idle_a","idle_a"}},true)
  20. SetEntityHeading(ped,GetEntityHeading(npc))
  21. TriggerServerEvent("trydeleteped",PedToNet(npc))
  22. TriggerEvent('cancelando',true)
  23.  
  24. local random = math.random(100)
  25. if random >= 90 then
  26. emP.MarcarOcorrencia()
  27. end
  28.  
  29. repeat
  30. Citizen.Wait(10)
  31. until not selectnpc
  32.  
  33. vRP._stopAnim(false)
  34. vRP._DeletarObjeto()
  35. concluido = true
  36. end
  37. end
  38. end
  39. end
  40. concluido,npc = FindNextPed(random)
  41. until not concluido
  42. EndFindPed(random)
  43. end
  44. end
  45. end
  46. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement