AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [Any] Strip Weapons from Player (https://forums.alliedmods.net/showthread.php?t=260660)

RedSword 03-29-2015 07:31

[Any] Strip Weapons from Player
 
2 Attachment(s)
Strip Weapons from Player

With sm_admin menu integration
v. 1.2.0

Foreword :
I was a bit saddened and baffled to find that I couldn't find any plugin to strip a player from his weapons in different mods, when searching 'strip' or 'remove' or 'weapon' in the plugin search. So I decided to make my own and release it.

Features (Admin Commands) :
  • <sm_strip | say !strip> <#userid|name|targets> <[slots]> : Remove weapons specified in 2nd arg, or in 'swfp_slot_default' if not present.
  • <sm_stripall | say !stripall> <#userid|name|targets> ; Remove all weapons with slot lower or equals swfp_slot_max.
  • <sm_stripbut | say !stripbut> <#userid|name|targets> <slots> ; slot is 1-based ; Remove all weapons with slot lower or equals swfp_slot_max from target except those in 2nd-argument slot.
  • --------------------
  • Note that the slot specified by the ConVar swfp_slot_default will be used instead of sm_strip 2nd arg if it is missing.
  • Tested and works in CSS/TF2. Should work with other mods.
  • Note that player being stripped from all their weapons will have a 'T' pose, which is normal.
  • Ban flag is needed.

ConVars :
  • swfp_slot_max : Until which item slot (included) should the plugin end to remove weapons. 1-based. Def. 10.
  • swfp_slot_default : Which slots should be stripped from their weapons by default ? (stick the slot digits together; sm_strip only; 0=slot 10; digits must all be below or equal swfp_slot_max). Default "1234".
  • ----------
  • swfp_log : Should the plugin log admin activity ? 1=Yes (Def.), 0=No.

Changelog :
  • 1.0.0 Initial release. (29-03-2015)
  • 1.1.0 (01-04-2015)
    • Changed the way commands work.
    • Removed swfp_slot_min and swfp_slot_skip convars.
    • Added swfp_slot_default convar.
    • You can now specify slots when stripping someone (if not present, those specified by swfp_slot_default are used).
    • Reversed the arguments in sm_stripbut (to have the same order as sm_strip).
    • Removed aim-target as optional argument; since anyway an admin can use @aim.
    • Changed verbose so the stripped slots are shown (unless if stripping all). Translation file must be redownloaded.
  • 1.2.0 (08-09-2015)
    • Added admin menu integration (under player commands).
    • Added a possibility to avoid handling immunity (see convar swfp_ignore_immunity).
    • Fixed swfp_log being incorrectly used in the code :3.
    • Translations must be redownloaded.

Thanks :
  • Perm strip ?

Thanks :
  • House : Slot-flags idea, instead of range & skips (1.1.0). Also where would I live without it ^^.

Bjorngomes 03-31-2015 13:23

Re: [Any] Strip Weapons from Player
 
Plugin failed to compile! Please try contacting the author.

Is it possible to Provide the plugin. thanks.

RedSword 03-31-2015 14:43

Re: [Any] Strip Weapons from Player
 
Quote:

Originally Posted by Bjorngomes (Post 2280255)
Plugin failed to compile! Please try contacting the author.

Is it possible to Provide the plugin. thanks.

That 1.7 <.<

Compiles fine in 1.8

Uploaded. Thanks for reporting :/.

micazoid 03-31-2015 15:04

Re: [Any] Strip Weapons from Player
 
Quote:

Originally Posted by RedSword (Post 2280286)
That 1.7 <.<

Compiles fine in 1.8

He tried to use Webcompiler ^^

RedSword 03-31-2015 17:20

Re: [Any] Strip Weapons from Player
 
https://forums.alliedmods.net/custom...tar94702_2.gif

Bahahahahahahahaha your owl is awesome, reversed <3

Quote:

Originally Posted by micazoid (Post 2280293)
He tried to use Webcompiler ^^

No it really doesn't compile on the forum. I believe it is due to 1.7 syntax bugs zzz. It is understandable that they do not use 1.8 compilers when 1.8 isn't released <.<.

EDIT : Wtf, it compiles fine in 1.7 default snapshot, as well as SM online compiler; but not forum compiler (and 1.7 is selected)

RE-EDIT : https://bugs.alliedmods.net/show_bug.cgi?id=6340

RedSword 04-01-2015 07:28

Re: [Any] Strip Weapons from Player
 
Released 1.1.0 :
  • Changed the way commands work.
  • Removed swfp_slot_min and swfp_slot_skip convars.
  • Added swfp_slot_default convar.
  • You can now specify slots when stripping someone (if not present, those specified by swfp_slot_default are used).
  • Reversed the arguments in sm_stripbut (to have the same order as sm_strip).
  • Removed aim-target as optional argument; since anyway an admin can use @aim.
  • Changed verbose so the stripped slots are shown (unless if stripping all). Translation file must be redownloaded.

Thanks to House for the slot-flag idea.

Also even though I reuploaded the plugin, bug 6340 is still in effect.

EDIT : Removed .smx as 6340 is fixed

Robin955 04-25-2015 22:22

Re: [Any] Strip Weapons from Player
 
slot 1 primary, slot 2 pistol. slot 3 knife, slot 4 grenade?

im not sure im understanding how to set it right based on -1 and 10 what is all that.

how do i simply make it strip everyone at round beginning, hopefully this would take effect before the sm_hosties starts giving out knifes to T's since i got the problem where t's doesn't get a knife when spawning somethimes
it does give the knife animations but it does not provide the knife, its like it gave the knife but then removed it quickly again wich is bugging me
oh so strip 1234 would be all slots? well 12345 would?

RedSword 04-25-2015 22:51

Re: [Any] Strip Weapons from Player
 
Quote:

Originally Posted by Robin955 (Post 2290262)
slot 1 primary, slot 2 pistol. slot 3 knife, slot 4 grenade?

Yes.

Quote:

Originally Posted by Robin955 (Post 2290262)
im not sure im understanding how to set it right based on -1 and 10 what is all that.

Did you try it as is ? And I'm not sure where you take your "-1". And 10 is so all mods are taken into consideration.

Quote:

Originally Posted by Robin955 (Post 2290262)
how do i simply make it strip everyone at round beginning, hopefully this would take effect before the sm_hosties starts giving out knifes to T's since i got the problem where t's doesn't get a knife when spawning somethimes
it does give the knife animations but it does not provide the knife, its like it gave the knife but then removed it quickly again wich is bugging me

I never said anything about round beginning...

Quote:

Originally Posted by Robin955 (Post 2290262)
oh so strip 1234 would be all slots? well 12345 would?

sm_stripall

If you feel something is unclear in the first post feel free to pinpoint it; I feel it should be clear enough as is (I did add the default for swfp_slot_default though).

Robin955 04-25-2015 23:33

Re: [Any] Strip Weapons from Player
 
oh so when doing strip robin it would strip the defaults? and if i type the numbers myself it would strip that?
well i was looking for a meele plugin annyway and this works nicely. thanks.

yeah sorry about the confusion that was caused by someone else.

RedSword 04-26-2015 00:25

Re: [Any] Strip Weapons from Player
 
Well the square brackets ([]) represent the fact that the argument is optional (as I've seen somewhere else I can't remember), so yes.

For a melee plugin I suggest you change the default to 124 or 1245 & use sm_strip.


All times are GMT -4. The time now is 20:59.

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