<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Atroxide</id>
	<title>Multi Theft Auto: Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Atroxide"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Atroxide"/>
	<updated>2026-04-30T01:11:16Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetElementDistanceFromCentreOfMassToBaseOfModel&amp;diff=28905</id>
		<title>GetElementDistanceFromCentreOfMassToBaseOfModel</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetElementDistanceFromCentreOfMassToBaseOfModel&amp;diff=28905"/>
		<updated>2012-01-02T06:28:03Z</updated>

		<summary type="html">&lt;p&gt;Atroxide: Removed precalculated outputs, incorrect.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function is used to retrieve the distance between a element's centre of mass to the base of the model. This can be used to calculate the position the element has to be set to, to have it on ground level.&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
float getElementDistanceFromCentreOfMassToBaseOfModel ( element theElement )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
===Required Parameters===&lt;br /&gt;
'''theElement:''' The element you want to retrieve the value of.&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a ''float'' with the distance, or ''false'' if the element is invalid.&lt;br /&gt;
==Example==&lt;br /&gt;
This example outputs the value for the local player.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local localPlayer = getLocalPlayer()&lt;br /&gt;
local distance = getElementDistanceFromCentreOfMassToBaseOfModel(localPlayer)&lt;br /&gt;
outputChatBox(tostring(distance))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client element functions}}&lt;/div&gt;</summary>
		<author><name>Atroxide</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetElementDistanceFromCentreOfMassToBaseOfModel&amp;diff=28904</id>
		<title>GetElementDistanceFromCentreOfMassToBaseOfModel</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetElementDistanceFromCentreOfMassToBaseOfModel&amp;diff=28904"/>
		<updated>2012-01-02T06:21:15Z</updated>

		<summary type="html">&lt;p&gt;Atroxide: Added pre-caclulated outputs for this function.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function is used to retrieve the distance between a element's centre of mass to the base of the model. This can be used to calculate the position the element has to be set to, to have it on ground level.&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
