Tray capacity||doc135672

September 20, 2022

Format

 tray:capacity() 
  • The class to which the function belongs:tray

Description

Returns tray capacity.


Value Returned

type Description
int capacity


Code Samples

On the server side of the entity templatemount script, get all the trays of the player, and output the tid and tray capacity of each tray

local entityTrays = this:tray()                       
local trayTb = entityTrays:query_trays(function(tray)    
    return true
 end)
for _, _tray in pairs(trayTb) do
  print(_tray.tid,_tray.tray:capacity())
end