AddCSLuaFile() local A = "AMBER" local R = "RED" local DR = "D_RED" local B = "BLUE" local W = "WHITE" local CW = "C_WHITE" local SW = "S_WHITE" local G = "GREEN" local RB = "BLUE/RED" local WA = "AMBER/WHITE" local name = "TDMP Code3 MX7000" local COMPONENT = {} COMPONENT.Model = "models/tdmcars/emergency/equipment/code3_mx7000.mdl" COMPONENT.Lightbar = true COMPONENT.NotLegacy = true COMPONENT.Bodygroups = {} COMPONENT.Category = "Lightbar" COMPONENT.RotationEnabled = true COMPONENT.Meta = { mains = { AngleOffset = 90, -- Speed = 10, W = 2.2, H = 2.65, Sprite = "sprites/emv/light_circle", Scale = 1.0, WMult = 1.33, }, lower_rtrs = { AngleOffset = 90, -- Speed = 10, W = 1.7, H = 2.0, Sprite = "sprites/emv/light_circle", Scale = 1.0, WMult = 1.1, }, tr_rear = { AngleOffset = -90, W = 5.0, H = 5.0, Sprite = "sprites/emv/tdm_halogen2", Scale = 1.0, WMult = 1.1, }, halogen_bro = { AngleOffset = -90, W = 8.7, H = 7.4, Sprite = "sprites/emv/arjent_takedown", Scale = 1.2, WMult = 1.9, }, } COMPONENT.Bones = { ["MAIN_B"] = { Bone = 1, AxisP = "p", -- pitch of bone affects pitch of rendered light AxisY = "r", -- yaw of bone affects roll of rendered light AxisR = "y" -- roll of bone affects ya of rendered light }, ["LOWER_L_2"] = { Bone = 2, AxisP = "p", -- pitch of bone affects pitch of rendered light AxisY = "r", -- yaw of bone affects roll of rendered light AxisR = "y" -- roll of bone affects ya of rendered light }, ["LOWER_L_1"] = { Bone = 3, AxisP = "p", -- pitch of bone affects pitch of rendered light AxisY = "r", -- yaw of bone affects roll of rendered light AxisR = "y" -- roll of bone affects ya of rendered light }, ["LOWER_R_2"] = { Bone = 4, AxisP = "p", -- pitch of bone affects pitch of rendered light AxisY = "r", -- yaw of bone affects roll of rendered light AxisR = "y" -- roll of bone affects ya of rendered light }, ["LOWER_R_1"] = { Bone = 5, AxisP = "p", -- pitch of bone affects pitch of rendered light AxisY = "r", -- yaw of bone affects roll of rendered light AxisR = "y" -- roll of bone affects ya of rendered light }, ["MAIN_R"] = { Bone = 6, AxisP = "p", -- pitch of bone affects pitch of rendered light AxisY = "r", -- yaw of bone affects roll of rendered light AxisR = "y" -- roll of bone affects ya of rendered light } } COMPONENT.BoneOperations = { [1] = { -- MAIN_B Default = { "S", 180, 25 }, Primary = { M1 = { "RN", 180, 70 }, -- static at 0 degrees M2 = { "RN", 0, 70 }, M3 = { "RN", 0, 90 }, } }, [2] = { -- LOWER_L_1 Default = { "S", 0, 25 }, Illumination = { F = { "S", 0, 25 }, }, Primary = { M1 = { "S", 0, 70 }, -- static at 0 degrees M2 = { "S", 0, 70 }, M3 = { "A", { 55, 260 }, 40 }, } }, [3] = { -- LOWER_R_1 Default = { "S", 0, 25 }, Illumination = { F = { "S", 0, 25 }, }, Primary = { M1 = { "S", 0, 70 }, -- static at 0 degrees M2 = { "S", 0, 70 }, M3 = { "A", { 55, 260 }, 40 }, } }, [4] = { -- LOWER_R_2 Default = { "S", 0, 25 }, Illumination = { F = { "S", 0, 25 }, }, Primary = { M1 = { "S", 0, 70 }, -- static at 0 degrees M2 = { "S", 0, 70 }, M3 = { "A", { 55, 260 }, 40 }, } }, [5] = { -- LOWER_L_2 Default = { "S", 0, 25 }, Illumination = { F = { "S", 0, 25 }, }, Primary = { M1 = { "S", 0, 70 }, -- static at 0 degrees M2 = { "S", 0, 70 }, M3 = { "A", { 55, 260 }, 40 }, } }, [6] = { -- MAIN_R Default = { "S", 0, 25 }, Primary = { M1 = { "RN", 0, 70 }, -- static at 0 degrees M2 = { "RN", 0, 70 }, M3 = { "RN", 0, 90 }, } } } COMPONENT.Positions = { -- RE = Rotating Element -- FRONT = Bone information -- Vector = Relative position to bone -- Angle = Relative angle (offset?) to bone [1] = { { "RE", "MAIN_B", Vector( .25, -.31, 0 ), Angle( 0, 0, 0 ) }, nil, "mains" }, [2] = { { "RE", "MAIN_R", Vector( .25, -.31, 0 ), Angle( 0, 0, 0 ) }, nil, "mains" }, [3] = { { "RE", "LOWER_L_2", Vector( -.2, -.22, 0 ), Angle( 0, -40, 0 ) }, nil, "lower_rtrs" }, [4] = { { "RE", "LOWER_R_2", Vector( -.2, -.22, 0 ), Angle( 0, 40, 0 ) }, nil, "lower_rtrs" }, [5] = { { "RE", "LOWER_L_1", Vector( -.2, -.22, 0 ), Angle( 0, -150, 0 ) }, nil, "lower_rtrs" }, [6] = { { "RE", "LOWER_R_1", Vector( -.2, -.22, 0 ), Angle( 0, 150, 0 ) }, nil, "lower_rtrs" }, [7] = { Vector( 3 , -14.2353 , 4.35726), Angle( 0, -90, 0 ), "tr_rear" }, [8] = { Vector( 3 , 14.2353 , 4.35726), Angle( 0, -90, 0 ), "tr_rear" }, [9] = { Vector( 3 , -8.57053 , 4.35726), Angle( 0, -90, 0 ), "tr_rear" }, [10] = { Vector( 3 , 8.57053 , 4.35726), Angle( 0, -90, 0 ), "tr_rear" }, [11] = { Vector( -3 , -14.2353 , 4.35726), Angle( 0, 90, 0 ), "tr_rear" }, [12] = { Vector( -3 , 14.2353 , 4.35726), Angle( 0, 90, 0 ), "tr_rear" }, [13] = { Vector( -3 , -8.57053 , 4.35726), Angle( 0, 90, 0 ), "tr_rear" }, [14] = { Vector( -3 , 8.57053 , 4.35726), Angle( 0, 90, 0 ), "tr_rear" }, [15] = { Vector( 2.39614 , -12.3784 , 7.35267), Angle( 0, -90, 0 ), "halogen_bro" }, [16] = { Vector( 2.39614 , 12.3784 , 7.35267), Angle( 0, -90, 0 ), "halogen_bro" }, [17] = { Vector( -2.39614 , -12.3784 , 7.35267), Angle( 0, 90, 0 ), "halogen_bro" }, [18] = { Vector( -2.39614 , 12.3784 , 7.35267), Angle( 0, 90, 0 ), "halogen_bro" }, } COMPONENT.Sections = { ["halogens"] = { [1] = { { 15, R }, { 16, B }, }, [2] = { { 15, R }, { 16, B }, } }, ["main_rotors"] = { [1] = { { 1, B }, { 2, R }, } }, ["lower_rotors"] = { [1] = { { 3, SW }, { 4, SW }, { 5, SW }, { 6, SW }, } }, ["lower_tr_rear"] = { [1] = { { 7, A, { 16, 0, 0 } }, { 8, A, { 16, 0, 8 }}, { 9, A, { 16, 0, 8 } }, { 10, A, { 16, 0, 0 } },} }, ["front"] = { [1] = { { 18, B }, }, [2] = { { 17, R }, } }, ["front_lower"] = { [1] = { { 12, B, { 16, 0, 0 } }, { 11, R, { 16, 0, 8 } },}, }, } COMPONENT.Patterns = { ["halogens"] = { ["3flash"] = { 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, ["main_rotors"] = { ["on"] = { 1 } }, ["lower_rotors"] = { ["on"] = { 1 } }, ["lower_tr_rear"] = { ["code3"] = { 1} }, ["front"] = { ["code3"] = { 1,0,1,0,1,0,2,0,2,0,2,0 } }, ["front_lower"] = { ["on"] = { 1 } }, } COMPONENT.TrafficDisconnect = { } COMPONENT.Modes = { Primary = { M1 = { ["main_rotors"] = "on", }, M2 = { ["main_rotors"] = "on", ["halogens"] = "3flash", ["front_lower"] = "on", }, M3 = { ["main_rotors"] = "on", ["halogens"] = "3flash", ["lower_rotors"] = "on", ["lower_tr_rear"] = "code3", ["front"] = "code3", ["front_lower"] = "on", } }, Auxiliary = { C = { }, L = { }, R = { }, D = { } }, Illumination = { L = { { 1, W } }, R = { { 1, W } } } } EMVU:AddAutoComponent( COMPONENT, name )