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
- forcePlayerMap
- getAlivePlayers
- getDeadPlayers
- getPlayerACInfo
- getPlayerAnnounceValue
- getPlayerBlurLevel
- getPlayerCount
- getPlayerFromName
- getPlayerIdleTime
- getPlayerIP
- getPlayerMoney
- getPlayerName
- getPlayerNametagColor
- getPlayerNametagText
- getPlayerPing
- getPlayerScriptDebugLevel
- getPlayerSerial
- getPlayerTeam
- getPlayerVersion
- getPlayerWantedLevel
- getRandomPlayer
- givePlayerMoney
- isPlayerMapForced
- isPlayerMuted
- isPlayerNametagShowing
- isVoiceEnabled
- redirectPlayer
- resendPlayerACInfo
- resendPlayerModInfo
- setPlayerAnnounceValue
- setPlayerBlurLevel
- setPlayerHudComponentVisible
- setPlayerMoney
- setPlayerMuted
- setPlayerName
- setPlayerNametagColor
- setPlayerNametagShowing
- setPlayerNametagText
- setPlayerScriptDebugLevel
- setPlayerTeam
- setPlayerVoiceBroadcastTo
- setPlayerVoiceIgnoreFrom
- setPlayerWantedLevel
- spawnPlayer
- takePlayerMoney
- takePlayerScreenShot