Raised This Month: $ Target: $400
 0% 

[ANY] Distance Target Filters


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author
SoulSharD
Member
Join Date: Oct 2013
Location: United Kingdom
Plugin ID:
4141
Plugin Version:
1.1.0
Plugin Category:
Admin Commands
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Allows you to target players within a specifc distance.
    Old 03-25-2014 , 16:30   [ANY] Distance Target Filters
    Reply With Quote #1

    Description:

    This plugin will allow you to target players within a specified distance from YOU and including YOU. This plugin contains both opposite and non-opposite targeting filters. (@distance and @!distance)

    This plugin was only test on TF2, though it should work on other games. Please let me know if it doesn't.

    I sincerely apologize if another plugin like this already exists.

    Cvars:

    • sm_distancetarget_version - Displays the current version of the plugin.
    • sm_distancetarget_self - Determine whether or not distance targeting includes yourself. 0/1 (def. 0)


    Commands:

    • sm_setdistance <distance> - This will set the distance argument for the filter. You must set this before using the filter. All distances are in Hammer Units which are considered as inches. (Which are poorly accurate.) However, after playing with it you'll soon get the feel of the measurements. [All admins with GENERIC access can use this.]
    The command is also custom to all admins. (i.e. you don't share the same distance value.)

    Filter Examples:


    Code:
    1#:
    
    sm_setdistance 512
    sm_slay @distance
    
    // Anybody that was within 512 units from you is now dead.
    // INCLUDING YOU.
    
    2#:
    
    sm_setdistance 512
    sm_slay @!distance
    
    // Anybody that wasn't within 512 units from you is now dead.
    
    3#:
    
    sm_setdistance 0
    sm_slay @distance
    
    // This will only target you because you're the only one that's 0 units away from yourself.
    // In this case, use: '@me'.
    
    4#:
    
    sm_setdistance 0
    sm_slay @!distance
    
    // This will kill everyone.
    // In this case, use: '@all'.


    Installation:
    1. Download the below 'filterdistance.smx' file. (Click: Get Plugin.)
    2. Paste the 'filterdistance.smx' file into: addons/sourcemod/plugins
    3. Load the plugin using your preferred methods. (Restart or command.)
    Changelog:
    • 25/03/2014 - 1.0.0: Initial Release
    • 25/03/2014 - 1.0.1: Added changes suggested by ddhoward
    • 25/03/2014 - 1.0.2: Added changes suggested by ddhoward and Mitchell
    • 11/04/2015 - 1.1.0: Added a CVAR to prevent self-targeting.


    Attached Files
    File Type: sp Get Plugin or Get Source (filterdistance.sp - 707 views - 2.1 KB)
    __________________


    Last edited by SoulSharD; 04-11-2015 at 09:46.
    SoulSharD is offline
     



    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 22:00.


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