Usergroup Restricted
So following the other topics on creating an item, this guide will show you how to restrict one certain item to specific usergroups only.
CH_NPC_Shops.Items["weapon_ak472"] = {
Name = "AK-47",
Class = "weapon_ak472",
Type = "Weapon",
Price = 12000,
Description = "Officially known as the Avtomat Kalashnikova is a gas-operated assault rifle that is chambered for the 7.62×39mm cartridge.",
Model = "models/weapons/w_rif_ak47.mdl",
Color = Color( 160, 32, 240 ),
CanBuy = true,
CanSell = true,
UsergroupRestricted = {
["vip"] = true,
["superadmin"] = true,
},
}
The UsergroupRestricted variable is optional and works for all item types. Set the teams you want to restrict the item to, and now only those groups can purchase this item!