This repository was archived by the owner on May 22, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 61
HasItem
Matias Salas edited this page Dec 27, 2020
·
2 revisions
Player.HasItem(Item)This function determines if the player has a certain item.
| Argument | Type | Optional | Default Value | Explanation |
|---|---|---|---|---|
| Item | string | No | - | Item name |
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
Scripting Manual
Modules
Data
Config
Translation
Client Side
Events
Player:DeathDetection
Functions
Register.Clothes
Player.Shooting
Player.Running
Player.Driving
Player.ShowNotification
Server Side
Events
Player:DeathDetection
Functions
Register.Item
Player.Identifier
Player.Exists
Player.GetIdentity
Player.GetName
Player.GetSex
Player.GetGroup
Player.GetOccupation
Player.GetInventory
Player.GetSkin
Player.AddItem
Player.RemoveItem
Player.CanCarryItem
Player.HasItem
Player.AddWeapon
Player.RemoveWeapon
Player.AddWeaponAmmo
Player.RemoveWeaponAmmo
Player.HasWeapon
Player.CurrentWeight
Player.ShowNotification