GetPlayerScriptDebugLevel

From Multi Theft Auto: Wiki
Revision as of 10:00, 30 June 2024 by Nico834 (talk | contribs) (Add shared function area & beta header)
Jump to navigation Jump to search

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

ADDED/UPDATED IN VERSION 1.6.0 r22592:

This function has a client-sided variant, which can only retrieve the local player's script debug level.

Syntax

Click to collapse [-]
Server
int 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 [-]
Client
int getPlayerScriptDebugLevel()

OOP Syntax Help! I don't understand this!

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


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 )

Requirements

This template will be deleted.

See Also