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

[CSS] Weapon Spawning Menu


Post New Thread Reply   
 
Thread Tools Display Modes
Author
NatalyaAF
Senior Member
Join Date: Dec 2008
Plugin ID:
1185
Plugin Version:
Plugin Category:
General Purpose
Plugin Game:
Counter-Strike: Source
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Allows players to type !weapons in game for a menu to spawn weapons.
    Old 09-26-2009 , 21:36   [CSS] Weapon Spawning Menu
    Reply With Quote #1

    Weapon Spawning Menu

    Description:

    This plugin creates a sm_weapons command which players can use either with a bind, or in most cases by typing !weapons into chat. The plugin comes with three CVARs to provide some basic functionality to server operators.


    CVARs
    sm_weapons_enabled (Default 1) -- When set to 1 the weapons menu will operate. When set to 0 no one can use it.
    sm_weapons_ct (Default 1) -- When set to 1 Counter-Terrorists can use the menu.
    sm_weapons_t (Default 1) -- When set to 1 Terrorists can use the menu.
    sm_weapons_version -- Broadcasted version CVAR.

    This is useful if you want to disable it on certain maps, or perhaps you run a Zombie Mod server and you only want humans (CT's) spawning guns.


    Version Info:

    01.00

    Initial release.


    Installation:
    Put sm_weapons.smx in sourcemod/plugins and restart your server or do sm plugins load sm_weapons to load the plugin.


    Customizing:
    I can think of two reasons for which you would customize this... Either so that you can add more equipment (grenades or defuse kit) or disable some weapons (maybe awps or autos). So here I will show you how.

    Adding Grenades:

    1. Go to the handle where it builds the Equipment menu -- it should say this:
    Handle:BuildEquipMenu()

    2. Find the line for Night Vision:
    AddMenuItem(equip, "item_nvgs", "Night Vision")

    3. Directly below it add the following:
    AddMenuItem(equip, "weapon_hegrenade", "HE Grenade")

    Bam you are done. Compile the plugin, re-upload, and reset the server or reload the plugin.
    Now let's say you wanted to disable Auto-Snipers...

    1. Go to the handle where it builds the Sniper Rifle menu:
    Handle:BuildSniperMenu()

    2. Look for the Auto-Snipers:
    AddMenuItem(snipers, "weapon_sg550", "SG550")
    AddMenuItem(snipers, "weapon_g3sg1", "G3/SG1")

    3. All you gotta do is replace weapon_sg550 and weapon_g3sg1 with 0's and add before the closing ) ITEMDRAW_DISABLED. It should look like this:
    AddMenuItem(snipers, "0", "SG550", ITEMDRAW_DISABLED)
    AddMenuItem(snipers, "0", "G3SG1", ITEMDRAW_DISABLED)

    4. Once again you are done. This will show the auto-snipers grayed out to whoever looks in the sniper menu. You could just delete their lines but I think greying them out looks cool. In any case, re-compile, re-upload, and re-load and voila, no more autos. These operations can obviously be done for any other weapon, following this example.



    Anyway, that's about it. If you have problems post here, but please don't criticize me too harshly; this is my first plugin.
    Attached Files
    File Type: sp Get Plugin or Get Source (sm_weapons.sp - 9317 views - 9.4 KB)

    Last edited by NatalyaAF; 09-27-2009 at 04:39.
    NatalyaAF is offline
    wourok
    New Member
    Join Date: Oct 2009
    Old 10-03-2009 , 11:28   Re: [CSS] Weapon Spawning Menu
    Reply With Quote #2

    Ehm, u forgot to add a config file,
    Nice plugin. Actually exactly what I was looking for! Please write a config soon
    wourok is offline
    APACHE
    Junior Member
    Join Date: Aug 2009
    Location: earth
    Old 10-08-2009 , 15:35   Re: [CSS] Weapon Spawning Menu
    Reply With Quote #3

    Hello,

    Great plug in!!!

    How do you get it to where each time you spawn the menu automaticaly shows up?
    APACHE is offline
    NatalyaAF
    Senior Member
    Join Date: Dec 2008
    Old 10-08-2009 , 21:26   Re: [CSS] Weapon Spawning Menu
    Reply With Quote #4

    Quote:
    Originally Posted by wourok View Post
    Ehm, u forgot to add a config file,
    Nice plugin. Actually exactly what I was looking for! Please write a config soon
    How do I make it load a config file?
    NatalyaAF is offline
    kazzza
    New Member
    Join Date: Oct 2009
    Old 10-23-2009 , 21:48   Re: [CSS] Weapon Spawning Menu
    Reply With Quote #5

    how do i edit and add grenades with no cfg?
    kazzza is offline
    Sailio
    Junior Member
    Join Date: Sep 2009
    Old 10-29-2009 , 21:41   Re: [CSS] Weapon Spawning Menu
    Reply With Quote #6

    lol... i'd rather not have to recompile to allow hegrenades... cfg file would be easier
    Sailio is offline
    Deceiver
    Member
    Join Date: Nov 2009
    Old 11-25-2009 , 07:26   Re: [CSS] Weapon Spawning Menu
    Reply With Quote #7

    is there a way to limit how many weapons a player can spawn per round?
    Deceiver is offline
    Help_ru
    New Member
    Join Date: Feb 2010
    Old 02-27-2010 , 08:36   [CSS] Weapon Spawning Menu v.01.02
    Reply With Quote #8

    Weapon Spawning Menu v.01.02

    INFO
    ----------------
    Added punknt Grenade
    Plagin has updated and edited by [D].[A]> IIu)I(oH

    Информация
    -----------------
    Добавлен пункт Гранат
    Плагин обновил и отредактировал [D].[A]>IIu}I{oH

    Last edited by Help_ru; 02-27-2010 at 09:13.
    Help_ru is offline
    nikooo777
    AlliedModders Donor
    Join Date: Apr 2010
    Location: Lugano, Switzerland
    Old 05-02-2010 , 06:07   Re: [CSS] Weapon Spawning Menu
    Reply With Quote #9

    what if i want that players lose moneys when the spawn a weapon?
    nikooo777 is offline
    griffen16
    New Member
    Join Date: Jul 2010
    Old 07-03-2010 , 12:25   Re: [CSS] Weapon Spawning Menu
    Reply With Quote #10

    can someone post the config file for it?
    griffen16 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:49.


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