AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Trash (https://forums.alliedmods.net/forumdisplay.php?f=22)
-   -   Forbidden weapons [ Updated : 08/01/2008 ] (https://forums.alliedmods.net/showthread.php?t=63942)

Arkshine 12-04-2007 01:32

Forbidden weapons [ Updated : 08/01/2008 ]
 
2 Attachment(s)
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.

Arkshine 12-04-2007 01:33

Re: Forbidden weapons
 

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.

deejay87 12-04-2007 14:08

Re: Forbidden weapons
 
Thanks for the job , this plugin work fine and very usefull :)

spiderbites 12-05-2007 04:50

Re: Forbidden weapons
 
thanks..yea..works just fine..i havent encoutered any error yet with this one..will report later if found errors

spiderbites 12-05-2007 06:49

Re: Forbidden weapons
 
arkshine..not really bugs..just want to ask..i see some boxes in console

http://img33.picoodle.com/img/img33/...wm_089553c.jpg

can you fix that? remove empy spaces..

Arkshine 12-05-2007 08:11

Re: Forbidden weapons
 
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() )

purple_pixie 12-05-2007 09:03

Re: Forbidden weapons
 
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

Arkshine 12-05-2007 09:42

Re: Forbidden weapons
 
Interesting idea, purple_pixie. I will consider it.

purple_pixie 12-05-2007 10:11

Re: Forbidden weapons
 
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.

Maurice 12-05-2007 23:00

Re: Forbidden weapons
 
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!!


All times are GMT -4. The time now is 02:17.

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