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

Forbidden weapons [ Updated : 08/01/2008 ]


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Gameplay        Approver:   Orangutanz (13)
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-04-2007 , 01:32   Forbidden weapons [ Updated : 08/01/2008 ]
Reply With Quote #1

Forbidden weapons
( Last update : 08/01/2008 )


Description :
- - - - - - - - -
This plugin allows you to specify what weapons will be forbidden to be used in few ways.

Features :
- - - - - - - -
  • Using cvars to define easily forbidden weapons.
  • Forbidden weapons can be set per team.
  • Automatic dropping when you get a forbidden weapon ( at buying, given by map, etc.. )
  • Immediate removing when a forbidden weapon is dropped.
  • Not allowing to pick up forbidden weapons on the ground.
  • Multilingual plugin. (°)

    (°) See /amxmodx/data/lang/forbidden_weapons.txt file.

Requirement :
- - - - - - - - - - -
  • Cs 1.6 / Cz
  • AMXX 1.7x or highly.

Commands :
- - - - - - - -
  • amx_fw_stop : Stop plugin properly.
  • amx_fw_start : Start plugin stopped with the command 'amx_fw_stop' command.

Cvars :
- - - - -
  • fw_team_t <weapon1,weapon2,etc..>
    Specifies the weapons to restrict to the 'T' team.
  • fw_team_ct <weapon1,weapon2,etc..>
    Specifies the weapons to restrict to the 'CT' team.
    -----

    Here a full weapons names list :
    - Common : glock18, usp, p228, deagle, m3, xm1014, mp5navy, tmp, p90, scout, awp, m249, hegrenade, flashbang, smokegrenade.
    - 'CT' weapons : fiveseven, ump45, m4a1, sg550, aug, famas
    - 'T' weapons : elite, mac10, galil, ak47, sg552, g3sg1
    The value by default : "" . ( it means empty so all weapons are allowed )
    If 'fw_team_t' and 'fw_team_ct' cvars are empty, the plugin will be disabled.


    Example :

    - You want to restrict only 'deagle' and "He" to the T team : fw_team_t "deagle,hegrenade"
    - You want to restrict only 'm4a1', 'ak47' and 'smokegrenade' to the CT team : fw_team_ct "m4a1,ak47,smokegrenade"


  • fw_mode <flags>
    Specifes mode to enable.

    The flags are additives.
    "a" : Automatic dropping when you get forbidden weapon ( at buying, given by map, etc.. )
    "b" : Immediate removing when forbidden weapon is dropped.
    "c" : Not allowing to pick up weapons on the ground.
    The value by default : "abc".

  • fw_chat_delay <delay>
    Specifies a delay in seconds between each message when you're trying to pick up the same forbidden weapon on the ground.
    ( No need to flood the chat )

    The value by default : "3".

  • fw_log_enabled <0|1>
    Enable log to check what weapons have been loaded.
    The value by default : "1".

Colored text :
- - - - - - - - - - -
Colored messages are supported in chat. You may want to customize color.
There are 3 string replace characters.
!g : green color
!t : team color ( T -> Red ; CT -> Blue )
!n : regular color ( yellow by default )
See /amxmodx/data/lang/forbidden_weapons.txt file.


Note : This plugin is a request.
Note : Feel free to correct my poor english.
Attached Files
File Type: sma Get Plugin or Get Source (forbidden_weapons.sma - 6055 views - 24.2 KB)
File Type: txt forbidden_weapons.txt (1.7 KB, 2333 views)
__________________

Last edited by Arkshine; 01-08-2008 at 09:51. Reason: Updated. v1.1.2
Arkshine is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-04-2007 , 01:33   Re: Forbidden weapons
Reply With Quote #2


Changelog :
- - - - - - - - -
v1.2.0 : [ ??-01-2008 ] - Major release. Not release yet.
( Coming soon. )

(!) Fixed. Money was not put back after buying a forbidden weapon. (blocked hud + money back)
(+) Added a check to ignore weapon which is already saved.
(+) Added a check after using command to prevent to have forbidden weapon.
(+) Chat messages can be disabled now.
(+) Buying and given by map are now separated.
(+) Added new feature : replacement. A forbidden weapon can be replaced by another.
(+) Added new feature : limitation. Specifies the number of weapons or a percentage.
(+) Added new feature : collect. [Not|allowing] to collect weapon [anywhere|buyzone].
(+) Added new feature : punishments. ( Not implemented yet... )
(+) Each features can be set per weapons, per team from a file.
(-) 'fw_team_t' and 'fw_team_ct' cvars has been removed.

