Items
These functions can be called at any time and are used for the base functionality in PointShop.
Player:PS_GiveItem(item_id)
Arguments: String item_id
Realm: Server
Description: Gives an item to the player, if they don't already have one.
ply:PS_GiveItem('conehat')
Player:PS_TakeItem(item_id)
Arguments: String item_id
Realm: Server
Description: Takes an item from the player, if they already have one.
ply:PS_TakeItem('conehat')
Player:PS_BuyItem(item_id)
Arguments: String item_id
Realm: Server
Description: Gives the player an item and takes points, if they are allowed to and can afford to do so.
ply:PS_BuyItem('conehat')
Player:PS_SellItem(item_id)
Arguments: String item_id
Realm: Server
Description: Takes an item from the player and gives them points, if they are allowed to and have the item.
ply:PS_SellItem('conehat')
Player:PS_EquipItem(item_id)
Arguments: String item_id
Realm: Server
Description: Equips an item for the player.
ply:PS_EquipItem('conehat')
Player:PS_HolsterItem(item_id)
Arguments: String item_id
Realm: Server
Description: Holsters an item for the player.
ply:PS_HolsterItem('conehat')
Player:PS_ModifyItem(item_id, modifications)
Arguments: String item_id, Table modifications
Realm: Server
Description: Saves modifications for an item and calls ITEM:OnModify(ply, modifications)
ply:PS_ModifyItem('conehat', { color = Color(255, 0, 0, 0) })
Player:PS_HasItem(item_id)
Arguments: String item_id
Realm:
Description: Returns whether the player has an item.
local has_item = ply:PS_HasItem('conehat')
Player:PS_HasItemEquipped(item_id)
Arguments: String item_id
Realm:
Description: Returns whether the player has an item equipped.
local has_item = ply:PS_HasItemEquipped('conehat')
Player:PS_NumItemsEquippedFromCategory(category_id)
Arguments: String category_id
Realm:
Description: Returns the number of items the player has equipped from a category.
local has_item = ply:PS_NumItemsEquippedFromCategory('powerups')