GetPlayerRotation: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 15: Line 15:
   [[serverChat]] ( "Someguy's current rotation: ", fRot, "." )
   [[serverChat]] ( "Someguy's current rotation: ", fRot, "." )
  end
  end
==See Also==
{{Player functions}}

Revision as of 20:03, 20 May 2006

Emblem-important.png This function is deprecated. This means that its use is discouraged and that it might not exist in future versions, but there should be a more generic way to perform what it does.


Description

This function returns a float containing the current rotation (in degrees) of the player. Its values lie between 0 and 359. This function can fail if the player is in a car. Use the getVehicleRotation function in this case. If this function does fail, the first argument will be set to 'false'.

Syntax

float GetPlayerRotation ( player player )

Required Arguments

  • player: The player whose rotation you want to retrieve.

Example

fRot = getPlayerRotation ( findPlayer ( "someguy" ) )
if ( fRot )
  serverChat ( "Someguy's current rotation: ", fRot, "." )
end

See Also