SHARE
TWEET

Untitled

a guest Dec 14th, 2019 87 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Config.LootSpots = {
  2.     -- House
  3.     { model = 'prop_plant_int_04a',     name = 'Kommode' },
  4.     { model = 'v_res_tre_storagebox',   name = 'Kiste' },
  5.     { model = 'v_res_tre_storageunit',   name = 'Kommode' },
  6.     { model = 'v_res_tre_washbasket',   name = 'Skittentøy' },
  7.     { model = 'v_res_jewelbox',         name = 'Smykkeskrin' },
  8.     { model = 'prop_ashtray_01',        name = 'Stuebord' },
  9.     { model = 'prop_wok',               name = 'Kjøkkenskap' },
  10.     { model = 'prop_toaster_01',        name = 'Kjøkkenbenk' },
  11.     { model = 'v_16_mpmidapart13',      name = 'Vase' },
  12.     { model = 'prop_tv_flat_01',        name = 'Tvbenk' },
  13. }
  14.  
  15. function InitiateHouseLoot()
  16.     Citizen.CreateThread(function()
  17.         while true do
  18.             Citizen.Wait(5)
  19.             local letSleep              = true
  20.             if inSideRobHouse then
  21.                 for k,v in pairs(Config.LootSpots) do
  22.                     local entity, entityDst = GetClosestObject(v.model)
  23.                     if DoesEntityExist(entity) and entityDst < Config.LootDistance then
  24.                         local Coords = GetEntityCoords(entity)
  25.                         DrawText3Ds(Coords.x, Coords.y, Coords.z + 0.5, "[E] For å søke " .. v.name)
  26.                         letSleep = false
  27.  
  28.                         if IsControlJustReleased(0, 38) then
  29.  
  30.                         end
  31.                     end
  32.                 end
  33.             else
  34.                 break
  35.             end
  36.  
  37.             if letSleep then
  38.                 Citizen.Wait(1500)
  39.             end
  40.         end
  41.     end)
  42. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top