Item Carry

Automatically attach props and play animations when players receive specific items using ox_inventory. Includes vehicle blocking and walk-only options for realistic item carrying.

Configuration

The configuration file is located at itemcarry/config.lua. Each entry in the config table maps an inventory item name to its carry behavior.

Config Properties

PropertyTypeRequiredDescription
walkOnlybooleanNoWhether the player can only walk while carrying this item
blockVehiclebooleanNoWhether the player is blocked from entering vehicles while carrying this item
animtableYesAnimation data for the carrying animation
proptableYesProp attachment data for the carried item

Animation Properties

PropertyTypeRequiredDescription
dictstringYesAnimation dictionary name
clipstringYesAnimation clip name
flagnumberNoAnimation flag (controls looping, movement, etc.)

Prop Properties

PropertyTypeRequiredDescription
bonenumberYesBone index to attach the prop to
modelnumber | stringYesModel hash or string for the prop
placementtableYesPosition and rotation of the prop relative to the bone
placement.posvec3YesPosition offset relative to the bone
placement.rotvec3YesRotation offset relative to the bone

Examples

Box Carry (Walk Only, No Vehicles)

['box'] = {
    walkOnly = true,
    blockVehicle = true,
    anim = {
        dict = 'anim@heists@box_carry@',
        clip = 'idle',
        flag = 51,
    },
    prop = {
        bone = 60309,
        model = joaat('hei_prop_heist_box'),
        placement = {
            pos = vec3(0.025000, 0.080000, 0.255000),
            rot = vec3(-145.000000, 290.000000, 0.000000),
        },
    },
},

Briefcase Carry (Free Movement)

['briefcase'] = {
    anim = {
        dict = 'anim@heists@briefcase@',
        clip = 'idle',
        flag = 52,
    },
    prop = {
        bone = 60310,
        model = 'prop_briefcase_02',
        placement = {
            pos = vec3(0.035000, 0.070000, 0.240000),
            rot = vec3(-135.000000, 280.000000, 0.000000),
        },
    },
},

Complete Config Example

local config = {
    ['box'] = {
        walkOnly = true,
        blockVehicle = true,
        anim = {
            dict = 'anim@heists@box_carry@',
            clip = 'idle',
            flag = 51,
        },
        prop = {
            bone = 60309,
            model = joaat('hei_prop_heist_box'),
            placement = {
                pos = vec3(0.025000, 0.080000, 0.255000),
                rot = vec3(-145.000000, 290.000000, 0.000000),
            },
        },
    },
    ['briefcase'] = {
        anim = {
            dict = 'anim@heists@briefcase@',
            clip = 'idle',
            flag = 52,
        },
        prop = {
            bone = 60310,
            model = 'prop_briefcase_02',
            placement = {
                pos = vec3(0.035000, 0.070000, 0.240000),
                rot = vec3(-135.000000, 280.000000, 0.000000),
            },
        },
    },
}

The config key (e.g., 'box', 'briefcase') must match the item name in your ox_inventory item definitions. When a player receives the item, the carry behavior activates automatically.

⚠️

Ensure the animation dictionaries and prop models you reference are valid and available in the game. Invalid references will result in the carry behavior not displaying correctly.