AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [CS:S?/CS:GO] Noknife / !disarm (https://forums.alliedmods.net/showthread.php?t=275508)

pcmaster 12-01-2015 16:40

[CS:S?/CS:GO] Noknife / !disarm
 
5 Attachment(s)
1 - Description
This is a (somewhat) simple plugin, which allows players to type !noknife (or also !disarm) to hide their knife and optionally, all other weapons.
Mostly useful for Surf/Bhop servers, where you don't really need weapons anyways.

The commands supplied by this plugin are opt-in, meaning that per default, players will have their weapons (see section 5).

Tested with CS:GO, should work with CS:S, altough untested there.

Before you ask: no, this plugin does not breach any rules imposed by Valve, as it only spawns the default knife entity (if even).

2 - Commands
sm_noknife/sm_disarm - toggle, hide/show your knife.
sm_knife - various actions (see cvars)

3 - CVar's
sm_noknife_version - version, ignore that
sm_noknife_knife_only (def. 1) - enable to only allow the knife being given to players (sets mp_[t/ct]_default_primary/secondary/grenades cvars)
sm_noknife_strip_other (def. 0) - when using !noknife, remove all other weapons too (become entirely civilian)
sm_noknife_removal_info (def. 1) - behaviour done when a player types !knife: 0 = do nothing ("unknown command"), 1 = show informational message (as in, community servers are no longer allowed to hand out fake econ items), 2 = alias for !noknife

4 - Requirements
SourceMod 1.7+
Clientprefs (per default included in SM)

5 - Installation
The installation is pretty straightforward:
- Extract the translations.zip and upload the extracted directories/files into your SM directory
- Upload noknife.smx to your plugins/ folder
- Use sm plugins load noknife / change map / restart server
- The plugin auto-generates a plugin.noknife.cfg inside your cfg/sourcemod directory, configure the cvars there.
- Read the section below

PLEASE READ THIS!
A lot of skill-based maps (i.e. surf/bhop) strip off all weapons from players, so this plugin will accomplish nothing.
In order for clients to get their default items, download Stripper:Source, install it and put the following at the end of the addons/stripper/global_filters.cfg:

Code:

remove:
{
"classname" "game_player_equip"
}

remove:
{
"classname" "trigger_weapon_strip"
}

remove:
{
"classname" "player_weaponstrip"
}

This will remove all overrides done by maps.

Changelog
2.0.0 (01/12/2015)
- Initial public release

sneaK 12-14-2015 05:15

Re: [CS:S?/CS:GO] Noknife / !disarm
 
Hey, error while compiling, latest 1.7.3 compiler

Code:

addons\sourcemod\scripting\noknife.sp(123) : error 017: undefined symbol "CReplyToCommand"

pcmaster 12-14-2015 13:57

Re: [CS:S?/CS:GO] Noknife / !disarm
 
Make sure you have colors.inc in the correct directory (the one I have attached).
Compiles just fine for me, also on 1.7.3.

sneaK 12-14-2015 14:38

Re: [CS:S?/CS:GO] Noknife / !disarm
 
Quote:

Originally Posted by pcmaster (Post 2372418)
Make sure you have colors.inc in the correct directory (the one I have attached).
Compiles just fine for me, also on 1.7.3.

Turns out I had a different colors.inc already, replaced it with your version now it compiles fine! :bacon!:

rehashmusic 08-19-2019 18:40

Re: [CS:S?/CS:GO] Noknife / !disarm
 
So, I downloaded this plugin, did !disarm @myname" and it got rid of my knife. I can't toggle my knife back, and deleting the plugin was no help. The Sm_disarm plugin still works, but won't give my knife back even though I deleted it. Any help on this?


All times are GMT -4. The time now is 09:24.

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