Advanced Housing System - tk_housing V2

tk_housing V2

Video | Purchase


Details

  • An advanced, all-in-on, fully configurable FiveM housing script built for ESX, QB, QBOX (framework speficic code is editable allowing you to add support for any other framework)
  • Uses FiveM Asset Escrow System
  • I heavily recommend you to watch the video the get the best understanding of the script

Property Creation

  • Admins and real estate agents are able to create properties within seconds
  • Includes houses & garages in same script
  • Support for shells, IPLs and also MLOs/YMAPs
  • Set & edit price, rent, yard, doors, interiors, image & much more
    • Rent will automatically be paid with set intervals (configurable) and if player doesn’t have enough money, ownership of property will be removed

Property Management

  • Code & Locking
    • Set and manage property codes
    • Lock and unlock doors
    • Lockpicking & Doorbell
      • Other players can lockpick the door (requires a lockpick item, configurable) and use property doorbell
  • Permissions
    • Advanced permission system allowing you to configure what each player can do in your property

Furnishing & Interior Customization

  • Furnish your property with a comprehensive menu that lets you place, move, and remove furniture
  • Furniture synced with all players
  • Property furniture consists of cart and actual furniture
    • Furniture in cart is temporary and can be used to test/preview furniture
  • Gizmo Mode
    • Fine-tune placements with precision controls

Storages & Wardrobes

  • Set furniture objects that should act as storage or wardrobes
  • Players can also set codes and configure permissions for each storage box, allowing for advanced storage management

Garages

  • Vehicles will save in garages and sync for all players
  • Allow multiple vehicles in garages and see them
  • Garages can also be furnished just like houses

Yard

  • Customize outdoor spaces just like interiors
    • (yard furniture will only show when near enough to maximise performance)

Property List

  • Allows players to purchase & sell their properties

Configurable

  • Large config allowing you to fit the script to your needs
  • Change UI color theme easily
  • Over 700 premade properties in config
  • Over 100 K4MB1 shells listed in config (!most of them are paid)

About

  • Clean UI
  • Optimised
  • 0.00 ms idle
  • Supports ESX, QBCore, QBOX & all framework specific functions/events are editable so you can integrate your own framework
  • English and Finnish translations by default, and you are able to **translate everything yourself
  • Convert old esx_tk_housing/esx_tk_garage or qb_tk_housing/qb_tk_garage properties with one command /convertProperties
Screenshots





Config | Documentation | Video | Purchase (29.99€ + VAT)


Code is accessible Partially (all framework specific functions and events + some other stuff)
Subscription-based No
Lines (approximately) ~6000
Requirements esx/qb/qbox & mysql-async/oxmysql
Support Yes
4 Likes

Hi ! Works with jg garage and AdvancedParking ?

If AdvancedParking is the script that saves vehicles in their current position when left then most likely that script would need to be adjusted so that it doesn’t save the vehicle if player is inside a garage or otherwise you might see duplicate vehicles

Update 1.0.2

  • Bug fixes

Update 1.0.3

  • Fix furnishing with gizmo enabled not working as intended
  • Disable cart checkout if you are placing furniture
  • Add function ToggleFurnishing to editable client file

Update 1.0.4

  • Fix furniture rotation not being saved correctly
  • Fix error if house interior label wasn’t set
  • Fix stashes not working on qb
  • Other minor fixes & changes
  • Add Config.Furnishing.maxStorages, allows you to define how many storages can be placed in a property
  • Add possibility of defining stash slots/weight per furniture
  • Add more data to logs

Update 1.0.5

  • Bug fixes and improvements

Update 1.0.6

  • Add command /removeunusedproperties <days>
  • Add function SpawnedGarageVehicles to editable server file

Update 1.0.7

  • Update Config.Furnshing.sellPercentage to actually be percentage instead of multiplier

Okay Thx ! Advanced parking have export for that, client functions when player is in garage and go out are open ?

Yes! There are functions in editable file for when player enter and leaves a garage

1 Like

It’s a new script or it’s an update of the old one ?

This is a new script and this and housing v1 are sold are separate products

1 Like

Update 1.0.8

  • Add Config.CloseWithESC

Update 1.0.9

  • Fix properties not working after editing interior
  • Fix storage permission system not working correctly

Update 1.1.0

  • Add support for illenium-appearance for wardrobes
  • Fix selling a rented property not working as intended

Update 1.1.1

  • Fix property creation throwing error if property entrances were added and then property interior was removed

Update 1.1.2

  • Fix real estate agents not being able to edit or remove properties
  • Fix job grade detection not working correctly
  • Minor fixes to permission system
  • Add support for newer qb-inventory versions
