Hey i was wondering if anyone could help me in figuring out how to add icons to specific items within original pointshop. Either by creating a new group with an icon, or individually for each item.
I’ve found this code which could be relevant.
lua/pointshop/vgui/DPointShopItem.lua
function PANEL:PaintOver()
141 if self.Data.AdminOnly then
142 surface.SetMaterial(adminicon)
lua/pointshop/sh_init.lua
ITEM.AdminOnly = false
100 ITEM.AllowedUserGroups = {} -- this will fail the #ITEM.AllowedUserGroups test and continue
lua/pointshop/sv_player_extension.lua
if ITEM.AdminOnly and not self:IsAdmin() then
202 self:PS_Notify('This item is Admin only!')
example item code:
ITEM.Name = 'AK47'
ITEM.Price = 2000
ITEM.Model = 'models/weapons/w_rif_ak47.mdl'
ITEM.WeaponClass = 'weapon_ttt_ak'
ITEM.SingleUse = false
ITEM.AllowedUserGroups = { "superadmin", "Super Donator", "Donator+", "Guardian", }
something like ITEM.SetMaterial = ruby work?
Thank you for any help and understanding <3