Entity:getItemTable

From Nutscript Developer Wiki
    Entity:getItemTable()

This function returns the Item Table of an entity. Useful for when you want to use a specific Nutscript item on functions that take an Entity argument.

Arguments[edit]

none

Return Values[edit]

  • Table of Nutscript item data

Examples[edit]

This will find all the nut_item entities and return their uniqueID string (filename).

    for k,v in pairs(ents.FindByClass("nut_item")) do
       print(v:getItemTable().uniqueID)
    end