name (string) - Item name matching your inventory item
amount (integer) - Quantity to give
metadata (function, optional) - Function that returns item metadata
Default Starter Items:
starterItems = { { name = 'phone', amount = 1 }, { name = 'id_card', amount = 1, metadata = function(source) assert(GetResourceState('qbx_idcard') == 'started', 'qbx_idcard resource not found. Required to give an id_card as a starting item') return exports.qbx_idcard:GetMetaLicense(source, {'id_card'}) end }, { name = 'driver_license', amount = 1, metadata = function(source) assert(GetResourceState('qbx_idcard') == 'started', 'qbx_idcard resource not found. Required to give an id_card as a starting item') return exports.qbx_idcard:GetMetaLicense(source, {'driver_license'}) end },}
{ name = 'weapon_pistol', amount = 1, metadata = function(source) return { ammo = 50, serial = 'STARTER' .. source, } end}
Items from other resources:
{ name = 'custom_item', amount = 1, metadata = function(source) assert(GetResourceState('my_resource') == 'started', 'my_resource must be running') return exports.my_resource:GetItemData(source) end}
When using metadata functions that depend on other resources, always use assert() or check GetResourceState() to ensure the required resource is running. This prevents errors during character creation.
notifyPosition = 'top-right' -- Default, common choicenotifyPosition = 'bottom-right' -- Good for minimal UInotifyPosition = 'top' -- Center top, very visible