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

[CSS] Adding new guns plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author
cjsrk
Junior Member
Join Date: Mar 2023
Location: China
Plugin ID:
8528
Plugin Version:
1.1.0
Plugin Category:
Fun Stuff
Plugin Game:
Counter-Strike: Source
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    This plugin can add new weapons to the game.
    Old 08-09-2023 , 08:39   [CSS] Adding new guns plugin
    Reply With Quote #1

    This plugin can add new weapons to the game!
    At present, this version of the plugin has support for legitimate CSS or v90-v92 cracked versions.

    Version 1.1.0 Update:
    The cstrike \ cfg \ sourcemod \ plugin.new_weapons.cfg file added an option to set the player's walking speed after acquiring a new weapon (some people reported this issue). Range: 1.0 (the default speed of the game) - 1.5. The default setting is 1.1, which increases player movement speed by 10% after using new weapons.

    Features:
    1. The plugin supports the addition of up to 255 main weapons and 255 pistols. And the plugin also supports adding new grenades or knifes.

    2. The plugin contains two configuration files. A File can be set to enable/disable, set the uniform buy time limit. The other file stores new guns data, can set the new weapon's sound, ammo, damage value, accuracy and purchase price.

    3. The plugin supports graphical menu to buy new weapons (i.e., B-key menu).

    4. The plugin can cooperate with my bot using new guns plugin, so that the bots can also use new guns.

    5. In addition, I provide a special plugin smx to accommodate the ZombieReloaded plugin.

    The specific use method can be seen in the compression package of several instructions.

    Effect display:
    https://m.youtube.com/watch?v=AxfYzN-ZrKY

    https://m.youtube.com/watch?v=7K_D8PbHgMM
    Attached Thumbnails
    Click image for larger version

Name:	SCREENSHOTS_02(1).jpg
Views:	675
Size:	88.8 KB
ID:	201321   Click image for larger version

Name:	SCREENSHOTS_03(1).jpg
Views:	494
Size:	88.4 KB
ID:	201322   Click image for larger version

Name:	affb83432cb8374.jpg
Views:	395
Size:	97.2 KB
ID:	201323   Click image for larger version

