SetPlayerRotation
Jump to navigation
Jump to search
This article needs checking. | |
Reason(s): The rotation must be a varible, it cannot be an actual number. For example, getplayerrotation and set it to a varible, then set player rotation to that varible + 10. Vehicle rotation function worked with a number. Other rotation functions may not be accepting numbers too, but vehicle did. So I doubt it. -Ransom |
This function allows you to set the current rotation of the specified player.
Syntax
bool setPlayerRotation ( player thePlayer, float rotation )
Required Arguments
Returns
Returns true if successful, false otherwise.
Example
This example code makes the player named Cheesepie look south.
cheesepie = getPlayerFromNick ( "Cheesepie" ) -- try to get the player by his nick if ( cheesepie ) then -- make sure we found him (there may be no player named Cheesepie on the server) setPlayerRotation ( cheesepie, 180 ) -- set his roation end
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