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

Weapon Restriction


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
devicenull
Veteran Member
Join Date: Mar 2004
Location: CT
Old 10-30-2005 , 22:43   Weapon Restriction
Reply With Quote #1

Version: 0.15

What is it?
This is a fairly simple plugin that lets you restrict weapons in CSS. It will probably work for other mods too

How do I use it?
You need to download and Install SourceMM. Next, set it up like a normal plugin.

Now, open up your server.cfg, and add lines for the weapons you want to block.
The syntax for the blockweapon command is as follows:
blockweapon weapon_name block|unblock

So to block the awp and knife, I would do this:
blockweapon weapon_awp block
blockweapon weapon_knife block

Note that players will still be able to buy the weapons, but they will be removed very shortly after they buy them. They will also not get their money refunded.

What this will not have (don't ask for this):
Kick/Slay/Other action when they buy it
Refunding money (this would make it mod specific)

What may be added:
Message after a weapon is removed

Okay, where can I get it?
Win32: http://devnull.vision-host.net/files...estrict_mm.zip
Linux: http://devnull.vision-host.net/files...rict_mm.tar.gz
Source: http://devnull.vision-host.net/files...ict_src.tar.gz

Thanks to L. Duke's plugin for showing me how to include cbaseentity.h

Changes?
v0.11->v0.15
Works with new css update.
v0.1->v0.11
  • Fixed crashbug
__________________
Various bits of semi-useful code in a bunch of languages: http://code.devicenull.org/
devicenull is offline
jerinx
Junior Member
Join Date: Oct 2005
Old 10-31-2005 , 01:58  
Reply With Quote #2

Nice.Good Job .Can I just type this "blockweapon awp"?
__________________
jerinx is offline
cybermind
Senior Member
Join Date: Oct 2004
Old 10-31-2005 , 10:55  
Reply With Quote #3

Quote:
Originally Posted by jerinx
Nice.Good Job .Can I just type this "blockweapon awp"?
It's probably "blockweapon weapon_awp block"

Edited for correction
cybermind is offline
devicenull
Veteran Member
Join Date: Mar 2004
Location: CT
Old 10-31-2005 , 12:51  
Reply With Quote #4

No, you must use the actual name of the weapon.. awp is weapon_awp. Most of them just have a weapon_ prefix on the front
__________________
Various bits of semi-useful code in a bunch of languages: http://code.devicenull.org/
devicenull is offline
Wolvie
Member
Join Date: Dec 2004
Old 10-31-2005 , 21:16  
Reply With Quote #5

I installed the plugin and it is loading fine. As soon as a player joins server the server crashes.
Wolvie is offline
devicenull
Veteran Member
Join Date: Mar 2004
Location: CT
Old 10-31-2005 , 22:14  
Reply With Quote #6

Quote:
Originally Posted by Wolvie
I installed the plugin and it is loading fine. As soon as a player joins server the server crashes.
Details?
OS/Mod are at least the ones required.. did you try restricting any weapons? I know for a fact this plugin has worked on a windows and linux server. I've also tried it with bots.
__________________
Various bits of semi-useful code in a bunch of languages: http://code.devicenull.org/
devicenull is offline
Wolvie
Member
Join Date: Dec 2004
Old 10-31-2005 , 22:29  
Reply With Quote #7

its on a windows CS Sourse and the plugin loads when I start server and I have set weapon restrictions in server.cfg as instructions dictate. But as soon as I join it ....it crashes. I'll see if I can find anything in logs and post em

Edit: Very strange when I put your weapon restriction plugin on the server is not generating any logs any more. I have 5 plugins loading.....fakeclients, hostitron, goremod, xaphan and restrict weapon. I took every thing off excpet restrict and same issue. Without restrictions loaded server runs fine. and generates logs.
Wolvie is offline
devicenull
Veteran Member
Join Date: Mar 2004
Location: CT
Old 10-31-2005 , 22:43  
Reply With Quote #8

What weapons are you restricting?

Also, are you using the "offical" sourcemm 1.1 from sourcemm.net, or the one that has been posted on these forums for awhile. If you aren't using the one from sourcemm.net, I suggest trying that.

I can't see why it would cause the server to stop generating logs. By logs are you talking about messages from other plugins, or messages from the server..?

Also: It might be a bad idea to block all the weapons a player spawns with.. I don't really know what CSS would do in this case.
__________________
Various bits of semi-useful code in a bunch of languages: http://code.devicenull.org/
devicenull is offline
Wolvie
Member
Join Date: Dec 2004
Old 10-31-2005 , 22:48  
Reply With Quote #9

all i restricted was awp and autosnipers and i am using most current MM
Wolvie is offline
devicenull
Veteran Member
Join Date: Mar 2004
Location: CT
Old 10-31-2005 , 23:12  
Reply With Quote #10

Found the bug.. uploading new binaries soon

*Edit: Uploaded.
__________________
Various bits of semi-useful code in a bunch of languages: http://code.devicenull.org/
devicenull 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 12:37.


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