1 Like

Unable to use, please help me

Check DM

Update 1.1.3

  • Fix IPLs not working as interiors for houses
  • Fix last rent time not being reset when you stop renting a property
  • Fix garage exits not working as intended on some occasions

Update 1.1.4

  • Fix players being stuck inside properties when reconnecting on QB
  • Remove random prints added in last update

Review and feedback from converting from qb_tk_housing 1.0.5:

Negatives:

  • House ID’s are not retained in their original assignment. I had to drop the primary key constraint and manually update the database to re-align to old house numbers.
  • No default garage interior on conversion, had to manually update database to give all the old houses a garage interior
  • Stash/Storage ID system is changed drastically resulting in a manual scripting process to convert and retain stashes, need to have highly advanced SQL knowledge to convert the stashes, I am fortunate to do data science as part of my day job.

Positives:

  • Works mostly very well out of the box
  • The new interfaces and systems are great
  • Gives more for realestate agents to do in their spare time when waiting for people to find and wanting to buy a house
  • Garage sql is exposed so was easy to ensure consistency between our garage script and the housing(jg-advancedgarages)
  • With some fancy footwork can also support own target systems

Great work, thank you, however please look at the impact of change from index to id on furniture and what this does to stash conversion.

Here is my script for converting the stashes after I have aligned the house ID’s(Using PS-Inventory):

CREATE OR REPLACE TABLE storage_migration AS
SELECT 
    old_house.id AS house_id,
    COALESCE(JSON_EXTRACT(old_furniture.furniture, '$.index'), 'unknown') AS old_index,
    COALESCE(JSON_EXTRACT(new_furniture.furniture_house, '$.id'), 'unknown') AS new_id,
    CONCAT('qb_tk_housing_storage_house_', old_house.id, '_', 
           COALESCE(JSON_EXTRACT(old_furniture.furniture, '$.index'), 'unknown')) AS old_stash_name,
    CONCAT('tk_housing_storage_', old_house.id, '_house_', 
           COALESCE(JSON_EXTRACT(new_furniture.furniture_house, '$.id'), 'unknown')) AS new_stash_name
FROM 
    owned_houses old_house
JOIN 
    tk_housing_properties new_house ON old_house.id = new_house.id
JOIN 
    JSON_TABLE(
        old_house.furniture,
        '$[*]' COLUMNS (
            old_model VARCHAR(100) PATH '$.model',
            old_x DOUBLE PATH '$.coords.x',
            old_y DOUBLE PATH '$.coords.y',
            old_z DOUBLE PATH '$.coords.z',
            old_index VARCHAR(20) PATH '$.index',
            furniture JSON PATH '$'
        )
    ) old_furniture
JOIN 
    JSON_TABLE(
        new_house.furniture_house,
        '$[*]' COLUMNS (
            new_model VARCHAR(100) PATH '$.model',
            new_x DOUBLE PATH '$.coords.x',
            new_y DOUBLE PATH '$.coords.y',
            new_z DOUBLE PATH '$.coords.z',
            new_id CHAR PATH '$.id',
            furniture_house JSON PATH '$'
        )
    ) new_furniture
ON 
     ABS(old_furniture.old_x - new_furniture.new_x) < 0.2
    AND ABS(old_furniture.old_y - new_furniture.new_y) < 0.2
JOIN stashitems c on c.stash = CONCAT('qb_tk_housing_storage_house_', old_house.id, '_', COALESCE(JSON_EXTRACT(old_furniture.furniture, '$.index'), 'unknown'))
WHERE 
    old_house.furniture IS NOT NULL 
    AND new_house.furniture_house IS NOT NULL
   and JSON_EXTRACT(old_furniture.furniture, '$.index') is not null;
  
  
CREATE OR REPLACE TABLE storage_backup as 
select s.id, s.stash, s.items, REPLACE(a.new_stash_name,'"','') as new_name from stashitems s 
join storage_migration a on(s.stash = a.old_stash_name);

UPDATE stashitems a
JOIN storage_backup b on(a.id = b.id)
SET a.stash = b.new_name
WHERE a.stash = b.stash;
1 Like

Thank you for the in-depth feedback!

And yeah, I hadn’t considered the impact of changing how the furniture is saved, but I’m glad to see you already have a solution for that. Others will definitely find it useful as well.

Update 1.1.5

  • Fix apartment properties data not working correctly on some occasions
  • Fix garages not working with shells

Update 1.1.6

  • Fix locks not working on some doors

Update 1.1.7

  • Fix problems with property editing and door links