GetLocalPlayer
Jump to navigation
Jump to search
This function gets the player element of the client running the current script.
Syntax
player getLocalPlayer ()
Returns
Returns a player element.
Example
This clientside function outputs the player's current location to the console.
function outputPOS () --we get the player element local player = getLocalPlayer () --we get the player's position local px, py, pz = getPlayerPosition ( player ) --we output it to the console outputConsole ( "Your location: "..px.." "..py.." "..pz ) end end
See Also
- getLocalPlayer
- getPlayerMapBoundingBox
- getPlayerMapOpacity
- isPlayerMapVisible
- resetBlurLevel
- isPlayerHudComponentVisible
- Shared
- 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