SetElementVelocity

From Multi Theft Auto: Wiki
Revision as of 12:00, 22 July 2006 by MrJax (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Description

This function sets the velocity (movement speeds) along each axis, of an element. If this function fails, the first argument will be set to 'false'

Syntax

bool setElementVelocity ( element theElement, float speedX, speedY, speedZ )

Required Arguments

  • theElement: The element you wish to set the velocity of.
  • speedX: A floating point value determining the speed along the X axis.
  • speedY: A floating point value determining the speed along the Y axis.
  • speedZ: A floating point value determining the speed along the Z axis.

Example

speedx, speedy, speedz = getElementVelocity ( findPlayer ( "someguy" ) ) -- get the velocity of the player named "someguy"
setElementVelocity ( findPlayer ( "Ted" ), speedx, speedy, speedz ) -- copy the velocity to a player named "Ted"

See Also