Kartik Scripts

SD-Phone Setup

kartik-properties natively integrates with SD-Phone's Homes App, allowing players to view their owned and leased properties, inspect active keyholders, grant/revoke keys, and toggle door locks directly from the phone.

Official Integration Notice: Native support for kartik-properties is built directly into SD-Phone. If you are running a recent version of SD-Phone, it is supported out-of-the-box. Otherwise, follow the manual setup guide below.


Features Supported

  • ๐Ÿ  Property Inventory: Displays all citizen-owned properties, rented units, and properties where the player holds keys.
  • ๐Ÿ”‘ Key Management: Grant keys to nearby or online players directly through the phone interface.
  • ๐Ÿšซ Revoke Keys: Remove keyholders in real-time with instant synchronization.
  • ๐Ÿ”’ Remote Door Lock: Lock and unlock property doors remotely from the Homes app.
  • ๐Ÿ“ GPS Waypoints: Set a GPS waypoint directly to the property's physical entrance.

โš™๏ธ Installation & Setup

Step 1: Configure SD-Phone

Open sd-phone/configs/housing.lua and set System to 'kartik-properties' (or ensure 'kartik-properties' is in Resources for auto-detection):

return {
    Enabled = true,
    System  = 'auto',

    Resources = {
        'qs-housing', 'ps-housing', 'vms_housing', 'rtx_housing',
        'origen_housing', 'bcs_housing', 'loaf_housing', 'tk_housing', 'RxHousing', 'LNS_Housing',
        'nolag_properties', 'kartik-properties',
    },
}

Step 2: Bridge Adapter in sd-phone/bridge/server/housing.lua

In sd-phone/bridge/server/housing.lua, add the kartik-properties adapter:

ADAPTERS['kartik-properties'] = function(source, id)
    local ok, raw = pcall(function() return exports['kartik-properties']:GetPlayerHousingData(id) end)
    if not ok or type(raw) ~= 'table' then return {} end
    local out = {}
    for _, p in ipairs(raw) do
        local coords = asXY(p.coords)
        local isOwner = (tostring(p.owner) == tostring(id))
        out[#out + 1] = home{
            id      = p.houseId,
            address = s(p.label),
            type    = isOwner and 'House' or 'Leased',
            area    = '',
            value   = 0,
            status  = isOwner and 'owned' or 'rented',
            coords  = coords,
            locked  = p.locked,
        }
    end
    return out
end

And ensure capabilities are registered in CAPS (at the end):

local CAPS = {
    -- other systems...
    ['nolag_properties']  = { lock = true,  keyList = true,  keyManage = true  },
    ['kartik-properties'] = { lock = true,  keyList = true,  keyManage = true  },
}

Step 3: Startup Order in server.cfg

Make sure kartik-properties starts before sd-phone:

ensure kartik-properties
ensure sd-phone

On this page