GetElementVelocity
Jump to navigation
Jump to search
Description
This function returns three floats containing the velocity (movement speeds) along the X, Y, and Z axis respectively. This function can fail if the element is a player in a car. Use the vehicle element in this case. If this function does fail, the first argument will be set to 'false'
Syntax
float float float getElementVelocity ( element theElement )
Required Arguments
- theElement: The element you wish to retrieve the velocity of.
Example
speedx, speedy, speedz = getElementVelocity ( findPlayer ( "someguy" ) ) actualspeed = (speedx^2 + speedy^2 + speedz^2)^(0.5) --Raising something to the exponent of 0.5 is the same thing as taking a square root. outputChatBox ( "Someguy's current Velocity: ", actualspeed, " arbitrary units." )
See Also
- getPlayerTeam
- getPlayerBlurLevel
- setPlayerBlurLevel
- getPlayerSerial
- forcePlayerMap
- getPlayerScriptDebugLevel
- getPlayerFromName
- getPlayerMoney
- getPlayerName
- getPlayerNametagColor
- getPlayerNametagText
- getPlayerPing
- getPlayerWantedLevel
- givePlayerMoney
- isPlayerMapForced
- isPlayerNametagShowing
- setPlayerHudComponentVisible
- setPlayerMoney
- setPlayerNametagColor
- setPlayerNametagShowing
- setPlayerNametagText
- takePlayerMoney
- countPlayersInTeam
- getPlayersInTeam
- isVoiceEnabled
- setControlState
- getControlState