Pseudocode:
Code:
//Plugin Init
Register hook entity touch
//Hook start function
Create hook entity
Set hook entity properties (movetype, solid, owner, etc.)
Create TE_BEAMENTS (trail) message from owner to hook
Use velocity_by_aim to set velocity for hook
//Hook touch function
If entity is valid player,
If player is owner
Remove the hook entity
Else
set velocity on player towards hook's owner
Set velocity on hook towards owner