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
Last updated