Sorry, I found it. There was a corresponding code in "models_items.txt", This is an example.
model Handgun
{
mesh = Weapons/Firearm/Handgun,
attachment muzzle
{
offset = 0.0000 0.1520 -0.0270,
rotate = -90.0000 0.0000 0.0000,
}
attachment reddot
{
offset = 0.0010 0.0440 -0.0400,
rotate = 1.0000 1.0000 1.0000,
}
attachment gunlight
{
offset = 0.0000 0.0800 0.0030,
rotate = 1.0000 1.0000 1.0000,
}
attachment scope
{
offset = 0.0000 0.1240 -0.0380,
rotate = 180.0000 0.0000 0.0000,
}
attachment laser
{
offset = 0.0000 0.0900 0.0080,
rotate = 0.0000 0.0000 0.0000,
}
}
Hope this information helps other Modders.