Properties

Properties define how an item works and who it should be available to. Some are used to show the item in the menu, whilst others are used to restrict items to specific groups.

ITEM.Name

Required: Yes
Type: String
Description: The items name in the shop.

ITEM.Name = 'Test Item'

ITEM.Price

Required: Yes
Type: Number
Description: How much should the item cost to buy?

ITEM.Price = 200

ITEM.Model

Required: No, unless ITEM.Material is not defined
Type: String
Description: The model shown in the PointShop menu. Either ITEM.Model or ITEM.Material is required.

ITEM.Model = 'models/player/kleiner.mdl'

ITEM.Material

Required: No, unless ITEM.Model is not defined
Type: String
Description: The material shown in the PointShop menu. Either ITEM.Model or ITEM.Material is required.

ITEM.Material = 'trails/electric.vmt'

ITEM.Skin

Required: No
Type: Number
Description: Sets the skin of the model shown in the PointShop menu.

ITEM.Skin = 1

ITEM.AllowedUserGroups

Required: No
Type: Table
Description: Defines the groups who's members can buy the item.

ITEM.AllowedUserGroups = { "admin", "vip" }

ITEM.SingleUse

Required: No
Type: Boolean
Description: Defines if the item should be given to the player only once and not kept. Useful for purchasing weapons weapons. This will call ITEM:OnBuy() but not ITEM:OnEquip().

ITEM.SingleUse = true

ITEM.Attachment

Required: No
Type: String
Description: Defines which model attachment to use for clientside model positioning.

ITEM.Attachment = 'eyes'

ITEM.Bone

Required: No
Type: String
Description: Defines which model bone to use for clientside model positioning.

ITEM.Bone = 'ValveBiped.Bip01_Head1'

ITEM.NoPreview

Required: No
Type: Boolean
Description: Enables or disables previews for the item.

ITEM.NoPreview = true

ITEM.AdminOnly

Required: No
Type: Boolean
Description: Sets whether the item should only be purchasable by admins.

ITEM.AdminOnly = true

ITEM.Except

Required: No
Type: Boolean
Description: Sets whether the item can be purchased when the player is dead/in spectator mode.

ITEM.Except = true
comments powered by Disqus