AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [TF2] Pick a Medic (v1.0.1, Nov. 15/12) (https://forums.alliedmods.net/showthread.php?t=200599)

waylaidwanderer 11-11-2012 01:33

[TF2] Pick a Medic (v1.0.1, Nov. 15/12)
 
1 Attachment(s)
I made this plugin by request.

You can make a random person on the server a medic. Could be useful for PUGs and Scrims or things like that.

Description:
  • Forces a random player to become a medic (does not prevent them from changing class to something else after that).
Commands:
  • sm_pickmedic | Randomly chooses a player, and then forces them to become a medic. Can be also triggered by typing !pickmedic or /pickmedic into chat. | Default Flag: GENERIC | Override: sm_pickmedic
Cvars:
  • sm_pickmedic_version | Plugin version. Do not edit.
  • sm_pickmedic_enabled | 0 = Disable plugin, 1 = Enable plugin | Default Value: 1
Installation:
  • Place pickmedic.smx into your addons/sourcemod/plugins folder.
Changelog:
  • Fixed a bug that caused the plugin to do nothing (v1.0.1, November 15th, 2012)
  • Created and uploaded plugin (v1.0.0, November 10th, 2012)

This plugin currently targets both teams.

RedSword 07-05-2013 21:21

Re: [TF2] Pick a Medic (v1.0.1, Nov. 15/12)
 
Hi,

I'm approving this plugin as there is no major flaw.

However, there are few points you might want to change :
  • You're using FCVAR_REPLICATED. This can generate errors in the clients's console.
  • Your check on 'numClients' is done twice. See lines 81+

No real need to update your plugin for that; but if you're to update, it wouldn't be bad to includes those change.

Also, in your plugin description you say "Forces a random player to medic." ; however, it only simply changes the class once. Player can still change after. I'd edit your first post if I were you (I believe it is a bit misleading currently).

Red


All times are GMT -4. The time now is 19:30.

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