What? Another one?
It is basically the same as many other unlock replacement plugins, it blocks players from using a specific weapon.
This plugin is using the
UnlockBlock or the
TF2Items extension if they are loaded. Otherwise it tries to do its best with SourceMod itself.
Known Issues:
If possible and if it's currently working use the UnlockBlock extension as it provides the best results. If you are using one of the other methods the following issues will occur:
- Although set hats may be blocked their attributes will still be active.
- Some weapons will have the ammo of the weapon they replaced.
- The viewmodel of some weapons may block your field of view.
Cvars:
A config will be auto-generated on first run, located in your
cfg/sourcemod folder. Change any permanent settings there.
- sm_tnounlockspls_enable - enables, disables the plugin
- sm_tnounlockspls_default - set to 1 to replace weapons by default, set to 0 to keep weapons by default. This cvar inverts what you have configured ingame.
- sm_tnounlockspls_blocksets - set to 1 to remove hats that would complement a set giving attributes. (default 0).
- sm_tnounlockspls_blockstrange - set to 1 to block those annoying strange weapons. (default 0).
- sm_tnounlockspls_cfgfile - File to store configuration in
- sm_tnounlockspls_announce - (0/1) Announces the removal of weapons/attributes
Configuration:
This is done ingame. The plugin hooks itself into the admin menu, where you can enable/disable (depending on
sm_tnounlockspls_default) unlocks. There is no
sm_toggleunlock command anymore.
To make sure everything works as it should, follow the rule of thumb and change the map after you've made changes to the tNoUnlocksPls configuration.
Translations:
This plugin comes with translations for every language valve implemented. I will update them shortly after valve releases an update. Feel free to use them in your own project.
Installation:- Just unpack the whole zip into the correct folders.
- This has support for Updater built in.
- If you want to compile this yourself you'll also need the colors include by exvel.
- For some of the modules the smlib by berni is needed, as well as the corresponding extension includes.
Why so many plugins?
Basically, because it's easier to maintain them and easier to add new things.
- tNoUnlocksPls.smx
This is the core plugin. It's responsible for configuring which weapons are blocked and provides natives and forwards for other plugins to interact with it. This is the absolute minimum, but won't do anything alone - as there is no plugin actually blocking any weapons.
- tNoUnlocksPls.announce.smx
This is only used so players get informed that their weapons have been replaced. It prints the name of the weapon in the chat.
- tNoUnlocksPls.menu.smx
Allows to configure the core easily via adminmenu.
- tNoUnlocksPls.noext.smx
This is a plugin that actually blocks weapons, but only if none of the other two are available. It is trying to get the best results by only using sourcemod method calls, so you won't need an extension. This only works partially and some attributes might stick to the players.
- tNoUnlocksPls.tf2items.smx
This is a plugin that actually blocks weapons, but only if the vanillaweps one is not available. This is using TF2Items to replace weapons with their default counterparts. It generally works better than the sourcemod version, but some attributes might stick to the players as well.
- tNoUnlocksPls.vanillaweps.smx
This would be the best choice of plugin for the actual blocking of weapons, but its extension is currently broken. Don't install the extension or your server will most likely crash.
Changelog:
Can be found
here.