object = {}
addEvent("xxx", true)
addEventHandler("xxx", root,
function()
if isElement(object) then
destroyElement(object)
end
local x, y, z = getElementPosition(source)
local object = createObject( id, x, y, z )
exports.bone_attach:attachElementToBone(object, source, 0.025, -0.01, 0.815, 0, 0, 180)
attachElements(object,source, 0.02, -0.01, 0.815, 0, 0, 180)
end
)
addEventHandler("onPlayerQuit", root,
function()
if isElement(object) then
destroyElement(object)
end
end
)