@name 
@inputs 
@outputs 
@persist 
@trigger 

#interval(10)

E = entity():isWeldedTo()
WheelFix = 1
WheelModelFront = "models/props_vehicles/carparts_wheel01a.mdl"
WheelModelRear = WheelModelFront
WheelScaleFront = vec(1.2, 1, 1.2)
WheelScaleRear = WheelScaleFront

WheelScaleRear = vec(1.3, 2, 1.3)
#WheelScaleRear = vec(0.9, 0.9, 0.8)
#WheelModelRear = "models/props_phx/wheels/trucktire.mdl"

#WheelScaleFront = vec(0.8, 0.8, 0.8)
#WheelModelFront = "models/props_phx/wheels/trucktire.mdl"

holoCreate(1)
holoPos(1, E:attachmentPos("wheel_rr"))
if (WheelFix == 1) {
    holoAng(1, E:attachmentAng("wheel_rr"):rotateAroundAxis(E:attachmentAng("wheel_rr"):up(), 90))
} elseif (WheelFix == 2) {
    holoAng(1, E:attachmentAng("wheel_rr"):rotateAroundAxis(E:attachmentAng("wheel_rr"):right(), 90))
} else {
    holoAng(1, E:attachmentAng("wheel_rr"))
}
holoParentAttachment(1, E, "wheel_rr")
holoModel(1, WheelModelRear)
holoScale(1, WheelScaleRear)

holoCreate(2)
holoPos(2, E:attachmentPos("wheel_rl"))
if (WheelFix == 1) {
    holoAng(2, E:attachmentAng("wheel_rl"):rotateAroundAxis(E:attachmentAng("wheel_rl"):up(), 90))
} elseif (WheelFix == 2) {
    holoAng(2, E:attachmentAng("wheel_rl"):rotateAroundAxis(E:attachmentAng("wheel_rl"):right(), 90))
} else {
    holoAng(2, E:attachmentAng("wheel_rl"))
}
holoParentAttachment(2, E, "wheel_rl")
holoModel(2, WheelModelRear)
holoScale(2, WheelScaleRear)

holoCreate(3)
holoPos(3, E:attachmentPos("wheel_fr"))
if (WheelFix == 1) {
    holoAng(3, E:attachmentAng("wheel_fr"):rotateAroundAxis(E:attachmentAng("wheel_fr"):up(), 90))
} elseif (WheelFix == 2) {
    holoAng(3, E:attachmentAng("wheel_fr"):rotateAroundAxis(E:attachmentAng("wheel_fr"):right(), 90))
} else {
    holoAng(3, E:attachmentAng("wheel_fr"))
}
holoParentAttachment(3, E, "wheel_fr")
holoModel(3, WheelModelFront)
holoScale(3, WheelScaleFront)

holoCreate(4)
holoPos(4, E:attachmentPos("wheel_fl"))
if (WheelFix == 1) {
    holoAng(4, E:attachmentAng("wheel_fl"):rotateAroundAxis(E:attachmentAng("wheel_fl"):up(), 90))
} elseif (WheelFix == 2) {
    holoAng(4, E:attachmentAng("wheel_fl"):rotateAroundAxis(E:attachmentAng("wheel_fl"):right(), 90))
} else {
    holoAng(4, E:attachmentAng("wheel_fl"))
}
holoParentAttachment(4, E, "wheel_fl")
holoModel(4, WheelModelFront)
holoScale(4, WheelScaleFront)

