inspect | Multi Theft Auto: Wiki Skip to content

inspect

Client-side
Server-side
Shared

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function returns human-readable representations of tables and MTA datatypes as a string.

Syntax

inspect ( )

Code Examples

server

This example draws the contents of a table and its data type:

local Table = {
["matrix"] = {position = {getElementPosition(localPlayer)},rotation = {getElementRotation( localPlayer )}},
["localplayer"] = getPlayerName(localPlayer),
}
local inspectedTblStr = inspect(Table)
addEventHandler("onClientRender",root,
function( )
--> then draw the created string.
--> Try to NOT use such functions under onClientRender, since it works with loops, and if we want to print a bigger table, it will drop some frames.
dxDrawText(inspectedTblStr,10,250)
end
)