There will be more features but I need to think about a good organization of the configuration file.
e.g: punishements, it's a bit difficult to implement that because of I want customizable punishments for each weapons.
v1.1.2 : [08-01-2008]
(!) Fixed a bug. Ct weapons were read as Ts, and reversely.
v1.1.1 : [04-12-2007]
(+) Fixed a bug in which weapons have not saved at the first start of server.
v1.1.0 : [ 11-11-2007 ]
(!) Fixed a typo in order to allow compilation under amxx 1.7x.
(!) Fixed a little bug avoiding a repetition of a message in the chat
(+) Added a check if the weapon is allowed after restarting plugin via the command.
(+) Added a public cvar. ( to find easily who is using my plugin ;) )
(+) Now forbidden weapons can be set by team.
(+) Added 'fw_team_t' and 'fw_team_ct' cvar.
(-) 'fw_forbidden_weapons' cvar has been removed.
v1.0.0 : [ 7-11-2007 ]
(+) First release.

Credits :
- - - - - -
  • deejay87 : Requested by him.
  • VEN : Weapon priority code and 2 functions from fakemeta_util.
__________________

Last edited by Arkshine; 01-08-2008 at 09:50.
Arkshine is offline
deejay87
Senior Member
Join Date: Apr 2004
Location: Pays du Glaude - France
Old 12-04-2007 , 14:08   Re: Forbidden weapons
Reply With Quote #3

Thanks for the job , this plugin work fine and very usefull
__________________
deejay87 is offline
Send a message via MSN to deejay87 Send a message via Skype™ to deejay87
spiderbites
Senior Member
Join Date: Nov 2007
Old 12-05-2007 , 04:50   Re: Forbidden weapons
Reply With Quote #4

thanks..yea..works just fine..i havent encoutered any error yet with this one..will report later if found errors
spiderbites is offline
spiderbites
Senior Member
Join Date: Nov 2007
Old 12-05-2007 , 06:49   Re: Forbidden weapons
Reply With Quote #5

arkshine..not really bugs..just want to ask..i see some boxes in console



can you fix that? remove empy spaces..
spiderbites is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-05-2007 , 08:11   Re: Forbidden weapons
Reply With Quote #6

It's not a bug. To do spaces it uses '^t' to create some tabs. It appears that the console doesn't support tabs.

Using a text editor you should see something like :

Code:
[Untitled.amxx] [ LOADING 'CT' WEAPONS ]
[Untitled.amxx]  
[Untitled.amxx] 	 From 'fw_team_ct' cvar ;
[Untitled.amxx]  
[Untitled.amxx] 		  + xm1014
[Untitled.amxx] 		  + ak47
[Untitled.amxx] 		  + hegrenade
[Untitled.amxx]  
[Untitled.amxx] 	 -> '3' weapons has been found.
[Untitled.amxx] 	 -> Above are weapons which won't allowed to this team.
If you don't like spaces, edit .sma and remove all '^t' . ( LogPlugin() )
__________________
Arkshine is offline
purple_pixie
Veteran Member
Join Date: Jun 2007
Location: Winchester, England
Old 12-05-2007 , 09:03   Re: Forbidden weapons
Reply With Quote #7

You should make it crazy-original in punishments for using forbidden weapons.

Like cvars so instead of just blocking the weapon, you could have the users lose 1hp/second or something.

Might just up its approval chance
purple_pixie is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-05-2007 , 09:42   Re: Forbidden weapons
Reply With Quote #8

Interesting idea, purple_pixie. I will consider it.
__________________
Arkshine is offline
purple_pixie
Veteran Member
Join Date: Jun 2007
Location: Winchester, England
Old 12-05-2007 , 10:11   Re: Forbidden weapons
Reply With Quote #9

I just thought you could have some real fun with that.

Other ideas ( if you wanted to go down that route ) would be announcements like:
"%name% Bought a %weapon%. What a noob!"

Maybe move-speed reduction, or other game-play affects.
Damage reflection? (attacker takes equal damage as his victim [or at least a %])

Obviously I'm just throwing out ideas, I don't have a server to put this on, so you wouldn't be making them to make me happy.
Just thought if you wanted a little more originality, then it's always an option.
purple_pixie is offline
Maurice
Senior Member
Join Date: Nov 2006
Location: Netherlands
Old 12-05-2007 , 23:00   Re: Forbidden weapons
Reply With Quote #10

Great plugin! I do the same already with a few other plugins together for only sniper riffles but preffer to use just one plugin and the ability to restrict per team every weapon. The only thing i miss in this one is that instead of dropping the weapon the plugin first try to block the buy of the weapon or atleast give the money back because on my assault server terrors aren't allowed to by a AWP or AutoSniper but if you come as a new player it would be somewhat hard to let them buy the AWP for $4750 and take it away. Anyway great plugin arkshine!!
__________________
Luck? Luck is only one feeling of amazement concerning a seemingly incidental circumstance which one himself must create.
Maurice 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 16:01.


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