Skip to content
This repository was archived by the owner on May 22, 2021. It is now read-only.

HasItem

Matias Salas edited this page Dec 27, 2020 · 2 revisions

Server-Side

Player.HasItem(Item)

This function determines if the player has a certain item.

Arguments

Argument Type Optional Default Value Explanation
Item string No - Item name

Example

local _Player = Player(source)
local HasItem, Count = _Player.HasItem("item")
if HasItem then
   print("Player has item x".. Count .." in his inventory")
end

-- or

if _Player.HasItem("item") then
    print("Player has item in his inventory")
end

Clone this wiki locally