Thread
:
[Zeph Store] Guns Menu
View Single Post
Pilo
AlliedModders Donor
Join Date: Jan 2019
Location: Israel
07-04-2019 , 09:42 Re: [Zeph Store] Guns Menu
#
7
Quote:
Originally Posted by
Crasher_3637
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.
Thanks!
__________________
Taking Private(PAID) Plugins In PM
Feel free to Donate with
PayPal
Feel free to message me in
Discord
Pilo#8253
Total donated :
25$
Pilo
View Public Profile
Send a private message to Pilo
Visit Pilo's homepage!
Find More Posts by Pilo