Files

> > CS2D > Lua Scripts > Circular Buy Menu Script
Files overviewCS2D overviewLua Scripts overview

English Circular Buy Menu Script >

14 comments29 kb, 763 Downloads

old Circular Buy Menu Script

Masea
Super User Off Offline

This is the circular (or radial) buy menu that we are familiar from CS:GO. It can be entirely and specifically customized for both teams and has as many features possible as default buy menu does (along with some caveats).

> Features
• The ability to interact with number keys
• Checks statements such as whether the player is in the buy zone, has enough money or whether already carries the specific item; or if the buy time has passed or buying is not allowed on the map (cs2d entity info_nobuying)
• Drops the old item if the player replaces it with a new one
• Each team may have different buy menus, along with different prices of certain items
• Entirely customizable menu, it is even possible to create submenus under a submenu
• Optional light mode. Once activated, the side panel, item image and descriptions are no longer displayed, in aim to decrease lag

> Caveats
• Bots cannot buy items. This can actually be avoided if you get rid of the line
parse("mp_buymenu -")
from the script. Though it would cause weird glitches when trying to open the menu and bots will buy the items with default prices instead of the prices specified in the script.
• The items other than weapons that have more than 1 ammo capacity do not work properly. For example, you get 2 flashbangs instead of 1 when bought. And if you already have, let's say, 1 flashbang, the script will not allow you to buy more flashbangs at all as it sees it you already carry the item. In this case, to buy flashbangs, you have to not carry a flashbang. The same goes for Satchel Charge, Snowball, etc.
• cs2d lua hook drop is not triggered when the player replaces an old weapon with a new one. (See feature #3).

off-topic Installation & Launching
• Extract the files into your CS2D folder
• Dofile / run "sys/lua/circular-buy-menu.lua"

For Developers >

Special thanks to user Mora for his sprite used in this script and to user EngiN33R for his help at geometry.

My own customized buy menu: Video

This is, after all, a fun concept, thus I do not recommend this to the players who play in the competitive scene since it still lacks some of the features and may lag as it is server-sided.

Updates >

Thanks!
edited 31×, last 12.05.20 05:29:40 pm
Approved by Sparty

Download Download

29 kb, 763 Downloads

Comments

14 comments
To the start Previous 1 Next To the start

Log in!

You need to log in to be able to write comments!Log in

old

acm
User Off Offline

Love at first sight! I have never been juicy this faster. It's an immense, great, masterpiece.
I like it!
edited 1×, last 11.06.20 08:00:08 am

old i like

cs2d_is_a_Gem
User Off Offline

if they encoded something like that for the client, I could use more transition animations, it would look prettier and there would be no lag.
I like it!

old Good Menu

betamax542
User Off Offline

This menu is similary to the buy menu of csgo good job.

old

Masea
Super User Off Offline

@user Mora: I am planning to add the auto-buy feature, yes. But not quite sure when. I first need to learn what exactly it buys for you and under what circumstances. But I am not wholly sure if it should include Flare and Smoke Grenade since they are some sort of optional items in my opinion. I also highly disagree that the auto-buy feature should check FoW to decide to buy things accordingly.

As I said, I should initially grasp the fact that how it appears to be in original CS and then disclude the things I possibly dislike and include the things that would be reasonable enough. Perhaps I'd just keep it the same way it is in the original game which makes more sense after all.
edited 1×, last 07.11.21 10:15:56 am

old

Mora
User Off Offline

Feature to do autobuy for those who's not experienced to do it by themselves.
The idea is to add two buy-modes, if there is a fow currently on the map: it would buy flare and smoke grenade too, if there's no fow, the items above wont be bought(kinda dynamic thing). Or dont buy'em but just he/flashesh. The priority might be better than currently is it during to the price and your money. Instead of buying ak you can buy mp5(auto), otherwise only grenades/ammo.
I like it!
edited 1×, last 06.02.20 06:02:16 pm

old

Elfing
User Off Offline

This is really nice. Surprised it wasn't done before.
I like it!
edited 1×, last 04.02.20 11:08:32 pm

old

_oops
User Off Offline

nise job
I like it!

old

haha1955
User Off Offline

its a good idea, i like it and its usefull^^
I like it!
edited 1×, last 04.02.20 06:16:50 pm

old

Masea
Super User Off Offline

@user The Dark Shadow: Please edit your comment and include the things that you think are missing. Thanks.

old

The Dark Shadow
User Off Offline

Many things are missing.
I like it!

old

Mora
User Off Offline

Imagine yourself you having two flashbangs, it would strip your two flashes and buy new two.
I like it!

old

mrc
User Off Offline

What if when you buy a flashbang it strips all flashbangs you have before equipping the purchased ones? Default value for it can be $400 as default since it will equip 2 everytime, even if u already have one.

old

_Lima_
User Off Offline

Omg. This is Awesome really.
I like it!
To the start Previous 1 Next To the start