Rejected Add a console command (like ttt_order_equipment) to buy point shop weapons/items from the console

Status
Not open for further replies.

koanga

New Member
VIP
Legacy
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 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
or
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 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:
Voting on this suggestion has been paused.

Black

3rd Color of the Rainbow
VIP
Legacy
>unloads full clip
>no ammo
>click bind to rebuy weapon
>no reload time
>repeat

-1
 

koanga

New Member
VIP
Legacy
>unloads full clip
>no ammo
>click bind to rebuy weapon
>no reload time
>repeat

-1
I didn't think of that lmao

I guess you could restrict using it to pre-round or add a forced cooldown to match how long it normally takes to click through the menu. That's a lot more effort than this is worth, though.
 
Last edited:

Elvis

TheHoundDogs
Legacy
Bro y’all don’t remember the AHK scripts that xpro made and it shows.
 

Pierogi

Special Properations
Director
Developer
Prestigious
VIP
Legacy
Rejected, would be too difficult to code it in a way that is 100% free of exploits.
 
Status
Not open for further replies.
Top