GetPlayerConsumableNames

From Wiki G1R-MP G1 Remake Multiplayer
Revision as of 17:32, 2 September 2026 by QCherry (talk | contribs) (Document Lua functions planned for G1R:MP update 0.1.2)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

getPlayerConsumableNames

COMING IN UPDATE 0.1.2
This function is documented in advance and is not yet available in the current public release.

Returns every stable consumable inventory key exposed by the native catalog.

Syntax

table getPlayerConsumableNames()

Parameters

This function does not accept parameters.

Returns

Returns a one-based array of consumable key strings.

Examples

Build a lookup table of supported consumables:

local supported = {}
for _, itemKey in ipairs(getPlayerConsumableNames()) do
    supported[itemKey] = true
end

Notes

  • Available only in server-side resource scripts.
  • The list includes food, drinks, potions and smoking items recognized by the current native catalog.
  • A catalog entry does not by itself grant an item. Use the authoritative inventory functions provided by the gamemode.