getItemByName
Description
Returns the first matching item object by name from the player's inventory.
Parameters
identifier
(string): The source of the player.item
(string): The name/key of the item.
Return Value
Returns the item table if found, otherwise
nil
.
Example Use Case
local phone = ps.getItemByName(source, "phone")
if phone then
print("Found phone with metadata: " .. json.encode(phone.info))
end
Last updated