float getElementDistanceFromCentreOfMassToBaseOfModel ( element theElement )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
===Required Parameters===&lt;br /&gt;
'''theElement:''' The element you want to retrieve the value of.&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a ''float'' with the distance, or ''false'' if the element is invalid.&lt;br /&gt;
==Example==&lt;br /&gt;
This example outputs the value for the local player.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local localPlayer = getLocalPlayer()&lt;br /&gt;
local distance = getElementDistanceFromCentreOfMassToBaseOfModel(localPlayer)&lt;br /&gt;
outputChatBox(tostring(distance))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
==Pre-calculated Outputs==&lt;br /&gt;
This is a list of GTA:SA's vehicle ID numbers matched with their output from this function&lt;br /&gt;
&lt;br /&gt;
Lua table of all the valid vehicle IDs with their outputs listed on this page:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;distanceFromCenterOfMassToBaseOfModelTable = {602 = 0.90000009536743, 545 = 0.94999980926514, 496 = 0.78772735595703, 517 = 0.93566590547562, 401 = 0.86781454086304, 410 = 0.74999296665192, &lt;br /&gt;
518 = 0.79480773210526, 600 = 0.84184813499451, 527 = 0.78314852714539, 436 = 0.87799340486526, 589 = 0.71692597866058, 580 = 0.90752363204956, &lt;br /&gt;
419 = 0.92999982833862, 439 = 1, 533 = 0.79999989271164, 549 = 0.86147683858871, 526 = 0.84999984502792, 491 = 0.8999999165535, &lt;br /&gt;
474 = 0.89999985694885, 445 = 0.98999989032745, 467 = 0.87000000476837, 604 = 0.91999995708466, 426 = 0.81999969482422, 507 = 0.95000004768372, &lt;br /&gt;
547 = 0.83999991416931, 585 = 0.69692599773407, 405 = 1, 587 = 0.81000000238419, 409 = 0.92499983310699, 466 = 0.91999995708466, &lt;br /&gt;
550 = 0.92278164625168, 492 = 0.89999997615814, 566 = 0.90000021457672, 546 = 0.84184813499451, 540 = 0.97950112819672, 551 = 0.87999987602234, &lt;br /&gt;
421 = 1, 516 = 0.89999997615814, 529 = 0.73788851499557, 592 = 2.2973258495331, 553 = 3.2349998950958, 577 = 1.0746998786926, &lt;br /&gt;
488 = 1.2650001049042, 511 = 2.5158977508545, 497 = 1.2650001049042, 548 = 2.9000618457794, 563 = 1.8857498168945, 512 = 1.6340000629425, &lt;br /&gt;
476 = 2.1701526641846, 593 = 1.5501824617386, 447 = 1.1000000238419, 425 = 1.8510003089905, 519 = 2, 520 = 1.9195756912231, &lt;br /&gt;
460 = 2.219527721405, 417 = 1.2730000019073, 469 = 1.1000000238419, 487 = 1.2650001049042, 513 = 1.78475689888, 581 = 0.69976079463959, &lt;br /&gt;
510 = 0.69584167003632, 509 = 0.5997970700264, 522 = 0.66037738323212, 481 = 0.60877603292465, 461 = 0.67450165748596, 462 = 0.67021918296814, &lt;br /&gt;
448 = 0.67021918296814, 521 = 0.66037738323212, 468 = 0.75999987125397, 463 = 0.61699998378754, 586 = 0.59700000286102, 472 = 0.77418208122253, &lt;br /&gt;
473 = 0.32354342937469, 493 = 1.3853187561035, 595 = 1.102756023407, 484 = 1.3414800167084, 430 = 0.79800415039063, 453 = 0.93193912506104, &lt;br /&gt;
452 = 0.58204936981201, 446 = 1.0186829566956, 454 = 1.2658512592316, 485 = 0.69999998807907, 552 = 0.77690804004669, 431 = 1.25, &lt;br /&gt;
438 = 1.1999999284744, 437 = 1.25, 574 = 0.79393339157104, 420 = 0.84999972581863, 525 = 0.99000000953674, 408 = 1.75, 416 = 1.2995755672455, &lt;br /&gt;
596 = 0.81999969482422, 433 = 1.5699999332428, 597 = 0.8699996471405, 427 = 1.2480000257492, 599 = 1.3851264715195, 490 = 1.3201265335083, &lt;br /&gt;
432 = 1.0993369817734, 528 = 1.1849999427795, 601 = 0.93020880222321, 407 = 1.3700000047684, 428 = 1.2497900724411, 544 = 1.3700000047684, &lt;br /&gt;
523 = 0.66037738323212, 470 = 1.1100116968155, 598 = 0.8699996471405, 499 = 1.0999999046326, 588 = 1.1393926143646, 609 = 1.210000038147, &lt;br /&gt;
403 = 1.700000166893, 498 = 1.210000038147, 514 = 1.6996750831604, 524 = 2.0531990528107, 423 = 1.1302119493484, 532 = 2.1097192764282, &lt;br /&gt;
414 = 1.1500000953674, 578 = 1.75, 443 = 1.750394821167, 486 = 1.3000000715256, 515 = 2.1537208557129, 406 = 1.7513251304626, &lt;br /&gt;
531 = 1.0064532756805, 573 = 1.215448141098, 456 = 1.25, 455 = 1.5699999332428, 459 = 1.1399999856949, 543 = 0.94999998807907, &lt;br /&gt;
422 = 1.0799999237061, 583 = 0.64689421653748, 482 = 1.25, 478 = 1.0799999237061, 605 = 0.94999998807907, 554 = 1.1949999332428, &lt;br /&gt;
530 = 0.80008584260941, 418 = 1.1829564571381, 572 = 0.63999998569489, 582 = 1.1549999713898, 413 = 1.1499999761581, 440 = 1.2126893997192, &lt;br /&gt;
536 = 0.85000014305115, 575 = 0.7399999499321, 534 = 0.8228771686554, 567 = 0.97834157943726, 535 = 0.8400000333786, 576 = 0.75, &lt;br /&gt;
412 = 0.94999992847443, 402 = 0.93999981880188, 542 = 0.84339809417725, 603 = 1.0026750564575, 475 = 0.8999999165535, 449 = 2.4973087310791, &lt;br /&gt;
537 = 2.5995426177979, 538 = 2.4756197929382, 441 = 0.17500001192093, 464 = 0.40700000524521, 501 = 0.4549999833107, 465 = 0.4549999833107, &lt;br /&gt;
564 = 0.23500001430511, 568 = 0.97500002384186, 557 = 0.3917441368103, 424 = 0.84722626209259, 471 = 0.57500004768372, 504 = 0.93999993801117, &lt;br /&gt;
495 = 1.5600740909576, 457 = 0.7293484210968, 539 = 0.65000009536743, 483 = 1.0955964326859, 508 = 1.4499998092651, 571 = 0.33228185772896, &lt;br /&gt;
500 = 1.2200000286102, 444 = 0.3917441368103, 556 = 0.3917441368103, 429 = 0.75, 411 = 0.79999983310699, 541 = 0.69999998807907, &lt;br /&gt;
559 = 0.75406360626221, 415 = 0.84952139854431, 561 = 0.92399996519089, 480 = 0.85000002384186, 560 = 0.80497515201569, 562 = 0.75354951620102, &lt;br /&gt;
506 = 0.79211330413818, 565 = 0.6919310092926, 451 = 0.76437205076218, 434 = 1.1492453813553, 558 = 0.70379173755646, 494 = 0.97000002861023, &lt;br /&gt;
555 = 0.78037416934967, 502 = 0.9694904088974, 477 = 0.85000002384186, 503 = 0.9694904088974, 579 = 1.098637342453, 400 = 1.136110663414, &lt;br /&gt;
404 = 0.8299999833107, 489 = 1.3601264953613, 505 = 1.3601264953613, 479 = 0.90458089113235, 442 = 0.94986796379089, 458 = 0.97020995616913, &lt;br /&gt;
606 = 1.0937063694, 607 = 1.0999999046326, 610 = 0.4003584086895, 590 = 2.5152010917664, 569 = 2.5144035816193, 611 = 0.69189035892487, &lt;br /&gt;
584 = 2.1593854427338, 608 = 1.5730134248734, 435 = 1.6541831493378, 450 = 1.6541831493378, 591 = 1.6541831493378, 594 = 0.20966726541519}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client element functions}}&lt;/div&gt;</summary>
		<author><name>Atroxide</name></author>
	</entry>
</feed>