Advertisement
Guest User

Untitled

a guest
Dec 14th, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. function InitiateHouseLoot()
  2. Citizen.CreateThread(function()
  3. while true do
  4. Citizen.Wait(5)
  5.  
  6. local letSleep = true
  7.  
  8. if inSideRobHouse then
  9. for k,v in pairs(Config.LootSpots) do
  10. local entity, entityDst = GetClosestObject(v.model)
  11. if DoesEntityExist(entity) and entityDst < Config.LootDistance then
  12. local Coords = GetEntityCoords(entity)
  13. DrawText3Ds(Coords.x, Coords.y, Coords.z + 0.5, "[E] For å søke " .. v.name)
  14. letSleep = false
  15.  
  16. if IsControlJustReleased(0, 38) then
  17.  
  18. end
  19. end
  20. end
  21. else
  22. break
  23. end
  24.  
  25. if letSleep then
  26. Citizen.Wait(1500)
  27. end
  28. end
  29. end)
  30. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement