[Zeph Store] Guns Menu
2 Attachment(s)
[Store] Guns Menu Since I didn't saw any good guns menus so I decided to do my own. Requirements : Zephyrus Store Commands : Code:
sm_guns Code:
sm_gunsmenu_vip_only // Make the command only for VIP's (Zeph Store) Enjoy. |
Re: [Zeph Store] Guns Menu
nice!
|
Re: [Zeph Store] Guns Menu
so let's talk about the issues are in this mod
1) you added to the menu manually all the names while they are in the char array why not do it in a for loop and add them less lines less cancer 2)you have memory leak when people are accessing the menu. 3) too many defines for a 200 lines code, there are like 9 defines in this mode and that only 200 lines, declaring a '#DEFINE' doesn't make you a person knows to code it is for making your life easy on repeated and unchanged values |
Re: [Zeph Store] Guns Menu
Need to upgrade to include new CSGO weapons.
It would be interesting also if put option of credits to use the command or even to pick up the weapons, that is, to pay with credits to choose any one of the weapons. |
Re: [Zeph Store] Guns Menu
2 Attachment(s)
Here's a revised version.
Changes - Cut down on all the hard-coded names and console commands. (Used the given char arrays with for-loops.) - Less lines because why not? - Removed some redundancies. - Fixed name inconsistencies. Note: I don't play CS:GO but I think users still deserve a fully functional and optimized plugin. No offense to the original author but parts of the code looked half-assed/copy-pasted. :/ Notes for the author: - When defining local variables inside a menu handler, try to limit them inside the MenuAction that you're using them in. Don't use menu.GetItem outside of MenuAction_Select, etc. - When storing strings in a char array, use them in your code instead of hard-coding the same strings over and over. - You can use ConVar.BoolValue instead of GetConVarInt(ConVar) == 1 if you're just checking for 0/1 values. - Do your best to cut down on redundant code, like hard-coding the same menu items in nested if/if-else statements. |
Re: [Zeph Store] Guns Menu
Quote:
|
Re: [Zeph Store] Guns Menu
Quote:
|
Re: [Zeph Store] Guns Menu
I am attempting to recompile your plugin but I am missing the <store> library, where can I find this.
Thanks. |
Re: [Zeph Store] Guns Menu
what does this do?
Can i put decoy/molotov/hegrenade in store to buy only? |
All times are GMT -4. The time now is 18:45. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.