GetPlayerScriptDebugLevel: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
Fernando187 (talk | contribs) (Remove obsolete Requirements section) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{ | {{Shared function}} | ||
<!-- Describe in plain english what this function does. Don't go into details, just give an overview --> | <!-- Describe in plain english what this function does. Don't go into details, just give an overview --> | ||
{{New feature/item|3.0158|1.5.7|19626| | {{New feature/item|3.0158|1.5.7|19626| | ||
This will allow you to retrieve the player current debug script level. | This will allow you to retrieve the player current debug script level. | ||
}} | |||
{{New feature/item|3.0161|1.6.0|22592| | |||
This function has a client-sided variant, which can only retrieve the local player's script debug level. | |||
}} | }} | ||
==Syntax== | ==Syntax== | ||
<!-- NOTE: don't use 'special' names for variable names, e.g. you shouldn't be writing things like 'player player, vehicle vehicle', instead write something like 'player thePlayer, vehicle vehicleToGetInto'. This is less confusing and prevents the syntax highlighting being odd --> | <!-- NOTE: don't use 'special' names for variable names, e.g. you shouldn't be writing things like 'player player, vehicle vehicle', instead write something like 'player thePlayer, vehicle vehicleToGetInto'. This is less confusing and prevents the syntax highlighting being odd --> | ||
<section name="Server" class="server" show="true"> | |||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
int getPlayerScriptDebugLevel( player thePlayer ) | int getPlayerScriptDebugLevel( player thePlayer ) | ||
Line 18: | Line 22: | ||
<!-- Make this descriptive. Explain what cases will return false. If you're unsure, add a tag to it so we can check --> | <!-- Make this descriptive. Explain what cases will return false. If you're unsure, add a tag to it so we can check --> | ||
Returns an ''int'' with the player debug script level, ''false'' if the player is invalid. | Returns an ''int'' with the player debug script level, ''false'' if the player is invalid. | ||
</section> | |||
<section name="Client" class="client" show="true"> | |||
<syntaxhighlight lang="lua"> | |||
int getPlayerScriptDebugLevel() | |||
</syntaxhighlight> | |||
{{OOP||[[player]]:getScriptDebugLevel|scriptDebugLevel}} | |||
===Returns=== | |||
<!-- Make this descriptive. Explain what cases will return false. If you're unsure, add a tag to it so we can check --> | |||
Returns an ''int'' with the local player's debug script level. | |||
</section> | |||
==Example== | ==Example== | ||
<!-- Explain what the example is in a single sentance --> | <!-- Explain what the example is in a single sentance --> | ||
Line 30: | Line 45: | ||
addCommandHandler ( "showdebug", showdebug ) | addCommandHandler ( "showdebug", showdebug ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==See Also== | ==See Also== | ||
<!-- Change FunctionArea to the area that this function is in on the main function list page, e.g. Server, Player, Vehicle etc --> | <!-- Change FunctionArea to the area that this function is in on the main function list page, e.g. Server, Player, Vehicle etc --> | ||
{{ | {{Shared_player_functions}} |
Latest revision as of 17:18, 7 November 2024
This will allow you to retrieve the player current debug script level.
Syntax
Click to collapse [-]
Serverint getPlayerScriptDebugLevel( player thePlayer )
OOP Syntax Help! I don't understand this!
- Method: player:getScriptDebugLevel(...)
- Variable: .scriptDebugLevel
- Counterpart: setPlayerScriptDebugLevel
Required Arguments
- thePlayer: The person whose debug script level you want
Returns
Returns an int with the player debug script level, false if the player is invalid.
Click to collapse [-]
Clientint getPlayerScriptDebugLevel()
OOP Syntax Help! I don't understand this!
- Method: player:getScriptDebugLevel(...)
- Variable: .scriptDebugLevel
Returns
Returns an int with the local player's debug script level.
Example
Displays a message in the chat what is the player's debug level.
function showdebug (player) local level = getPlayerScriptDebugLevel( player ) outputChatBox( "Your Script Debug Level: " .. level ) end addCommandHandler ( "showdebug", showdebug )
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