Adding new compatibility
How to add compatibility to your custom housing system?
If you want to add custom compatibility firstly make sure that such parts of the code are open source:
server sided register of the property (initial register of the property);
server sided update of the property (ownership update, coordinates update etc.);
garage coordinates are parsed (including the heading);
Example of the compatibility
Beneath we will prepare some examples how it should look like.
Register of the property
-- example property data:
--[[
property = {
garage = {
x = 1235.3,
y = -328.5,
z = 32.3,
w = 156.2,
},
name = "property_1",
label = "Property 1",
owner = "char1:83571asm3183as31"
}
]]
RegisterNetEvent('housing:registerProperty', function(property)
if property.garage then
local players = {}
table.insert(players, property.owner)
local coordinates = {vector4( property.garage.x, property.garage.y, property.garage.z, property.garage.w )}
exports['ZSX_Garages']:AddTempGarage("temp_property"..property.name, property.label, true, 'player', players, coordinates)
end
end)Property coords update
Property ownership update
Property removed
Last updated