hasItem
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
trueif the player has enough of the item.Returns
falseotherwise.
Example Use Case
if ps.hasItem(src, "lockpick", 3) then
print("Player has 3 lockpicks.")
else
print("Not enough lockpicks.")
endLast updated