Raised This Month: $12 Target: $400
 3% 

[Zeph Store] Guns Menu


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Pilo
AlliedModders Donor
Join Date: Jan 2019
Location: Israel
Plugin ID:
6595
Plugin Version:
1.0
Plugin Category:
Gameplay
Plugin Game:
Counter-Strike: GO
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Old 06-07-2019 , 06:30   [Zeph Store] Guns Menu
    Reply With Quote #1

    [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
    Cvars :
    Code:
    sm_gunsmenu_vip_only // Make the command only for VIP's (Zeph Store)
    Feel free to ask for more plugins or upgrades to this plugin
    Enjoy.
    Attached Files
    File Type: sp Get Plugin or Get Source (Guns_Menu.sp - 466 views - 6.3 KB)
    File Type: smx Guns_Menu.smx (6.8 KB, 432 views)
    __________________

    Taking Private(PAID) Plugins In PM
    Feel free to Donate with PayPal
    Feel free to message me in Discord Pilo#8253
    Total donated : 25$

    Last edited by Pilo; 06-07-2019 at 06:38.
    Pilo is offline
    xoxo_
    Junior Member
    Join Date: Sep 2018
    Location: Israel
    Old 06-08-2019 , 04:34   Re: [Zeph Store] Guns Menu
    Reply With Quote #2

    nice!
    __________________


    Feel free to Donate with paypal
    My plugins
    xoxo_ is offline
    skyler.b
    AlliedModders Donor
    Join Date: Dec 2017
    Location: israel
    Old 06-11-2019 , 07:53   Re: [Zeph Store] Guns Menu
    Reply With Quote #3

    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
    __________________
    Taking private requests

    part of the gurney is the end.

    Last edited by skyler.b; 06-11-2019 at 07:54.
    skyler.b is offline
    paulo_crash
    AlliedModders Donor
    Join Date: May 2016
    Location: Brazil
    Old 07-02-2019 , 20:15   Re: [Zeph Store] Guns Menu
    Reply With Quote #4

    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.

    Last edited by paulo_crash; 07-02-2019 at 20:15.
    paulo_crash is offline
    Psyk0tik
    Veteran Member
    Join Date: May 2012
    Location: Homeless
    Old 07-03-2019 , 05:08   Re: [Zeph Store] Guns Menu
    Reply With Quote #5

    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.
    Attached Files
    File Type: sp Get Plugin or Get Source (Guns_Menu.sp - 171 views - 3.6 KB)
    __________________

    Last edited by Psyk0tik; 07-03-2019 at 05:10.
    Psyk0tik is offline
    Psyk0tik
    Veteran Member
    Join Date: May 2012
    Location: Homeless
    Old 07-03-2019 , 05:11   Re: [Zeph Store] Guns Menu
    Reply With Quote #6

    Quote:
    Originally Posted by skyler.b View Post
    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
    The #define's in his code make sense but I do agree that he doesn't necessarily need them for such a small plugin.
    __________________
    Psyk0tik is offline
    Pilo
    AlliedModders Donor
    Join Date: Jan 2019
    Location: Israel
    Old 07-04-2019 , 09:42   Re: [Zeph Store] Guns Menu
    Reply With Quote #7

    Quote:
    Originally Posted by Crasher_3637 View Post
    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 is offline
    ocampas
    Junior Member
    Join Date: Oct 2010
    Old 07-27-2020 , 11:03   Re: [Zeph Store] Guns Menu
    Reply With Quote #8

    I am attempting to recompile your plugin but I am missing the <store> library, where can I find this.

    Thanks.
    ocampas is offline
    rehashmusic
    AlliedModders Donor
    Join Date: Jul 2019
    Old 07-27-2020 , 11:29   Re: [Zeph Store] Guns Menu
    Reply With Quote #9

    what does this do?
    Can i put decoy/molotov/hegrenade in store to buy only?
    rehashmusic is offline
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 13:10.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode