Vehicle Components

From Multi Theft Auto: Wiki
Revision as of 15:02, 21 January 2021 by HiroShi (talk | contribs) (Added a client-side code that shows you all the components of the vehicle you are in / on.)
Jump to navigation Jump to search

This page aims to provide an overview of vehicle components. The list is currently incomplete.

[[{{{image}}}|link=|]] Note: Changing wheel position on Z axis doesn't work.


Component Name Description
boot_dummy Trunk door
ug_nitro Nitro (tuning part)
wheel_rf_dummy Right Front Wheel
wheel_lf_dummy Left Front Wheel
wheel_rb_dummy Right Back Wheel
wheel_lb_dummy Left Back Wheel
chassis Chassis
chassis_vlo Chassis (lod)[Can't be hid]
ug_roof Roof [Can't be hid]
door_rf_dummy Right Front Door
door_lf_dummy Left Front Door
door_rr_dummy Right Back Door
door_lr_dummy Left Back Door
bonnet_dummy Hood
ug_wing_right Right wing (tuning part) [Can't be hid]
bump_front_dummy Front bumper
bump_rear_dummy Back bumper
windscreen_dummy Windscreen
misc_a Tow bar position on models: 514, 515, 403, 591, 552, 485, 583, 606, 607, 608.
ug_wing_left Leftwing (tuning part) [Can't be hid]
exhaust_ok Exhausts

Bike Components


[[{{{image}}}|link=|]] Note: Vehicles in the 'bike' category have 8 different components from the others, so a separate table was created..


An illustrative image showing the components of the bike.

Many different:

Component Name Description
chassis_dummy Vehicle chassis
plate_rear Back plate
handlebars Handlebars
mudguard Mudguard
wheel_rear Rear tire
whee_front Front Tire
froks_rear Froks rear
froks_front Froks front

Equals:

Component Name
chassis
chassis_vlo

Code that shows all the components of the vehicle you are inside.

There are more components that are not yet in these tables above, and if you want to know all of them use this code below. This code works as follows: you enter / climb the vehicle and it will show you all the components as in the image above.

Click to collapse [-]
Client
addEventHandler ( "onClientRender", root,
function()
	countTest = 0
	if isPedInVehicle ( localPlayer ) and getPedOccupiedVehicle ( localPlayer ) then
		local veh = getPedOccupiedVehicle ( localPlayer )
		for v in pairs ( getVehicleComponents(veh) ) do
			countTest = countTest + 1
			local x,y,z = getVehicleComponentPosition ( veh, v, "world" )
			local sx,sy = getScreenFromWorldPosition ( x, y, z )
			if sx and sy then
				dxDrawRectangle(sx,sy, 10, 10)
				dxDrawLine(sx, sy, sx-100, sy-200)
				dxDrawText ( v, (sx-(120 + (countTest * 5))) -1, (sy-(220 + (countTest * 10))) -1, 0 -1, 0 -1, tocolor(0,0,0), 1, "default-bold" )
				dxDrawText ( v, (sx-(120 + (countTest * 5))) +1, (sy-(220 + (countTest * 10))) -1, 0 +1, 0 -1, tocolor(0,0,0), 1, "default-bold" )
				dxDrawText ( v, (sx-(120 + (countTest * 5))) -1, (sy-(220 + (countTest * 10))) +1, 0 -1, 0 +1, tocolor(0,0,0), 1, "default-bold" )
				dxDrawText ( v, (sx-(120 + (countTest * 5))) +1, (sy-(220 + (countTest * 10))) +1, 0 +1, 0 +1, tocolor(0,0,0), 1, "default-bold" )
				dxDrawText ( v, (sx-(120 + (countTest * 5))), (sy-(220 + (countTest * 10))), 0, 0, tocolor(0,255,255), 1, "default-bold" )
			end
		end
	end
end)

Related scripting functions




Vehicle functions