📕
fmid Documentation
  • fmid Documentation
  • 🚘 fmid_garasi (2023)
    • client
    • Integrasi
    • Additional Commands
    • Pembuatan Garasi
    • Hooks
  • ♻️ fmid_loop
    • Contoh Penggunaan 1
  • 🔳fmid_poly
    • Getting Started
    • Usage
  • fmid_garasi 2.0
    • client
    • server
      • exports
      • commands
    • data
  • 🧠fmid_secure
    • Getting Started
    • Client
    • Server
  • fmid_split
    • Setup
  • 💃fmid_danceroom
    • External Script
    • Internal Script
    • Commands
  • 🧛fmid_ko
    • Internal
    • Integrasi
    • ox_lib Additional
  • 🔫pubg-hud
    • Integrasi ox_inventory
    • Integrasi ox_lib
    • Internal Script
Powered by GitBook
On this page
  • bcs_housing
  • ps-housing
  1. 🚘 fmid_garasi (2023)

Integrasi

integrasi ke external script

bcs_housing

di dalam bcs_housing/client/garage.lua

local grs = lib.callback.await('fmid_garasi:getgrs', false, 'lokasi')
if grs?[data.name] then
    TriggerEvent('fmid_garasi:aksesGarasi', data.name)
else
    local saveCustomGarage = lib.callback.await('fmid_garasi:addCustomGarasi', false, data.name, data)
    TriggerEvent('fmid_garasi:aksesGarasi', data.name)
end

ps-housing

di dalam ps-housing/client/cl_property.lua

cari function Property:RegisterGarageZone()

replace menjadi berikut ini

function Property:RegisterGarageZone()
    if not next(self.propertyData.garage_data) then return end

    if not (self.has_access or self.owner) or not self.owner then
        return
    end

    local garageData = self.propertyData.garage_data
    local garageName = string.format("property-%s-garage", self.property_id)

    local data = {
        takeVehicle = {
            x = garageData.x,
            y = garageData.y,
            z = garageData.z,
            w = garageData.h
        },
        type = "house",
        label = self.propertyData.street .. self.property_id .. " Garage",
    }

    TriggerEvent("qb-garages:client:addHouseGarage", self.property_id, data)
    local cbGarasi = exports.fmid_garasi:AddCustomGarasi({
        nama = self.property_id,
        label = 'Garasi '..self.propertyData.street .. self.property_id,
        coords = vec3(garageData.x, garageData.y, garageData.z),
    })

    self.garageZone = lib.zones.box({
        coords = vec3(garageData.x, garageData.y, garageData.z),
        size = vector3(garageData.length + 5.0, garageData.width + 5.0, 3.5),
        rotation = garageData.h,
        debug = Config.DebugMode,
        onEnter = function()
            TriggerEvent('qb-garages:client:setHouseGarage', self.property_id, true)
            cbGarasi.inside('garasi_'..self.property_id)
        end,
        onExit = function()
            cbGarasi.outside()
        end
    })
end
PreviousclientNextAdditional Commands

Last updated 1 year ago