Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Citizen.CreateThread(function()
- while true do
- Citizen.Wait(1)
- if emservico then
- local ped = PlayerPedId()
- local distance = GetDistanceBetweenCoords(GetEntityCoords(ped),-186.1,-893.5,29.3,true)
- if distance <= 2100 then
- local random,npc = FindFirstPed()
- repeat
- local distancia = GetDistanceBetweenCoords(GetEntityCoords(ped),GetEntityCoords(npc),true)
- 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
- drawTxt("PRESSIONE ~b~E~w~ PARA RETIRAR OS ÓRGÃOS",4,0.5,0.93,0.50,255,255,255,180)
- if IsControlJustPressed(0,38) then
- 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
- if emP.checkPayment() then
- selectnpc = npc
- pedlist[npc] = true
- segundos = 3
- vRP._playAnim(false,{{"amb@medic@standing@kneel@idle_a","idle_a"}},true)
- SetEntityHeading(ped,GetEntityHeading(npc))
- TriggerServerEvent("trydeleteped",PedToNet(npc))
- TriggerEvent('cancelando',true)
- local random = math.random(100)
- if random >= 90 then
- emP.MarcarOcorrencia()
- end
- repeat
- Citizen.Wait(10)
- until not selectnpc
- vRP._stopAnim(false)
- vRP._DeletarObjeto()
- concluido = true
- end
- end
- end
- end
- concluido,npc = FindNextPed(random)
- until not concluido
- EndFindPed(random)
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement