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.

CrimsonGT 03-01-2009 11:49

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.

rofl, that was a classic.

MikeJS 03-01-2009 12:13

Re: Weapon Blocker
 
Updated to 1.1
Uses a command rather than a cvar to add blocked weapons and should work on games that aren't TF2

Flashback 03-01-2009 14:23

Re: Weapon Blocker
 
Thanks for the quick update. Works great so far.

sirmoe 03-01-2009 15:10

Re: Weapon Blocker
 
Nice release

Daymon 03-02-2009 04:55

Re: Weapon Blocker
 
Just tested - works fine with sandman.
Also i tried tf_weapon_kgb and tf_weapon_axtinguisher, and this didn't work. Is there an any way to block Heavy's KGB, but allow fists?

sorry for my bad English

MikeJS 03-02-2009 11:18

Re: Weapon Blocker
 
Not yet with this plugin.

Flashback 03-14-2009 21:49

Re: Weapon Blocker
 
This plugin doesn't seem to be working anymore. Only thing it does now, is to remove the first weapon a player holds. Is it possible to fix this? This happens on TF2.

MikeJS 03-15-2009 06:41

Re: Weapon Blocker
 
Just tested and it works fine for me.

Flashback 03-15-2009 08:04

Re: Weapon Blocker
 
Quote:

Originally Posted by MikeJS (Post 780986)
Just tested and it works fine for me.

This is the error I recieve though.
Code:

L 03/15/2009 - 12:29:28: [SM] Plugin encountered error 15: Array index is out of bounds
L 03/15/2009 - 12:29:28: [SM] Displaying call stack trace for plugin "wpnblock.smx":
L 03/15/2009 - 12:29:28: [SM]  [0]  Line 47, /home/groups/alliedmodders/forums/files/4/4/2/9/5/38095.attach::WpnCheck()


MikeJS 03-15-2009 10:07

Re: Weapon Blocker 1.2
 
Uploaded a new version which may fix your problem.

Flashback 03-16-2009 14:16

Re: Weapon Blocker 1.2
 
That seem to do the trick. Thanks again for a great plugin.

Bleuberry 04-14-2009 04:32

Re: Weapon Blocker 1.2
 
This turned out not to work on just any game, you need 'TF2 tools', which don't come with Age of Chivalry.

MikeJS 04-14-2009 07:51

Re: Weapon Blocker 1.2
 
Quote:

Originally Posted by Bleuberry (Post 805001)
This turned out not to work on just any game, you need 'TF2 tools', which don't come with Age of Chivalry.

My bad, fixed.

Xp3r7 04-15-2009 09:54

Re: Weapon Blocker 1.3
 
sm_wpnblock_add "weapon_flashbang"

Would that be correct to block the flasbang in CSS?

sishgupta 05-21-2009 22:20

Re: Weapon Blocker 1.3
 
Apparently this plugin is crashing my server with the spy update. Disabling it resolves the problem.

MikeJS 05-22-2009 06:00

Re: Weapon Blocker 1.3
 
Quote:

Originally Posted by Xp3r7 (Post 805984)
sm_wpnblock_add "weapon_flashbang"

Would that be correct to block the flasbang in CSS?

Not sure, it might.
Quote:

Originally Posted by sishgupta (Post 832113)
Apparently this plugin is crashing my server with the spy update. Disabling it resolves the problem.

I was expecting this update to break everything :P

crazy-tony 06-12-2009 10:54

Re: Weapon Blocker 1.3
 
Plugin works fine on my server !!

does anyone no the names of the new weapons so i can redistrict them ..i need ones for the ,cloak and dagger..dead ringer and jarate...

i have tried a few variations but not geting anywhere..

The ambassador work's as sm_wpnblock_add "tf_weapon_Ambassador"

Negamann 06-18-2009 20:37

Re: Weapon Blocker 1.3
 
For anyone having probs with it working. You might want to manually add each item. I noticed that when I had it in my server.cfg, it would eventually show duplicate blocks and somehow cancel itself out (In TF2)

bobblyhead 12-19-2009 19:09

Re: Weapon Blocker 1.3
 
Anyone got the updated list that includes the new solly + demo weapons?

ballz 12-26-2009 16:22

Re: Weapon Blocker 1.3
 
I hope so.... I really want that stupid ass shield and axe gone..

Lob (UK 01-08-2010 07:38

Re: Weapon Blocker 1.3
 
Hi,

Will this plugin block the new weapons such as the sword and shield (chargin' targe) or do they need adding to the plugin itself first?

Trying to find a way to disable the Demoman sword and shield because they are ridiculously overpowered and have destroyed the balance of the gameplay even further. Watching an over powered demoman speedhacking with the intel is pathetic and players have been banned for lesser offences. I have no idea what valve were thinking.

Cheers

- Lob (UK)

rig0r 01-09-2010 12:45

Re: Weapon Blocker 1.3
 
Quote:

Originally Posted by Lob (UK (Post 1047542)
Hi,

Will this plugin block the new weapons such as the sword and shield (chargin' targe) or do they need adding to the plugin itself first?

Trying to find a way to disable the Demoman sword and shield because they are ridiculously overpowered and have destroyed the balance of the gameplay even further. Watching an over powered demoman speedhacking with the intel is pathetic and players have been banned for lesser offences. I have no idea what valve were thinking.

Cheers

- Lob (UK)

Looking into this as well, I only want to disable the shield however as it is the combination of running (away) and the sword that is overpowered in my opinion. I'll have a look at this and let you know my results.

Edit: this plugin does not work, it does not check for stuff you carry that is not directly a weapon (shield, buff banner, razorback, etc.).

This plugin does however and it works properly: http://forums.alliedmods.net/showthread.php?t=93537
Get the .smx from the first post, then fix line 471 like mentioned here and compile it: http://forums.alliedmods.net/showpos...&postcount=118

Chris-_- 01-16-2010 14:57

Re: Weapon Blocker 1.3
 
This should be re-done to using not the names of the weapons as lookup , but the weapon-ItemDefinitionIndex, anyone up for it?

Broseph 02-23-2010 23:37

Re: Weapon Blocker 1.3
 
It just needs an update to include new weapons..

Viper_Vicki 08-11-2010 11:55

Re: Weapon Blocker 1.3
 
This doesn't seem to be working with empiresmod.

I uplaoded the smx into plugins folder and added the weapons to block in server.cfg:
//weapon block
sm_wpnblock "1"
sm_wpnblock_add "emp_nf_pistol"
sm_wpnblock_add "emp_imp_pistol1"
sm_wpnblock_add "emp_nf_shot_pistol"
sm_wpnblock_add "emp_imp_pistol2"
I also tried adding them in server console but so far the pistols can still be chosen and used.

I need to restrict all wepaons for a race maps. Can you please make this work with empiresmod?

Thanks

locktar 11-15-2010 21:44

Re: Weapon Blocker 1.3
 
how can add a command to hide weapon model (r_drawviewmodel 0) in the loop?

KiR 11-18-2011 13:39

Re: Weapon Blocker 1.3
 
How do I lock this weapon's Cow Mangler 5000?
How to write a command?

KiR 11-18-2011 17:34

Re: Weapon Blocker 1.3
 
Please help ... https://forums.alliedmods.net/images/smilies/frown.gif

TnTSCS 11-18-2011 17:46

Re: Weapon Blocker 1.3
 
sm_wpnblock_add "tf_weapon_cowmangler5000"
or
sm_wpnblock_add "tf_weapon_cowmangler"

what's the actual weapon name?

KiR 11-18-2011 17:51

Re: Weapon Blocker 1.3
 
Quote:

Originally Posted by TnTSCS (Post 1598765)
sm_wpnblock_add "tf_weapon_cowmangler5000"
or
sm_wpnblock_add "tf_weapon_cowmangler"

what's the actual weapon name?

tried different names, does not help (


All times are GMT -4. The time now is 01:33.

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