Garry's Mod

Garry's Mod

PointShop
Slater 2019 年 12 月 25 日 上午 12:44
Only working when it wants to
I put a bunch of M9K guns in my pointshop items using this basic lua script:

ITEM.Name = 'NAME'
ITEM.Price = PRICE
ITEM.Model = 'WORLD MODEL'
ITEM.WeaponClass = 'WEAPON CLASS'
ITEM.SingleUse = true

function ITEM:OnBuy(ply)
ply:Give(self.WeaponClass)
ply:SelectWeapon(self.WeaponClass)
end

function ITEM:OnSell(ply)
ply:StripWeapon(self.WeaponClass)
end

And the guns only show up sometimes. PLEASE HELP
< >
正在显示第 1 - 3 条,共 3 条留言
crester  [开发者] 2019 年 12 月 25 日 上午 1:26 
well, can you describe this "guns only show up sometimes" a bit more properly in details? do weapons exist only by a certain chance or what
Slater 2019 年 12 月 25 日 上午 1:29 
引用自 crester
well, can you describe this "guns only show up sometimes" a bit more properly in details? do weapons exist only by a certain chance or what
i think they take some time to show up. About a few minutes
Rat 2020 年 3 月 12 日 上午 1:55 
Strip the weapon in the slot it occupies before giving them the new weapon. It won't give it to them if there currently is one in the slot.
< >
正在显示第 1 - 3 条,共 3 条留言
每页显示数: 1530 50