hasItem
Last updated
Last updated
Description
Checks if a player has at least the specified amount of an item.
Parameters
identifier
(string): The source of the player.
item
(string): The name/key of the item to check.
amount
(number, optional): Minimum quantity needed (default: 1
).
Return Value
Returns true
if the player has enough of the item.
Returns false
otherwise.
Example Use Case
if ps.hasItem(src, "lockpick", 3) then
print("Player has 3 lockpicks.")
else
print("Not enough lockpicks.")
end