Raised This Month: $32 Target: $400
 8% 

Aim Names (v0.8)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
retsam
Veteran Member
Join Date: Aug 2008
Location: so-cal
Plugin ID:
1387
Plugin Version:
0.8
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    330 
    Plugin Description:
    Shows enemy names when crosshair is placed on them.
    Old 01-06-2010 , 00:03   Aim Names (v0.8)
    Reply With Quote #1

    Aim Names ( 0.8 )


    This is a little plugin that was a request from someone in the IRC chan.

    Description: This is a fairly simple plugin. It just shows names of enemies you place your crosshair on(and health for admins). The plugin uses client prefs and allows players to change the settings for themselves. Screenshots are located at the bottom.


    Installation/USE: Config is auto-created(plugin.aimnames.cfg) All cvars are in this config. Place .smx into the plugins folder(duh)! Type !settings for the client prefs menu. It allows you to enable/disable the hudtext and change colors. For admins there is also a health entry added to the menu, it will not show up for non-admins. All the client prefs settings are saved.

    Cvars:
    sm_aimnames_enabled "1" //Enable/Disable aim names plugin (1/0 = yes/no)
    sm_aimnames_adminonly "0" //Enable/Disable plugin for admins only.
    sm_aimnames_flag "d" //Default: d Admin flag(s) to use if admin only.
    sm_aimnames_color "0" //Default color for hudtext. (0 = red, 1 = orange, 2 = yellow, 3 = green, 4 = blue)
    sm_aimnames_health "1" //Enable/Disable admins viewing players health.
    sm_aimnames_holdtime "0.4" //(Default: 0.4) The hudtext number of seconds to hold/refresh the text. You might need to experiment with this to figure out exactly what it does.
    sm_aimnames_distance "100.0" //(Default: 100) Distance in meters for showing aim names.
    sm_aimnames_timerinterval "0.3" //(Default: 0.3) Repeat timer interval. Time in seconds between execing the timer function.


    Known Issues: Well, unfortunately I do not know how to make the aiming function obey walls on maps. This means to a degree you can place your crosshair on walls and possibly locate enemies behind walls in line of sight. Just something I wanted people to be aware of. If anyone knows how to fix that lmk. (FIXED!)


    Games: This plugin should work in the below listed games, however I have only tested it in Age of Chivalry and TF2.

    Games Supporting hudtext:
    -TF2
    -Age of Chivarly
    -hl2mp
    -insurgency
    -zombie_master
    -sourceforts
    -obsidian
    -bg2

    Changelog:

    Code:
    2/16/10 - v0.8 - Changed the client pref cookie for health from being disabled by default, to enabled by default.
    
    1/23/10 - v0.7 - Fixed issue with showing names while in spectate.
    
    1/23/10 - v0.6 - Added cvar for the timer interval. I did this for the sake of control so admins can set the timer interval to what they want, instead of what I had decided.
    
    1/17/10 - v0.5 - Added cvars for distance and for the hudtext hold/refresh time. Lowered the default values a bit, I thought they were way too high for default distance.
    
    1/13/10 - v0.4 - Multi-game support added. Now "should" work in handful of games/mods, though untested. Fixed issue of being able to track players names through walls by removing GetClientAimTargetmethod and replacing with(Thanks again to Antihasys) CanSeeTarget code.
    
    1/12/10 - v0.3 - Complete recode(Much thanks to Antithasys!). Now uses client prefs. Players can enable/disable the plugin and/or set their own personal color settings now. Optional cvar for admin only. Also added health being displayed for admins only, also with a cvar.  Changed distance to 2000 instead of 1000(unsure of what this should be set to yet).
    
    1/6/10 - v0.2 - Fixed showing names of cloaked/disguised spies. Lowered timer interval slightly.
    
    1/5/10 - v0.1 - Initial release.

    Credits:
    Much thanks to Antithasys for helping recode and optimize the plugin making it 10x better!


    Any issues or suggestions, lmk.
    Attached Thumbnails
    Click image for larger version

Name:	aimnames1.jpg
Views:	6358
Size:	10.1 KB
ID:	57578   Click image for larger version

Name:	aimnames2.jpg
Views:	4351
Size:	15.3 KB
ID:	57579   Click image for larger version

Name:	aimnames3.jpg
Views:	4062
Size:	20.6 KB
ID:	57580   Click image for larger version