Name:	-1653f13e256f5d17.jpg
Views:	416
Size:	96.6 KB
ID:	201324  
    Attached Files
    File Type: sp Get Plugin or Get Source (Weapons For Bot.sp - 441 views - 19.4 KB)
    File Type: zip Adding new guns plugin for CSS.zip (19.02 MB, 506 views)
    File Type: sp Get Plugin or Get Source (New_Weapons_NoBot.sp - 154 views - 31.0 KB)

    Last edited by cjsrk; 09-16-2023 at 11:33.
    cjsrk is offline
    Grey83
    Veteran Member
    Join Date: Dec 2014
    Location: Ukraine
    Old 08-10-2023 , 08:22   Re: [CSS] Adding new guns plugin
    Reply With Quote #2

    Rewrote the previous version of this plugin a few days ago: link.
    cjsrk, you can use this code to improve your plugin.

    Changes:
    • Added weapon menu (command sm_new_weapons) with prices. Only alive players can use this menu, until the time set by the sm_allow_buytime cvar expires.Like the sm_%weaponname% command.
    • Transferred the storage of weapon settings from static arrays to StringMap (RAM savings).
    • About incorrectly filled lines in the configs/NewWeaponsInfo.txt settings file, the plugin will write to the error log indicating the line number (the number starts from 1).
    • Added checks for duplicates (if the weapon has the same name, this will be recorded in the error log).
    • It will also check if the command exists on the server, before trying to add it (if it already exists, it will write about it in the error log). And it will remove the capture of non-existent plugin commands (when changing the map, it will clean and add new ones).
    • Added models and sounds will not only be cached, but also added to the download (it would also be necessary to figure out how to organize the addition of textures and other model files to the download, with an extension other than mdl).
    • Added player index checks in timers just in case.
    __________________

    Last edited by Grey83; 08-19-2023 at 10:59.
    Grey83 is offline
    Grey83
    Veteran Member
    Join Date: Dec 2014
    Location: Ukraine
    Old 08-10-2023 , 08:25   Re: [CSS] Adding new guns plugin
    Reply With Quote #3

    P.S. Now the plugin has no limit on 255 weapons. =)
    __________________
    Grey83 is offline
    cjsrk
    Junior Member
    Join Date: Mar 2023
    Location: China
    Old 08-11-2023 , 05:18   Re: [CSS] Adding new guns plugin
    Reply With Quote #4

    Thank you for your improvement.
    cjsrk is offline
    Grey83
    Veteran Member
    Join Date: Dec 2014
    Location: Ukraine
    Old 08-18-2023 , 12:13   Re: [CSS] Adding new guns plugin
    Reply With Quote #5

    On line 122, need to fix the check:
    || TrimString(data[0]) || TrimString(data[1]))
    ==>
    || !TrimString(data[0]) || !TrimString(data[1]))
    Due to this error, the config will not be read

    This and other fixes:
    Attached Files
    File Type: sp Get Plugin or Get Source (sm_new_weapons 2.0.1_18.08.2023.sp - 318 views - 13.4 KB)
    __________________

    Last edited by Grey83; 08-18-2023 at 12:29.
    Grey83 is offline
    Nexerade
    Junior Member
    Join Date: May 2015
    Location: Russia unfortunately
    Old 04-01-2024 , 09:50   Re: [CSS] Adding new guns plugin
    Reply With Quote #6

    Fixed broken money/price code.
    Old code:
    Code:
    int price, money = GetEntProp(client, Prop_Send, "m_iAccount");
    if(hPrice.GetValue(weapon, money) && (money -= price) >= 0)
    {
    	PrintToChat(client, "Not enough money to buy.");
    	if(menu) hMenu.Display(client, MENU_TIME_FOREVER);
    	return;
    }
    New code:
    Code:
    int money = GetEntProp(client, Prop_Send, "m_iAccount");
    int price = 0;
    if(hPrice.GetValue(weapon, price) && ((money -= price) < 0))
    {
    	PrintToChat(client, "Not enough money to buy.");
    	if(menu) hMenu.Display(client, MENU_TIME_FOREVER);
    	return;
    }
    I made a weapon following tutorial, including decompiling/recompiling weapon to include new sounds.
    However, script doesn't seem to work correctly and there are bunch of issues present:

    1) When reloading/shooting, for 1 frame there is default weapon visible flickering.
    2) There are no new sounds for firing.
    3) There are no sounds for reloading/other sounds.
    4) Silenced weapon have default world model weapon.
    Nexerade is offline
    cjsrk
    Junior Member
    Join Date: Mar 2023
    Location: China
    Old 04-09-2024 , 13:29   Re: [CSS] Adding new guns plugin
    Reply With Quote #7

    Quote:
    Originally Posted by Nexerade View Post
    Fixed broken money/price code.
    Old code:
    Code:
    int price, money = GetEntProp(client, Prop_Send, "m_iAccount");
    if(hPrice.GetValue(weapon, money) && (money -= price) >= 0)
    {
    	PrintToChat(client, "Not enough money to buy.");
    	if(menu) hMenu.Display(client, MENU_TIME_FOREVER);
    	return;
    }
    New code:
    Code:
    int money = GetEntProp(client, Prop_Send, "m_iAccount");
    int price = 0;
    if(hPrice.GetValue(weapon, price) && ((money -= price) < 0))
    {
    	PrintToChat(client, "Not enough money to buy.");
    	if(menu) hMenu.Display(client, MENU_TIME_FOREVER);
    	return;
    }
    I made a weapon following tutorial, including decompiling/recompiling weapon to include new sounds.
    However, script doesn't seem to work correctly and there are bunch of issues present:

    1) When reloading/shooting, for 1 frame there is default weapon visible flickering.
    2) There are no new sounds for firing.
    3) There are no sounds for reloading/other sounds.
    4) Silenced weapon have default world model weapon.
    1. I have been using this improved version of the plug-in for a long time, and I have never seen the flickering phenomenon at all. I really don’t know what is going on in your case.

    2. Questions about sound. Please check that you have declared the new weapon's sound text file in the first game_sounds_manifest.txt.
    For example:
    "preload_file" "scripts/weapons/an94.txt"
    cjsrk is offline
    CassieK
    New Member
    Join Date: Apr 2024
    Old 04-17-2024 , 01:28   Re: [CSS] Adding new guns plugin
    Reply With Quote #8

    Im Having A Few Issues,I Downloaded The Required Plugins And Yours Of Course,I Tried The Included MPX And It Works,I See It In The Buy Menu In The Console And In Game, But When The Gun Spawns I Keep Getting Some Sort Of Server Lag Until I Die,And This Shows Up In The Console.

    FCVAR_CLIENTCMD_CAN_EXECUTE prevented running command: sm_mpx
    Unknown command: sm_mpx
    Shutdown 6 predictable entities and 0 client-created entities

    Once I Die The Wierd Lag Goes Away. By Wierd Server Lag I Mean Like That Odd Movement Like If Your Connected To A Server Really Far Away, Clicks And Button Presses Being Delayed,That Sorta Stuff

    Last edited by CassieK; 04-17-2024 at 01:31.
    CassieK is offline
    cjsrk
    Junior Member
    Join Date: Mar 2023
    Location: China
    Old 04-18-2024 , 13:25   Re: [CSS] Adding new guns plugin
    Reply With Quote #9

    Quote:
    Originally Posted by CassieK View Post
    Im Having A Few Issues,I Downloaded The Required Plugins And Yours Of Course,I Tried The Included MPX And It Works,I See It In The Buy Menu In The Console And In Game, But When The Gun Spawns I Keep Getting Some Sort Of Server Lag Until I Die,And This Shows Up In The Console.

    FCVAR_CLIENTCMD_CAN_EXECUTE prevented running command: sm_mpx
    Unknown command: sm_mpx
    Shutdown 6 predictable entities and 0 client-created entities

    Once I Die The Wierd Lag Goes Away. By Wierd Server Lag I Mean Like That Odd Movement Like If Your Connected To A Server Really Far Away, Clicks And Button Presses Being Delayed,That Sorta Stuff
    Closing client predictions does have an impact on client latency, especially when online. But if I don't, the new weapons will be constantly flashing and difficult to use.
    cjsrk is offline
    Reply



    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 07:35.


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