Housing integrations

Loaf Housing

Navigate to loaf_housing/client/main.lua and add the following code:

elseif not shouldAddMarker and GetResourceState("okokGarage") == "started" then
     if not house.garageMarker then
          house.garageMarker = lib.AddMarker({
             coords = house.garage.exit.xyz - vector3(0.0, 0.0, 1.0),
             scale = vector3(3.0, 3.0, 1.0),
             callbackData = {},
             key = "primary",
             text = "Garage",
          }, nil, nil, function()
          if IsPedInAnyVehicle(PlayerPedId()) then
            TriggerEvent("okokGarage:StoreVehiclePrivate")
          else
            TriggerEvent("okokGarage:OpenPrivateGarageMenu", GetEntityCoords(PlayerPedId()), GetEntityHeading(PlayerPedId()))
          end
      end)
   end
end

esx_property

Navigate to esx_property/client/main.lua and add the following code:

function StoreVehicle(PropertyId)
  TriggerEvent("okokGarage:StoreVehiclePrivate")
end

function AccessGarage(PropertyId)
  TriggerEvent("okokGarage:OpenPrivateGarageMenu", GetEntityCoords(PlayerPedId()), GetEntityHeading(PlayerPedId()))
end

Last updated