Name:	aimnames4.jpg
Views:	3033
Size:	12.6 KB
ID:	57581  
    Attached Files
    File Type: sp Get Plugin or Get Source (aimnames.sp - 9244 views - 23.2 KB)

    Last edited by retsam; 02-27-2010 at 05:18. Reason: new version
    retsam is offline
    h00x
    Senior Member
    Join Date: Jun 2009
    Old 01-06-2010 , 00:19   Re: [TF2] Aim Names
    Reply With Quote #2

    This is a pretty good idea as playing as admin and in game its hard to tell who's who until they kill you or you kill them, how about an admin only cvar?

    I haven't yet, but I'm getting ready to test. Does cloaked/invis spys show up?

    Knowing the clients HP level/status would be nice and maybe a cvar to enable/disable it.

    Last edited by h00x; 01-06-2010 at 00:28.
    h00x is offline
    retsam
    Veteran Member
    Join Date: Aug 2008
    Location: so-cal
    Old 01-06-2010 , 00:22   Re: [TF2] Aim Names
    Reply With Quote #3

    Grrrrr. I suppose I didnt even think of spies... : /

    That means ill have to get the conditions of spies, cloaked, and disguised...
    retsam is offline
    h00x
    Senior Member
    Join Date: Jun 2009
    Old 01-06-2010 , 00:48   Re: [TF2] Aim Names
    Reply With Quote #4

    Quote:
    Originally Posted by retsam View Post
    Grrrrr. I suppose I didnt even think of spies... : /

    That means ill have to get the conditions of spies, cloaked, and disguised...

    Yeah, it shows the spys... Its not to bad because of the timer, you're likely to miss the spy anyways and not see his name pop up in time.

    I found it better lowering the display timer though because some players move so fast the name wasn't showing up. I also set the distance to 100000 so I can look across a wide open maps. Seems to work pretty good, Great job!

    As for one last idea, it wouldn't hurt to be able to tell what buildings belong to who on the enemy's team aswell. Just an idea.
    h00x is offline
    retsam
    Veteran Member
    Join Date: Aug 2008
    Location: so-cal
    Old 01-06-2010 , 01:12   Re: [TF2] Aim Names
    Reply With Quote #5

    I dont know. I think it would be kinda cheap to be able to look at corners and crap to easily detect spies or disguised teammates. Im trying to fix it. For some reason, the conditions dont seem to be working. I thought they were 16,20,24, but im not having much luck.

    I was thinking of a distance cvar but I havnt done one yet. The problem is, is you can "scan" the walls in maps to possibly see if people are behind them, thats kind of the reason I was limiting it.

    I didnt think there was much of a reason to be able to see the entire map.

    EDIT:
    Im too tired. Ill have to look at it tomorrow. As for now, yes you can see disguised and cloaked spies... : /

    Last edited by retsam; 01-06-2010 at 01:38.
    retsam is offline
    h00x
    Senior Member
    Join Date: Jun 2009
    Old 01-06-2010 , 01:42   Re: [TF2] Aim Names
    Reply With Quote #6

    Quote:
    Originally Posted by retsam View Post
    I dont know. I think it would be kinda cheap to be able to look at corners and crap to easily detect spies or disguised teammates. Im trying to fix it. For some reason, the conditions dont seem to be working. I thought they were 16,20,24, but im not having much luck.

    I was thinking of a distance cvar but I havnt done one yet. The problem is, is you can "scan" the walls in maps to possibly see if people are behind them, thats kind of the reason I was limiting it.

    I didnt think there was much of a reason to be able to see the entire map.

    EDIT: Im too tired. Ill have to look at it tomorrow. As for now, yes you can see disguised and cloaked spies... : /
    I totally agree with you on open public use. I just plan to use it as an admin only feature. Anyways, I like it and will find it very useful, you did a great job.
    h00x is offline
    noodleboy347
    AlliedModders Donor
    Join Date: Mar 2009
    Old 01-06-2010 , 21:29   Re: [TF2] Aim Names
    Reply With Quote #7

    Poorly coded IMO. You just rewrote the timer 5 times, and the only thing that changed was the SetHudTextParams. Couldn't you check the cvar and change that to the correct value? It'd be a lot better. Oh and the timer time should be shorter, because currently it only picks up their names sometimes.
    noodleboy347 is offline
    DontWannaName
    Veteran Member
    Join Date: Jun 2007
    Location: VALVe Land, WA
    Old 01-06-2010 , 21:51   Re: [TF2] Aim Names
    Reply With Quote #8

    __________________

    DontWannaName is offline
    retsam
    Veteran Member
    Join Date: Aug 2008
    Location: so-cal
    Old 01-06-2010 , 23:04   Re: [TF2] Aim Names
    Reply With Quote #9

    Poorly coded? I did the timers like that because I was trying to avoid putting as much code under actual timer as possible. For speed and efficiency, this way it uses its own color timer based on the cvar, instead of having checks under the timer itself and having cvar checks, and a bunch of "else if" or "switch" statements.

    I dont know why youre crapping on my plugin, have you ever looked at your own coding in your plugins? heh..

    I made the timer longer on purpose. Obviously it could be shorter if I wanted it shorter. I was even using OnGameFrame to begin with. I didnt want it so it just shows everyones names if you made quick mouse movements. I wanted it more slower so you had to focus crosshair on them slightly longer. I mean, duh, think about it, there must have been a reason I used 0.4 instead of 0.1..... Obviously I could easily make it 0.1 if I wanted to.

    This was just a quick little plugin I did in about an hour for a guys request in the IRC chan.

    Last edited by retsam; 01-07-2010 at 06:18.
    retsam is offline
    retsam
    Veteran Member
    Join Date: Aug 2008
    Location: so-cal
    Old 01-07-2010 , 01:41   Re: [TF2] Aim Names
    Reply With Quote #10

    V0.2 added. Fixed the whole spy issue. Lowered timer interval slightly.
    retsam 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 16:50.


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