Skip to content

Development

RS Multi Storage exposes a server-side data API used by the included My Storages phone app. Every export validates the player source and storage ownership before returning or changing data.

Returns summaries for every player-owned storage.

local storages = exports['rs_multistorage']:Phone_GetMyStorages(source)
for _, storage in ipairs(storages) do
print(storage.id, storage.type, storage.status, storage.fillPercent)
end

Returns one owned storage with its name, note, status, position, fill percentage, and latest activity.

local detail = exports['rs_multistorage']:Phone_GetStorageDetail(source, storageId)
if detail then
print(detail.customName or detail.typeLabel)
end

Returns the latest activity entries for an owned storage. The maximum accepted amount is 50.

local logs = exports['rs_multistorage']:Phone_GetStorageLogs(source, storageId, 20)
local waypoint = exports['rs_multistorage']:Phone_SetWaypointFor(source, storageId)
local renamed = exports['rs_multistorage']:Phone_RenameStorage(source, storageId, 'Warehouse Safe', {
minLength = 1,
maxLength = 24,
rateLimitMs = 2000
})
local note = exports['rs_multistorage']:Phone_SaveNote(source, storageId, 'Emergency supplies', {
maxLength = 200
})
local delivery = exports['rs_multistorage']:Phone_GetActiveDelivery(source)
local cancelled = exports['rs_multistorage']:Phone_CancelDelivery(source, deliveryId)
local position = exports['rs_multistorage']:Phone_GetStoragePosition(source, storageId)

Other server resources can listen to storage activity without editing the core files:

AddEventHandler('rs_multistorage:hook:storageOpened', function(payload)
print(payload.storageId, payload.owner, payload.openerIdentifier)
end)
EventTrigger
rs_multistorage:hook:storageOpenedA storage is opened
rs_multistorage:hook:wrongPasswordA wrong password is entered
rs_multistorage:hook:storageBreachedPolice successfully breach a storage
rs_multistorage:hook:storageRepairedA damaged storage is repaired
rs_multistorage:hook:portableBuriedA portable safe is buried
rs_multistorage:hook:portableDugOutA portable safe is recovered
rs_multistorage:hook:deliveryArrivedThe delivery NPC reaches the player
rs_multistorage:hook:deliveryCompletedA container is installed
rs_multistorage:hook:alarmTriggeredA storage alarm is triggered
rs_multistorage:hook:passwordChangedA storage password is changed
rs_multistorage:hook:keyCreatedNew storage keys are created

Unsupported systems can be integrated through the editable bridge files:

bridge/framework/custom.lua
bridge/inventory/custom.lua
bridge/target/custom.lua
bridge/dispatch/custom.lua

Select the required custom bridge in shared/config.lua:

Config.Framework.type = 'custom'
Config.Inventory.type = 'custom'
Config.Target.type = 'custom'

The custom framework bridge handles player identifiers, jobs, names, permissions, and notifications. The inventory bridge handles items, metadata, stashes, and weight. The target bridge handles entity options and zones, while the dispatch bridge handles optional heist alerts.