I haven't been able to find any command for this, so if it does already exist then ignore this (and please post the command, too).
Add something like
or
Add something like
ahg_pointshop_buyitem <item_id>
as a console command to make it easy to bind buying point shop items, as in:
Code:
ahg_pointshop_buyitem weapon_ttt_colt_m1911 // buys a colt from the shop
Code:
ahg_pointshop_buyitem traitor // buys a traitor round from the shop
As far as I can tell the point shop identifies items via their generated
It looks like it should be as easy as doing
ITEM.ID
(looks like the source file name, lower-cased, and with the .lua
file extension removed), not their ITEM.Class
property/field. So, the example above is probably wrong, but you get the idea. I guess there could be a mapping between ITEM.Class
and ITEM.ID
to make things more consistent with a command like ttt_order_equipment
but it's probably not worth the effort.It looks like it should be as easy as doing
concommand.Add("ahg_pointshop_buyitem", self:PS_BuyItem)
in the same code file where Player:PS_BuyItem(...)
is defined, but honestly I know next to nothing about Lua in Garry's Mod. Looking at the docs there might need to be an overload of Player:PS_BuyItem(...)
that takes a Player
object as its first argument, but idk.
Last edited: