Hi there,
Here is my Simple Restrictions plugin. It allows you to restrict weapons for CSS and CSPROMOD.
But it also
works with any other mod in wich you can buy items with the "buy" command.
If you want a restrict plugin with a lot of features you're wrong here, this plugin can just restrict a weapon, not more.
I want to keep this plugin simple, as the name already says, so please don't request a lot of new features ;) but feel free to report bugs!
You may also look at the
repositority of this plugin for recent snapshots.
Big thanks to
MistaGee. He helped me a lot with this plugin.
Installation:
Put the
simplerestrictions.smx into
/addons/sourcemod/plugins/ folder.
Put the
restrictedweapon.wav into
/sound/admin_plugin/actions/ folder.
How to use:
Following commands are available:
Restricting a weapon is much easier since 1.3!
For example, you want to restict the AWP
Just type /restrict awp in the chat.
You can also write /restrict weapon_awp it's equal.
The unrestrict command works the same way as the resrict command.
Just write /unrestrict awp oder /unrestrict weapon_awp in the chat.
If you type /restrictions in the chat, it will display you all weapons wich are restricted. Every player can use this.
If you change the map or restart the server, the restrictions wich you entered with the command are gone.
If you want to restrict a weapon permanent, just put the command
"sm_restrict <item>" in your
server.cfg.
Of course you have to replace <item> with the weapon you want to restrict.
Here's a list for you with some things you can restrict, the list is for CSS but should also work with CSPROMOD.
IMPORTANT: For some weapons there are two names, so you have to restrict both names because you can buy it with both names ;)
Code:
hegrenade / hegren
flashbang / flash
smokegrenade
glock
p228
deagle
fiveseven
elite
m3
xm1014
tmp
ump45
mp5navy / mp5
p90
galil
ak47
m4a1
aug
sg552
m249
scout
awp / magnum
sg550
g3sg1
vest / kevlar
vesthelm
Settings:
the file simple_restrictions.cfg will be created in /cfg/sourcemod/ after the first start of the plugin.
It has the following settings:
Code:
// Displays the restrict message in the CenterText.
// Default: "1"
sm_restrict_centertext "1"
// Displays the restrict message in the Chat.
// Default: "0"
sm_restrict_chattext "0"
// Displays the restrict message in the HintText.
// Default: "0"
sm_restrict_hinttext "0"
// Does not restrict the knife when sm_restrict_all is active.
// Default: "0"
sm_restrict_knife "0"
// Emits sound to player.
// Default: "1"
sm_restrict_sound "1"
// Restricts all weapons.
// Default: "0"
sm_restrict_all "0"
// Does not restrict the knife if sm_restrict_all is active.
// Default: "0"
sm_restrict_knife "0"
Changelog:
- 1.3.5 You can now restrict all or all but knife, also roundstart event added
- 1.3 Restriction works now in properly in CSS and the restrict method is more simple
- 1.2 Restricted weapons can't be picked up anymore
- 1.1 Added sm_unrestrict <item>
- 1.0 First Release
Known Bugs - Will be fixed soon:
- Pickup restriction doesn't work in cspromod yet (i don't have the pickup event yet)