View Single Post
Author Message
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 06-11-2014 , 21:02   [TF2] Mind Control - updated 2014-7-18
Reply With Quote #1

This plugin allows you to control any player by taking over their keys, taunts, etc. Seems client buttons arn't sent from spectator, everyone will have to be alive. You can control as many players as you like, and make them attack others, jump off cliffs, or whatever.

**This messes with player's eye angles.
If you use SMAC-eyetest - should be fixed now**


CVARs:
Code:
f_mindcontrol_version: version number, for tracking (don't change)
Commands:
  • sm_mindcontrol, sm_mc: (Slay) allows you to select or de-select the player you are looking at, also accepts args. sm_mc 0 will release all players. sm_mc <targetstring> allows you to target anyone by command.

Code:
2014-6-11(v1.0.0)
* Initial Release

2014-7-18(v1.0.1)
* Added SMAC forward to prevent cheat detection for players who are controlled
* Changed beams to allow controlled players to see them.
* Added auto-fire to locked targets (alt-fire while pressing +use toggles, use it after you have a lock to enable)
Plans:
  • Find a better way to deal with client prediction / Lead.
  • Calculate projectile speeds and aim to intercept.
  • It's possible to use traceattack and ontakedamage to allow for friendly fire, but I didn't include it. Not sure if I should. It's some extra overhead, and OnPlayerRunCmd is bad enough.

Usage:
  • sm_mc will select or deselect the player you are directly looking at.
  • special attack (middle mouse) will freeze your movement when you have a minion.
  • +use (you'll have to bind it) allows you to "lock on" to a player, and the minions will track them. Hold it down until you capture a player, then let go. Press again to release the target lock.
  • using alt-fire while using +use will toggle auto-lock, which will cause players to run toward and attack players they have targeted. The beam will turn red while this is active.
  • Reload makes your minions attack
  • Scoreboard view (tab) makes your minions switch weapons
  • Primary fire (left mouse) makes your minions reload

Notes:
  • While you can control multiple players, weapon switch has a cooldown, which may prevent multiples from switching at once (not sure).
  • Holding forward when not locked will cause players to spin in a circle if they reach the point on the ground.
  • Aim is not perfect, because it's client predicted, and I've not yet compensated for it too well.
  • Target locks persist, even if the target drops out of your minion's line of sight.
  • Before the update on 6/11/2014 it was possible to taunt slide and kill people with minions, seems that no longer is the case.
  • It uses runcmd, so the client's command rate will determine the smoothness of the control. They'll use your buttons (it's queried each calculation). Differences in rates shouldn't matter too much, but it's kind of shaky at 33.

You can always find the latest version of this here:
https://drive.google.com/folderview?...Wc&usp=sharing
Attached Files
File Type: sp Get Plugin or Get Source (mindcontrol.sp - 1188 views - 23.4 KB)
File Type: smx mindcontrol.smx (12.0 KB, 1782 views)
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.

Last edited by friagram; 07-18-2014 at 22:07. Reason: Updated
friagram is offline