GetPlayerScriptDebugLevel: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
Line 7: Line 7:
<!-- 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 -->
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
string getPlayerScriptDebugLevel( player thePlayer )
int getPlayerScriptDebugLevel( player thePlayer )
</syntaxhighlight>  
</syntaxhighlight>  
{{OOP||[[player]]:getScriptDebugLevel|scriptDebugLevel}}
{{OOP||[[player]]:getScriptDebugLevel|scriptDebugLevel}}

Revision as of 13:36, 23 January 2020

This will allow you to retrieve the player current debug script level.

Syntax

int getPlayerScriptDebugLevel( player thePlayer )

OOP Syntax Help! I don't understand this!

Method: player:getScriptDebugLevel(...)
Variable: .scriptDebugLevel


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.

Example

This will show your debug script level on your screen.

addEventHandler('onClientRender', root, function()
    dxDrawText("Debug Script Level: "..getPlayerScriptDebugLevel(localPlayer), 10, 10)
end)

See Also