Here's what I cobbled together. I'm not sure if it works, but it compiles fine.
If someone could test it, that'd be great.
Description:Forces a random player to medic.
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
- sm_pickmedic_immune | Are admins immune to the plugin? | 0 = No, 1 = Yes | Default Value: 1 --- NOT WORKING CURRENTLY
Installation:
Place
pickmedic.smx into your
addons/sourcemod/plugins folder.
Oh, and I forgot to add an admin flag to the command (derp!), so I'll change it later when I have time, assuming the plugin works. If not, I'll have to fix up those errors first.
Edit: did some testing and the current way I tried writing in admin immunity breaks the code. However, without that code, picking and setting a random person to be medic works fine. Reuploaded plugin.
Edit 2:
Question: Do you want to only pick a medic on the same team you are? Or just a medic from anyone on the server?