AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   TF2 Weapons Locker OnTheGo (Updated 9/26/2008) (https://forums.alliedmods.net/showthread.php?t=77261)

the_reverend 09-09-2008 00:09

TF2 Weapons Locker OnTheGo (Updated 9/26/2008)
 
1 Attachment(s)
Description

This plugin gives both admins & players to ability to reload ammo, recharge health, recharge metal, and give instant Ubers. There are other plugins out there that perform similar functions, but they either lack some of the included functions or they include more features than desired. I just wanted to make one that was all inclusive without any speciality. This plugin will probably best serve achievement & fun servers, but can also be used on normal pub boxes if one is mischievous.

Convars


sm_weaponslocker_enable 0/1 - Enables/Disables players abilities to use console or chat commands. Default: 0


Commands

** Player commands to be used in chat with a ! or / **
sm_ammo - Fully reloads ammo and clip on a per class basis
sm_health - Restores 100 percent health on a per class basis
sm_metal - Gives Engineers 200 metal
sm_uber - Gives Medics an immediate ubercharge

** Admin commands to be used console - Requires SLAY privledges**
sm_giveammo <target> - Fully reloads the targets ammo & clip
sm_givehealth <target> <amount> - Sets the targets health to the specified amount. (1-500)
sm_givemetal <target> <amount> - Sets the targeted Engi's metal to the specified amount. (1-200)
sm_giveuber <target> <amount> - Sets the targeted Medic's ubercharge meter to the specified amount. (1-100)


Installation

Put weaponslocker.smx in addons\sourcemod\plugins\


Changelog

Version 1.1.0 - 09.26.2008
- Cleaned up plugin error handling
- Fixed a bug that sets sniper SMG ammo to zero on sm_giveammo
- Added the requirement for SLAY access to admin commands
- Added logging of admin commands
- Added Convar to disable user console & chat commands

Version 1.0.0 - 09.08.2008
- Initial release.

MaKTaiL 09-09-2008 00:18

Re: TF2 Weapons Locker OnTheGo
 
There is a plugin that does the same thing and more called TF2 Jump Mode made by The JCS: http://forums.alliedmods.net/showthread.php?t=76080. In this plugin you can disable each function depending of your needs. This plugin doesn't have instant uber thow.

The Jump Mode plugin has too many commands. Thats is why there will be some people that will want your plugin because it is easy to manage.

And a question: Why this plugin is called Weapons Locker? The plugin doesn't lock weapons and it provides instant uber! Completly different things.

OziOn 09-09-2008 05:02

Re: TF2 Weapons Locker OnTheGo
 
I think by "Weapon Locker" he is referring to the medicine/ammo cabinets that are found in the spawn rooms.
Nice plugin. Useful for when you need some achievements ;)

MaKTaiL 09-09-2008 07:53

Re: TF2 Weapons Locker OnTheGo
 
Quote:

Originally Posted by OziOn (Post 683367)
I think by "Weapon Locker" he is referring to the medicine/ammo cabinets that are found in the spawn rooms.
Nice plugin. Useful for when you need some achievements ;)

Hmmm... Yeah, you are right!

The plugin is very good actually.

JazzCP 09-09-2008 15:14

Re: TF2 Weapons Locker OnTheGo
 
Can you make some kind of CVAR like:

sm_locker_admin

0 for 'anyone can use these commands' and
1 for 'admins only (or only admins with the flag for kicking)'

the_reverend 09-09-2008 17:23

Re: TF2 Weapons Locker OnTheGo
 
Quote:

Originally Posted by JazzCP (Post 683573)
Can you make some kind of CVAR like:

sm_locker_admin

0 for 'anyone can use these commands' and
1 for 'admins only (or only admins with the flag for kicking)'

Absolutely, I'll put that on my ToDo list and try to get it done this week. My real job is eating up time right now.

Arg! 09-09-2008 20:42

Re: TF2 Weapons Locker OnTheGo
 
Quote:

Originally Posted by the_reverend (Post 683287)
** Admin commands to be used console **
sm_giveammo <target> - Fully reloads the targets ammo & clip
sm_givehealth <target> <amount> - Sets the targets health to the specified amount. (1-500)
sm_givemetal <target> <amount> - Sets the targeted Engi's metal to the specified amount. (1-200)
sm_giveuber <target> <amount> - Sets the targeted Medic's ubercharge meter to the specified amount. (1-100)

From reading the code, these commands are normal console cmds and theres no admin check so any player can run them.

Also, there are no ReplyToCommands when a command 'errors' eg returns Plugin_Handled on bad command parameters or invalid states and nothing appears to be logged to the sourcemod logs.

Also again, the sm_givehealth command does not use the class specific max health function you already have in there.

the_reverend 09-10-2008 16:48

Re: TF2 Weapons Locker OnTheGo
 
Quote:

Originally Posted by Arg! (Post 683721)
From reading the code, these commands are normal console cmds and theres no admin check so any player can run them.

Also, there are no ReplyToCommands when a command 'errors' eg returns Plugin_Handled on bad command parameters or invalid states and nothing appears to be logged to the sourcemod logs.

Also again, the sm_givehealth command does not use the class specific max health function you already have in there.


Thanks for the help Arg! I've found a couple of bugs aside from the above and hope to have them all fixed in the next version.

dotISO 09-12-2008 15:45

Re: TF2 Weapons Locker OnTheGo
 
Instead of making them RegConsoleCmd, can't you make them AdminConsoleCmd (I think). This way, only admins can use it.

bl4nk 09-12-2008 15:58

Re: TF2 Weapons Locker OnTheGo
 
Quote:

Originally Posted by dotISO (Post 684906)
Instead of making them RegConsoleCmd, can't you make them AdminConsoleCmd (I think). This way, only admins can use it.

RegAdminCmd


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

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