Raised This Month: $32 Target: $400
 8% 

[NMRiH] Weapon Menu (v1.1.0, 01/13/14)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Marcus_Brown001
AlliedModders Donor
Join Date: Nov 2012
Location: Illinois, United States
Plugin ID:
3606
Plugin Version:
1.1.0
Plugin Category:
Gameplay
Plugin Game:
No More Room in Hell
Plugin Dependencies:
    Servers with this Plugin:
    51 
    Plugin Description:
    A simple and customizable weapons menu for the mod No More Room In Hell
    Old 04-06-2013 , 01:03   [NMRiH] Weapon Menu (v1.1.0, 01/13/14)
    Reply With Quote #1

    No More Room In Hell: Weapon Menu (v1.1.0, 01/13/14)

    Background: I have been playing No More Room In Hell for awhile, and this is not a new plugin in any regard. All throughout the open beta I was running an older version of this plugin on my servers, and to this day I am still running this plugin. The story behind it is myself, and a few others I was playing with at the time, believed that it was very difficult to obtain weapons inside this game; even though it was designed to be difficult, some people are just naturally attracted to easier things. So this plugin was formed. It is really simple: you have a menu filled with weapons where you can select the one you want. This specific menu is meant to be ran with Chanz's No More Room In Hell: Unlimited Ammo plugin. It is not required to be used with this, however, it is recommended. I do not know when or if I will be able to add ammo into this menu, and if I was going to I would just take Chanz's method, and make it a one time only use (while giving him credit of course ).

    ConVar List:
    Command List:
    Installation: This plugin's installation is straight forward: you place the plugin file (weapon_menu.smx) into your sourcemod/plugins directory on your server. You then place the configuration file (weapon_menu.ini) into your sourcemod/configs directory on your server. Restart the server, or change the map, and you should be set up to go.

    Plugin Information: I am running this exact plugin on my server (with some Donor and Admin benefits added). I have found no active bugs at the moment, and if anyone does find some please notify me via private message or post it on this thread. I will try to address them as soon as possible. I have a complete configuration file; every single entity, be it a weapon, tool, or medical supply, is inside the configuration. If you change the config in any way, and the plugin stops working, please go back and check on what you changed before you tell me the plugin doesn't work ... Nine times out of ten the formatting becomes messed up and it is an easy fix.

    Change Log:

    Attached Files
    File Type: ini weapon_menu.ini (4.8 KB, 6616 views)
    File Type: sp Get Plugin or Get Source (weapon_menu.sp - 10094 views - 17.2 KB)

    Last edited by Marcus_Brown001; 03-29-2014 at 01:25.
    Marcus_Brown001 is offline
    gringos
    Junior Member
    Join Date: Oct 2010
    Old 04-06-2013 , 07:27   Re: [NMRiH] Weapon Menu (v1.0.1, 4/05/2013)
    Reply With Quote #2

    Thanks!

    These are the entities that can be spawn:

    Weapon Classnames (Grouped by Category)

    handgun:
    fa_sw686
    fa_1911
    fa_m92fs

    rifle:
    fa_1022
    fa_sako85
    fa_sks

    shotgun:
    fa_870
    fa_superx3
    fa_sv10

    military:
    fa_mp5a3
    fa_m16a4

    melee
    me_axe_fire
    me_bat_metal
    me_chainsaw
    me_crowbar
    me_machete
    me_pipe_lead
    me_shovel
    me_sledge
    me_wrench

    explosive:
    weapon_grenade

    items:
    item_maglite
    item_extinguisher
    tool_barricade
    item_walkietalkie

    ammo:
    ammobox_9mm
    ammobox_45acp
    ammobox_357
    ammobox_12gauge
    ammobox_22lr
    ammobox_308
    ammobox_556
    ammobox_762mm
    ammobox_board
    ammobox_fuel

    Additional items:
    item_bandages
    item_pills
    item_first_aid

    Last edited by gringos; 04-06-2013 at 09:57. Reason: incomplete
    gringos is offline
    Marcus_Brown001
    AlliedModders Donor
    Join Date: Nov 2012
    Location: Illinois, United States
    Old 04-06-2013 , 10:11   Re: [NMRiH] Weapon Menu (v1.0.1, 4/05/2013)
    Reply With Quote #3

    I can add an ammo category if you want me to I guess. I never added them on my server because we ran unlimited ammo. Up to you!
    Marcus_Brown001 is offline
    gringos
    Junior Member
    Join Date: Oct 2010
    Old 04-06-2013 , 12:44   Re: [NMRiH] Weapon Menu (v1.0.1, 4/05/2013)
    Reply With Quote #4

    I have been struggling with the code, to be honest i have already made a menu and use the sm_give command to give the items, for me it would be perfect to implement the acceptentityinput "use" somehow in that script. But i don't understand how, i'm to new to this and the documentation is to complex for me. Your plugin is really nice, but i was hoping to get the same keyvalue system as used in adminmenu_custom, that way i can use my current menu, so it is possible to define menu categories in the ini/cfg/txt file. We use infinite ammo as well.

    Respect for the way you made this plugin!

    It works good, only sidenote is that if you use the Main menu and then go to the Primary/Secondary or tools menu, the chatmessage will come twice, so first:


    [Notice] Press [Esc] to view the weapon menu!
    [Notice] Press [Esc] to view the secondary weapons menu!

    etc, but that can be easily fixed.

    Last edited by gringos; 04-06-2013 at 13:09.
    gringos is offline
    MaloModo
    Veteran Member
    Join Date: Aug 2008
    Old 04-06-2013 , 17:07   Re: [NMRiH] Weapon Menu (v1.0.1, 4/05/2013)
    Reply With Quote #5

    I just fired it on the server, added the MP5 to primary. Works GReat! Cheers mate.
    MaloModo is offline
    Marcus_Brown001
    AlliedModders Donor
    Join Date: Nov 2012
    Location: Illinois, United States
    Old 04-06-2013 , 18:54   Re: [NMRiH] Weapon Menu (v1.0.1, 4/05/2013)
    Reply With Quote #6

    In all honesty this can be used for any game. I just made it with the intent to be used inside No More Room In Hell; using keyvalues allows you to use it with just about anything.

    Glad you guys are liking this, and hope you have fun!
    Marcus_Brown001 is offline
    babaj
    Member
    Join Date: Sep 2011
    Old 11-04-2013 , 16:12   Re: [NMRiH] Weapon Menu (v1.0.1, 4/05/2013)
    Reply With Quote #7

    Error:
    Quote:
    L 11/04/2013 - 22:421: [SM] Displaying call stack trace for plugin "weapon_menu.smx":
    L 11/04/2013 - 22:421: [SM] [0] Line 213, /home/groups/alliedmodders/forums/files/2/1/6/0/4/4/118107.attach::Menu_Primary()
    not work bow and granade

    "weapon_name" "bow_deerhunter" ; "weapon_name" "grenade" or "weapon_grenade"

    Quote:
    L 11/05/2013 - 07:59:44: Info (map "nms_silence") (file "errors_20131105.log")
    L 11/05/2013 - 07:59:44: [SM] Plugin encountered error 15: Array index is out of bounds
    L 11/05/2013 - 07:59:44: [SM] Displaying call stack trace for plugin "weapon_menu.smx":
    L 11/05/2013 - 07:59:44: [SM] [0] Line 107, /home/groups/alliedmodders/forums/files/2/1/6/0/4/4/118107.attach::Load_Weapons()
    L 11/05/2013 - 07:59:44: [SM] [1] Line 42, /home/groups/alliedmodders/forums/files/2/1/6/0/4/4/118107.attach::OnPluginStart()

    Last edited by babaj; 11-05-2013 at 02:11.
    babaj is offline
    NakashimaMakota
    Junior Member
    Join Date: Nov 2013
    Old 11-07-2013 , 01:07   Re: [NMRiH] Weapon Menu (v1.0.1, 4/05/2013)
    Reply With Quote #8

    Ok, so I managed to get the ammo boxes into the menu however they throw this error:

    Quote:
    L 11/07/2013 - 036:44: [SM] Native "AcceptEntityInput" reported: Entity -1 (-1) is not a CBaseEntity
    L 11/07/2013 - 036:44: [SM] Displaying call stack trace for plugin "weapon_menu.smx":
    L 11/07/2013 - 036:44: [SM] [0] Line 372, weapon_menu.sp::Menu_Ammo()
    This is the specific line:

    Code:
    public Menu_Ammo(Handle:ammo, MenuAction:action, param1, param2)
    {
    	if (action == MenuAction_End)
    	{
            CloseHandle(ammo);
    	}
    	if (action == MenuAction_Select)
    	{
    		new String:info[32];
    		GetMenuItem(ammo, param2, info, sizeof(info));
    		
    		for (new i = 0; i < g_iWeps; i++)
    		{
    			if (StrEqual(info, g_sWepNumbers[i]))
    			{
    				new weapon = GivePlayerItem(param1, g_sWepNames[i], 0);
    				
    				bPrimary[param1] = true;
    				AcceptEntityInput(weapon, "use", param1, param1);
    				
    				PrintToChat2(param1, "%s You have selected the \x04%s\x01.", MESS, g_sWepDNames[i]);
    			}
    		}
    	}
    }
    Also, giving players tools doesn't work, and didn't in the non-edited version, it always says they are only allowed 3 tools.

    Last edited by NakashimaMakota; 11-07-2013 at 04:40.
    NakashimaMakota is offline
    Marcus_Brown001
    AlliedModders Donor
    Join Date: Nov 2012
    Location: Illinois, United States
    Old 11-07-2013 , 07:42   Re: [NMRiH] Weapon Menu (v1.0.1, 4/05/2013)
    Reply With Quote #9

    I almost forgot I released this Since the big Steam update of the game I have been doing major maintenance to the mods I have running on my servers, so I find it only fair to push an update for this. I will open it up when I get home today take a look at it.

    If there is anything people want added now would be the time to ask!
    Marcus_Brown001 is offline
    babaj
    Member
    Join Date: Sep 2011
    Old 11-07-2013 , 08:30   Re: [NMRiH] Weapon Menu (v1.0.1, 4/05/2013)
    Reply With Quote #10

    Quote:
    Originally Posted by Marcus_Brown001 View Post
    I almost forgot I released this Since the big Steam update of the game I have been doing major maintenance to the mods I have running on my servers, so I find it only fair to push an update for this. I will open it up when I get home today take a look at it.

    If there is anything people want added now would be the time to ask!

    and you can write a plugin noblock?


    I'm sorry for my insolence: P
    babaj 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 20:41.


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