Menan AK47
MENAN AK47DOCS
DiscordStore
Navigation
Menu
Welcome
FAQ
ak47_lib
ak47_target
ak47_ambulancejob
ak47_banking
ak47_business
ak47_carboosting
ak47_cardealer
ak47_clothingshop
ak47_crafting
ak47_crime
ak47_crutch
ak47_deliveryjob
ak47_drugdealerv2
ak47_drugmanagerv3
ak47_drugmissions
ak47_ecommerce
ak47_farming
ak47_fishing
ak47_fraudsystem
ak47_fuelstations
ak47_gangs
ak47_garage
ak47_garbagejob
ak47_hookahloungev2
ak47_housing
ak47_hud
ak47_iclothingv3
ak47_idcardv2
ak47_inventory
ak47_jobgarage
ak47_khusbites
ak47_khusland
ak47_leafnlatte
ak47_mafiasupply
ak47_mechanic
ak47_moneywash
ak47_multicharacter
Exports
Commands
Housing
Clothing
Weather & Time
ak47_npcmed
ak47_outfitbag
ak47_playershop
ak47_policejob
ak47_prospecting
ak47_radio
ak47_rentalcar
ak47_safezone
ak47_sitchair
ak47_smokingv2
ak47_supermarket
ak47_switch
ak47_territories
ak47_vehiclekeys
ak47_vipshop
Loaf
DocsMulti FrameworkHousing

Housing

Housing and motel integration overrides for ak47_multicharacter.

Supports qb-houses, qb-apartments, ak47_housing, and snipe-motel natively. Custom housing scripts can be integrated via custom/client.lua and custom/server.lua.

Client Overrides

Configure client spawn hooks in custom/client.lua.

Initial Spawn

Handles spawning a player inside their starting apartment or motel.

function Custom_SpawnInsideApartment()
    -- exports["my_custom_motel"]:SpawnInsideApartment()
end

Creating an Apartment

Executes when a player completes character creation and selects an apartment.

function Custom_CreateApartment(appType, label)
    -- TriggerServerEvent("my_apartments:server:CreateApartment", appType, label)
end

Last Location Spawning

Spawns the player back inside their last visited property upon login.

function Custom_SpawnLastLocationHouse(houseId)
    -- TriggerEvent('my_housing:client:EnterHouse', houseId)
end

function Custom_SpawnLastLocationApartment(apartmentType, apartmentId)
    -- TriggerEvent('my_apartments:client:EnterApartment', apartmentType, apartmentId)
end

Entering Owned Houses

Triggers when a player selects a property from the My Houses menu.

function Custom_EnterOwnedHouse(location)
    -- TriggerEvent('my_housing:client:EnterOwnedHouse', location)
end

Server Overrides

Configure server data fetching in custom/server.lua.

Loading House Configurations

Loads property coordinates and transmits them to the client interface.

function Custom_LoadHouseData(source)
    local src = source
    -- Fetch property coordinates and trigger client event
end

Fetching Owned Houses

Queries player-owned properties to populate the spawn selector interface.

function Custom_GetOwnedHouses(source, cid)
    local myHouses = {}
    local houses = MySQL.query.await('SELECT * FROM my_custom_houses WHERE owner = ?', {cid})
    if houses then
        for i = 1, #houses do
            myHouses[#myHouses+1] = {
                house = houses[i].house_id,
                label = "Property: " .. houses[i].house_name
            }
        end
    end
    return myHouses
end
Previous
Commands
Next
Clothing
On this page
Client OverridesInitial SpawnCreating an ApartmentLast Location SpawningEntering Owned HousesServer OverridesLoading House ConfigurationsFetching Owned Houses