Skip to main content
Aquiver API

Attachments

Register shared attachment definitions and add them to objects or players.

Setup overview

Integration notes

Shared registration

Register attachments in a shared .lua file that is loaded on both the server and client.

Registering attachments

Configuration

Register a single attachment

Register one attachment under a unique name.

Register single
Shared.AttachmentManager:registerOne("bucket", {
model = "prop_barrel_02a",
boneId = 0,
x = 0.0,
y = 0.45,
z = 0.5,
rx = 0.0,
ry = 0.0,
rz = 0.0
})
Configuration

Register multiple attachments

Register multiple attachment definitions in one table.

Register many
Shared.AttachmentManager:registerMany({
-- AVP_BOTTLER ATTACHMENTS (BOTTLES BY SINGLE)
["object_bottler_1"] = {
model = "prop_amb_beer_bottle",
boneId = 0,
x = 0.2,
y = -0.6075,
z = 0.20,
rx = 0.0,
ry = -27.0,
rz = 0.0
},
["object_bottler_2"] = {
model = "prop_amb_beer_bottle",
boneId = 0,
x = 0.2,
y = -0.319,
z = 0.20,
rx = 0.0,
ry = -27.0,
rz = 0.0
},
})

Adding attachment to entities

Configuration

Add an attachment to an object

Retrieve an object and add a registered attachment.

To object
local aObject = Server.ObjectManager:get(objectID)
if not aObject then return end
aObject:addAttachment("object_bottler_1")
Configuration

Add an attachment to a player

Retrieve a player and add a registered attachment.

To player
local aPlayer = Server.PlayerManaget:get(source)
if not aPlayer then return end
aPlayer:addAttachment("bucket")