Raised This Month: $7 Target: $400
 1% 

[CS:GO] Gun Menu (Retake, DM...)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
potatoz
AlliedModders Donor
Join Date: Nov 2016
Plugin ID:
5543
Plugin Version:
1.0
Plugin Category:
General Purpose
Plugin Game:
Counter-Strike: GO
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Give all players a menu to choose from a variety of weapons
    Old 02-22-2017 , 15:58   [CS:GO] Gun Menu (Retake, DM...)
    Reply With Quote #1

    GUN MENU
    as made by potatoz



    DESCRIPTION
    this is the public version of the private Gun Menu-plugin i've made for a retake. This plugin basically would give all clients a menu to choose from the most fitting selection of weapons for mainly retake and gamemodes such as deathmatch (This is easily modified in the source code), the plugin also includes a function disabling buyzones aswell as one that gives each player a 20% chance to get either a he-nade or smoke, same goes with an independant 50% chance to get a flashbang on spawn.

    COMMANDS
    !guns - Open Gun Menu

    NOTE
    Keep in mind i do take requests at changing the plugin by removing/adding features however i'm not the quickest at answering so expect to wait
    Attached Files
    File Type: sp Get Plugin or Get Source (gunmenu.sp - 5798 views - 7.0 KB)

    Last edited by potatoz; 08-17-2018 at 07:15.
    potatoz is offline
    Grey83
    Veteran Member
    Join Date: Dec 2014
    Location: Ukraine
    Old 02-26-2017 , 09:41  
    Reply With Quote #2

    OMG
    You can write ony with old or only with new syntax?
    int PrimaryChoice[MAXPLAYERS+1]; but new client_id = GetEventInt(event, "userid");
    You uses tabs and spaces together.
    PHP Code:
        new RandomNumbersArray[21] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20};
        new 
    randomnum GetRandomInt(020);
        
        if(
    RandomNumbersArray[randomnum] == 1) { 
    WTF?
    Maybe better just if(randomnum == 1) ?

    This code full of shit.

    Better try the attached version:
    Attached Files
    File Type: sp Get Plugin or Get Source (gunmenu 1.0.1.sp - 1928 views - 5.9 KB)
    __________________

    Last edited by Grey83; 02-26-2017 at 11:36. Reason: Added fixed plugin
    Grey83 is offline
    potatoz
    AlliedModders Donor
    Join Date: Nov 2016
    Old 02-26-2017 , 12:26   Re: [CS:GO/ANY?] Gun Menu v1 (Retake, DM etc.)
    Reply With Quote #3

    Quote:
    Originally Posted by Grey83 View Post
    This code full of shit.
    I appreciate the feedback but you could respect the fact that i'm new to sourcemod coding, the way you modified the code is basically just you implementing your own gun-menu in to my code. The thing however is that you have it so if you are a T you can't have for example USP-S or m4 when the point sort of is that there are people who want a gun menu where you can pick whichever weapon you like, no matter which team you're in
    __________________
    potatoz is offline
    Grey83
    Veteran Member
    Join Date: Dec 2014
    Location: Ukraine
    Old 02-26-2017 , 13:52   [CS:GO] Gun Menu v1.0.2 (Retake, DM etc.)
    Reply With Quote #4

    potatoz, it is possible to make accessible any weapon. Then a code yet more will be simplified.
    Attached Files
    File Type: sp Get Plugin or Get Source (gunmenu 1.0.2.sp - 1495 views - 5.6 KB)
    __________________

    Last edited by Grey83; 02-26-2017 at 14:39. Reason: Added fixed plugin
    Grey83 is offline
    OSWO
    Senior Member
    Join Date: Jul 2015
    Location: United Kingdom, London
    Old 02-26-2017 , 14:26   Re: [CS:GO/ANY?] Gun Menu v1 (Retake, DM etc.)
    Reply With Quote #5

    https://github.com/HardcorePark/CTGu...ting/CTGuns.sp

    You can copy some of the stuff I've used. You both use too many Switch Statements.

    Alternatively you can do something like this:

    PHP Code:
    char gC_Weapons[][][] = {
        {
    "weapon_knife""Knife""2""0"},
        {
    "weapon_ak47""AK-47""0""7"},
        {
    "weapon_aug""AUG""0""8"},
        {
    "weapon_awp""AWP""0""9"},
        {
    "weapon_bizon""PP-Bizon""0""26"},
        {
    "weapon_cz75a""CZ-75 Auto""1""63"},
        {
    "weapon_deagle""Desert Eagle""1""1"},
        {
    "weapon_elite""Dual Berettas""1""2"},
        {
    "weapon_famas""FAMAS""0""10"},
        {
    "weapon_fiveseven""Five-SeveN""1""3"},
        {
    "weapon_g3sg1""G3SG1""0""11"},
        {
    "weapon_galilar""Galil AR""0""13"},
        {
    "weapon_glock""Glock-18""1""4"},
        {
    "weapon_hkp2000""P2000""1""32"},
        {
    "weapon_m249""M249""0""14"},
        {
    "weapon_m4a1""M4A4""0""16"},
        {
    "weapon_m4a1_silencer""M4A1-S""0""60"},
        {
    "weapon_mac10""MAC-10""0""17"},
        {
    "weapon_mag7""MAG-7""0""27"},
        {
    "weapon_mp7""MP7""0""33"},
        {
    "weapon_mp9""MP9""0""34"},
        {
    "weapon_negev""Negev""0""28"},
        {
    "weapon_nova""Nova""0""35"},
        {
    "weapon_p250""P250""1""36"},
        {
    "weapon_p90""P90""0""19"},
        {
    "weapon_sawedoff""Sawed-Off""0""29"},
        {
    "weapon_scar20""SCAR-20""0""38"},
        {
    "weapon_sg556""SG 553""0""39"},
        {
    "weapon_ssg08""SSG 08""0""40"},
        {
    "weapon_tec9""Tec-9""1""30"},
        {
    "weapon_ump45""UMP-45""0""24"},
        {
    "weapon_usp_silencer""USP-S""1""61"},
        {
    "weapon_xm1014""XM1014""0""25"},
        {
    "weapon_revolver""R8 Revolver""1""64"},

    [0] = ClassName
    [1] = Human Readable Name
    [2] = Slot
    [3] = Team Restriction

    Manipulating menus with the data etc.
    __________________
    SourceTimer | WeaponSkins++ | BasePlugins++ https://github.com/OSCAR-WOS

    Last edited by OSWO; 02-26-2017 at 14:30.
    OSWO is offline
    Grey83
    Veteran Member
    Join Date: Dec 2014
    Location: Ukraine
    Old 02-26-2017 , 14:53   [CS:GO] Gun Menu v1.0.3 (Retake, DM etc.)
    Reply With Quote #6

    Changes: added menu item "Random" for primary and secondary weapons
    Attached Files
    File Type: sp Get Plugin or Get Source (gunmenu 1.0.3.sp - 1873 views - 5.8 KB)
    __________________

    Last edited by Grey83; 02-26-2017 at 14:57.
    Grey83 is offline
    potatoz
    AlliedModders Donor
    Join Date: Nov 2016
    Old 02-26-2017 , 15:25   Re: [CS:GO/ANY?] Gun Menu v1 (Retake, DM etc.)
    Reply With Quote #7

    Update: The plugin now uses a different code (With help from Grey83), CT's may not have AK-47 and will instead get M4A4 or M4A1-S depending on client choice, the same applies the other way around. The odds for gaining nades has aswell been changed, there is now a 20% chance at receiving either HE Grenade or Smoke and an independant chance of 50% at getting a flashbang.
    __________________
    potatoz is offline
    potatoz
    AlliedModders Donor
    Join Date: Nov 2016
    Old 02-26-2017 , 15:32   Re: [CS:GO] Gun Menu v1.0.3 (Retake, DM etc.)
    Reply With Quote #8

    Quote:
    Originally Posted by Grey83 View Post
    Changes: added menu item "Random" for primary and secondary weapons
    I appreciate the help, however your version has become so different from the main idea, not that it's bad. You should consider the code you linked in this post as an update on your current gun menu-plugin and remove the default choice on "ClientPutInServer" so the choices are saved across map-changes. I personally think it would be appreciated
    __________________

    Last edited by potatoz; 02-26-2017 at 15:32.
    potatoz is offline
    Grey83
    Veteran Member
    Join Date: Dec 2014
    Location: Ukraine
    Old 02-27-2017 , 08:53   Re: [CS:GO/ANY?] Gun Menu v1 (Retake, DM etc.)
    Reply With Quote #9

    potatoz, my versions (1.0.2 and 1.0.3) made like your version 1.0 where you can choose the weapons of the opposing team.
    Only version 1.0.1 like your updated version
    __________________
    Grey83 is offline
    leeter
    Member
    Join Date: Jun 2015
    Old 03-09-2017 , 07:29   Re: [CS:GO/ANY?] Gun Menu v1 (Retake, DM etc.)
    Reply With Quote #10

    maybe make it so the gun menu opend to, if you type guns without exclamation point.

    Last edited by leeter; 03-09-2017 at 07:29.
    leeter 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 00:37.


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