AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   Weapon Blocker 1.3 (https://forums.alliedmods.net/showthread.php?t=86679)

MikeJS 03-01-2009 06:42

Weapon Blocker 1.3
 
1 Attachment(s)
Stops people from using weapons specfied in a cvar.

Cvars:
sm_wpnblock - Enable/disable plugin

Commands:
sm_wpnblock_add - Add a blocked weapon.
sm_wpnblock_clear - Clear list of blocked weapons.
sm_wpnblock_list - List blocked weapons.

Example:
Code:

sm_wpnblock "1"
sm_wpnblock_clear
sm_wpnblock_add "tf_weapon_flaregun"
sm_wpnblock_add "tf_weapon_pipebomblauncher" // Blocks flareguns and sticky launchers

TF2 Weapons:
Scout: tf_weapon_scattergun (both scatterguns), tf_weapon_pistol_scout, tf_weapon_lunchbox_drink, tf_weapon_bat, tf_weapon_bat_wood
Soldier: tf_weapon_rocketlauncher, tf_weapon_shotgun_soldier, tf_weapon_shovel
Pyro: tf_weapon_flamethrower (both flamethowers), tf_weapon_shotgun_pyro, tf_weapon_flaregun, tf_weapon_fireaxe (both axes)
Demoman: tf_weapon_grenadelauncher, tf_weapon_pipebomblauncher, tf_weapon_bottle
Heavy: tf_weapon_minigun (both miniguns), tf_weapon_shotgun_hwg, tf_weapon_lunchbox, tf_weapon_fists (both fists)
Engineer: tf_weapon_shotgun_primary, tf_weapon_pistol, tf_weapon_wrench, tf_weapon_pda_engineer_destroy, tf_weapon_pda_engineer_build (people can still use console commands to build)
Medic: tf_weapon_syringegun_medic (both syringe guns), tf_weapon_medigun (both mediguns), tf_weapon_bonesaw (both saws)
Sniper: tf_weapon_sniperrifle, tf_weapon_smg, tf_weapon_club
Spy: tf_weapon_revolver, SAPPER?, tf_weapon_knife, tf_weapon_pda_spy (can still disguise with console commands)

Flashback 03-01-2009 07:39

Re: TF2 Weapon Blocker
 
This is crazy. I was just trying to figure out a way to strip weapons by only using Sourcemod. Thanks a lot.

However, I just noticed that sm_wpnblock_rem isn't working properly. If you add too many weapons, the server is just gonna ignore the command. The plugin seems to work fine otherwise.

MikeJS 03-01-2009 07:53

Re: TF2 Weapon Blocker
 
It should work with up to 32 weapons.

CrimsonGT 03-01-2009 08:10

Re: TF2 Weapon Blocker
 
lol, I wrote this yesterday out of boredom, functions pretty much the exact same way. I just hadn't had time to get all the weapon names yet so I didnt release it. Nice plugin though. +karma for stopping a bunch of future plugin requests.

Flashback 03-01-2009 08:23

Re: TF2 Weapon Blocker
 
Quote:

Originally Posted by MikeJS (Post 771559)
It should work with up to 32 weapons.

Well this is what I get in the server console:
Code:

WARNING: Command too long... ignoring!
sm_cvar sm_wpnblock_rem "tf_weapon_bat, tf_weapon_bat_wood,
tf_weapon_bonesaw,
 tf_weapon_flaregun, tf_weapon_bottle, tf_weapon_builder, tf_weapon_club,
tf_weapon_fireaxe, tf_weapon_fists,
  tf_weapon_flamethrower, tf_weapon_flaregun,
tf_weapon_grenadelauncher, tf_weapon_knife, tf_weapon_minigun,
tf_weapon_pistol, tf_weapon_pistol_scout, tf_weapon_revolver,
tf_weapon_rocketlauncher, tf_weapon_scattergun,
tf_weapon_shotgun_hwg, tf_weapon_shotgun_primary,
tf_weapon_shotgun_pyro, tf_weapon_shotgun_soldier, tf_weapon_shovel,
tf_weapon_smg, tf_weapon_sniperrifle, tf_weapon_syringegun_medic,
tf_weapon_wrench, tf_weapon_pipebomblauncher"
Cbuf_AddText: buffer overflow


MikeJS 03-01-2009 09:24

Re: TF2 Weapon Blocker
 
Quote:

Originally Posted by Flashback (Post 771572)
Well this is what I get in the server console:
Code:

WARNING: Command too long... ignoring!
sm_cvar sm_wpnblock_rem "tf_weapon_bat, tf_weapon_bat_wood,
tf_weapon_bonesaw,
 tf_weapon_flaregun, tf_weapon_bottle, tf_weapon_builder, tf_weapon_club,
tf_weapon_fireaxe, tf_weapon_fists,
  tf_weapon_flamethrower, tf_weapon_flaregun,
tf_weapon_grenadelauncher, tf_weapon_knife, tf_weapon_minigun,
tf_weapon_pistol, tf_weapon_pistol_scout, tf_weapon_revolver,
tf_weapon_rocketlauncher, tf_weapon_scattergun,
tf_weapon_shotgun_hwg, tf_weapon_shotgun_primary,
tf_weapon_shotgun_pyro, tf_weapon_shotgun_soldier, tf_weapon_shovel,
tf_weapon_smg, tf_weapon_sniperrifle, tf_weapon_syringegun_medic,
tf_weapon_wrench, tf_weapon_pipebomblauncher"
Cbuf_AddText: buffer overflow


That's...odd. Have you tried setting the cvar with rcon rather than sm_cvar?

CrimsonGT 03-01-2009 09:52

Re: TF2 Weapon Blocker
 
The string is too long for a CVAR. Your going to need to either move it over to use a config file, or seperate it up to use a boolean cvar for each weapon would be my guess.

Flashback 03-01-2009 10:51

Re: TF2 Weapon Blocker
 
Quote:

Originally Posted by MikeJS (Post 771595)
That's...odd. Have you tried setting the cvar with rcon rather than sm_cvar?

Yes, same results.

MikeJS 03-01-2009 11:29

Re: TF2 Weapon Blocker
 
If anyone desperately wants their server to become "who dies from fall damage or old age first" then I'll fix it.

Flashback 03-01-2009 11:44

Re: TF2 Weapon Blocker
 
Quote:

Originally Posted by MikeJS (Post 771667)
If anyone desperately wants their server to become "who dies from fall damage or old age first" then I'll fix it.

Well, yes I would, if it isn't too much of a problem. This is a perfect plugin for my server.


All times are GMT -4. The time now is 14:48.

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