Garry's Mod Wiki

Entity:GetAttachments

Description

Returns a table containing all attachments of the given entitys model.

Returns an empty table or nil in case it's model has no attachments.

This can have inconsistent results in single-player.

Returns

1 table
Attachment data. See Structures/AttachmentData.

Example

All the attachments present on the Kliener player model

PrintTable(LocalPlayer():GetAttachments())
Output:
1: id = 1 name = eyes 2: id = 2 name = lefteye 3: id = 3 name = righteye 4: id = 4 name = nose 5: id = 5 name = mouth 6: id = 6 name = tie 7: id = 7 name = pen 8: id = 8 name = chest 9: id = 9 name = hips 10: id = 10 name = lefthand 11: id = 11 name = righthand 12: id = 12 name = forward 13: id = 13 name = anim_attachment_RH 14: id = 14 name = anim_attachment_LH 15: id = 15 name = anim_attachment_head

Page Links


Special Pages


Wikis

?

Render Time: 36ms

DB GetPage 6
Generate Html 6
SaveChanges (1) 8
Render Body 0
Render Sidebar 12