GetPlayerRotation: Difference between revisions
Jump to navigation
Jump to search
JonChappell (talk | contribs) No edit summary |
m (→Example) |
||
Line 10: | Line 10: | ||
==Example== | ==Example== | ||
fRot = [[getPlayerRotation]] ( findPlayer ( "someguy" ) ) | fRot = [[getPlayerRotation]] ( [[findPlayer]] ( "someguy" ) ) | ||
if ( fRot ) | if ( fRot ) | ||
[[ | [[serverChat]] ( "Someguy's current rotation: ", fRot, "." ) | ||
end | end |
Revision as of 07:30, 28 March 2006
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