Raised This Month: $12 Target: $400
 3% 

[Any] Coordinate Printer


Post New Thread Reply   
 
Thread Tools Display Modes
Author
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Plugin ID:
4381
Plugin Version:
18.0114.0
Plugin Category:
Technical/Development
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    4 
    Plugin Description:
    Provides several commands to facilitate speedy retrieval of coordinates.
    Old 10-08-2014 , 16:24   [Any] Coordinate Printer
    Reply With Quote #1

    This plugin simply provides some basic commands that return coordinates, similar to the getpos or cl_showpos 1 commands. This plugin has some key differences, however. This plugin is aimed mainly toward plugin developers, or perhaps server admins who use plugins that need coordinates manually inserted into a config file.

    I made this because I was working for 3 different server communities, configuring about 17 total map-specific plugins, and I got REALLY tired of needing to constantly resize myself, make sure I wasn't accidentally in third person, etc.

    The commands are:
    • sm_coords, which prints the coordinates returned by the Sourcemod function GetClientAbsOrigin(). They approximately correspond to the location of the player's feet. These are the coordinates that you want to use if needing to teleport a player back to this exact position. This is *approximately* the same information provided by getpos and cl_showpos 1 if the player is both in first-person mode, AND has been sm_resize'd to near-zero.

    • sm_eyecoords, which prints the coordinates returned by GetClientEyePosition(). This is the location at which a theoretical hitscan bullet would be CREATED were the player to shoot RIGHT NOW. This is the same information provided by getpos and cl_showpos 1, but only if the player is in regular first-person mode. Where getpos and cl_showpos 1 seem to show incorrect information if the player is in third-person mode, this command is not affected by these modes.

    • sm_eyeangles, which prints the angles returned by GetClientEyeAngles(). This information is identical to the angles given by getpos and cl_showpos 1.

    • sm_absangles, which prints the angles returned by GetClientAbsAngles(). In TF2, this seems to be the literal angle at which your player model's body (his feet, not his head) seems to be facing.

    • sm_aimcoords, which provides the location of the solid point that the player is looking at. In this plugin, "solid" is defined as anything that would stop a hitscan bullet that isn't another player.

    • By appending "_hud" to the end of a given command, the information will be printed continuously to the HUD.

      • For example, "sm_coords_hud someOtherPlayer" would cause that player's coordinates to be shown on your screen and be continuously updated. You can dismiss the hud text by using one of these _hud commands a second time. For example, if you are currently viewing the eyeangles of a player named "Derek", then "sm_eyeangles_hud derek" would stop the printing.

      • In addition, using one of the _hud commands to target a user who doesn't exist (for example, by button mashing after typing the command name) will cause the hud text to be dismissed.

      • The color and position of the hud text can be controlled with the cvar sm_coordinatePrinter_hudtext. All information within the cvar should be separated by commas. By default, this cvar is set to "-1.0, 0.8, 0, 182, 0, 0" with the first number controlling where the text is horizontally, the second controlling vertical position, and the next four being the RGBA values. The position fields should both be set to something between 0.0 and 1.0 (inclusive); any other value will cause the text to be perfectly centered. In addition, the RGBA values should each be between 0 and 255 inclusive.

    • Each of these 10 commands supports targeting other players. Any command user with access to the override "sm_coordinates_targetothers" (default access is the 'cheats' flag) can indicate a target as the sole argument of the command. Any user who does not have access to the override will target themselves with the commands regardless of any arguments.

    The plugin requires custom includes. As such, it does not compile here on the forums. Includes required to compile the plugin are:The Updater plugin does NOT need to be installed for this plugin to function. If you do have Updater installed, integration with this plugin is controlled by the cvar sm_coordinates_updater. Information on this cvar can be found in the ddhoward_updater include.


    I eventually plan on providing support for specifying a custom trace mask for use in the sm_aimcoords command. Currently, the command uses MASK_SHOT. Also, please notify me if you find that one or more of the commands do not work on a particular game/mod.


    DOWNLOADS:


    If you like what you see here, please consider donating~
    __________________

    Last edited by ddhoward; 01-15-2018 at 02:08.
    ddhoward is offline
    SoulSharD
    Member
    Join Date: Oct 2013
    Location: United Kingdom
    Old 10-10-2014 , 08:41   Re: [Any] Coordinate Printer
    Reply With Quote #2

    Quote:
    Originally Posted by ddhoward View Post
    I made this because I'm working for 3 different server communities, configuring about 17 total map-specific plugins, and I got REALLY tired of needing to constantly resize myself, make sure I wasn't accidentally in third person, etc.
    FINALLY! Someone I can relate to!

    Though I actually work for 1, but have about 20 plugins that I use for our server. Most of them probably serve the same function. I'm poorly organized though.

    Plugin will definitely be useful, as I actually build my own maps with plugins that bring some interesting features to it.

    Like this for example.
    __________________

    SoulSharD is offline
    Sreaper
    髪を用心
    Join Date: Nov 2009
    Old 10-10-2014 , 13:47   Re: [Any] Coordinate Printer
    Reply With Quote #3

    Thank you for the plugin ddhoward.
    Quote:
    Originally Posted by SoulSharD View Post
    Plugin will definitely be useful, as I actually build my own maps with plugins that bring some interesting features to it.

    Like this for example.
    What is going on in that screenshot?

    Last edited by Sreaper; 10-10-2014 at 13:47.
    Sreaper is offline
    ddhoward
    Veteran Member
    Join Date: May 2012
    Location: California
    Old 10-10-2014 , 14:28   Re: [Any] Coordinate Printer
    Reply With Quote #4

    Next update will include some sort of glow indicator of where sm_aimcoords has hit. This will help to prevent any confusion on where the beam has stopped.
    __________________
    ddhoward is offline
    Chdata
    Veteran Member
    Join Date: Aug 2012
    Location: Computer Chair, Illinois
    Old 10-10-2014 , 14:51   Re: [Any] Coordinate Printer
    Reply With Quote #5

    It'd be cool if we could get sm_coords displayed and updating on the hud like cl_showpos

    not necessarily same font
    __________________

    Last edited by Chdata; 10-10-2014 at 14:52.
    Chdata is offline
    SoulSharD
    Member
    Join Date: Oct 2013
    Location: United Kingdom
    Old 10-10-2014 , 15:08   Re: [Any] Coordinate Printer
    Reply With Quote #6

    Quote:
    Originally Posted by Sreaper View Post
    What is going on in that screenshot?
    Shows the actual time.

    Sure you could simply look at the time elsewhere. I just like doing these neat little things.
    __________________

    SoulSharD is offline
    ddhoward
    Veteran Member
    Join Date: May 2012
    Location: California
    Old 10-10-2014 , 15:17   Re: [Any] Coordinate Printer
    Reply With Quote #7

    Quote:
    Originally Posted by Chdata View Post
    It'd be cool if we could get sm_coords displayed and updating on the hud like cl_showpos
    how on earth did i not think of this myself

    I will be experimenting with this. I believe that Dr. McKay has made available a really easy way of setting this up. Looks like I'll be borrowing yet another major feature of a plugin of mine from him. ;)
    __________________
    ddhoward is offline
    Chdata
    Veteran Member
    Join Date: Aug 2012
    Location: Computer Chair, Illinois
    Old 10-10-2014 , 18:11   Re: [Any] Coordinate Printer
    Reply With Quote #8

    I was just thinking to use ShowSyncHudText()

    unless there's a way to get smaller text without using csay msay hsay
    __________________
    Chdata is offline
    ddhoward
    Veteran Member
    Join Date: May 2012
    Location: California
    Old 10-10-2014 , 21:00   Re: [Any] Coordinate Printer
    Reply With Quote #9

    I was hoping to use the same dialog that sm_tsay uses, but you can't customize how long the message stays up there, and once a message is up there, you have to wait until it expires to put up another one.

    I remember ShowSyncHudText to be a lot more complicated than it is now. Perhaps I last looked at it when I had no idea what I was doing. Further, my memory of a snippet making the job easier probably stemmed from this post: https://forums.alliedmods.net/showth...75#post1792475
    __________________
    ddhoward is offline
    Chdata
    Veteran Member
    Join Date: Aug 2012
    Location: Computer Chair, Illinois
    Old 10-12-2014 , 05:35   Re: [Any] Coordinate Printer
    Reply With Quote #10

    dunno I always copy out of VSH's code for setting hudtext up lol
    __________________
    Chdata is offline
    Reply


    Thread Tools
    Display Modes

    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 13:43.


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