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

Target glow


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Gameplay        Approver:   Exolent[jNr] (178)
TheRadiance
Senior Member
Join Date: Nov 2007
Location: Kazakhstan
Old 03-17-2009 , 07:37   Target glow
Reply With Quote #1

I used the "search" button, but couldn't find similiar plugin, sorry if plugin allready exists

Description:
While a player (any player) aims at another player (target), target will glow only for aimer (glow color depends on team. CT - blue, T - red), and when a player stops aiming, glow will instantly removed .
Used AddToFullPack method.

Modules:
fakemeta
Attached Files
File Type: sma Get Plugin or Get Source (target_glow.sma - 3928 views - 1.1 KB)

Last edited by TheRadiance; 03-30-2009 at 01:44.
TheRadiance is offline
Send a message via ICQ to TheRadiance
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-17-2009 , 08:12   Re: Target glow
Reply With Quote #2

You should use static because it's called quite often.

About the fade, it doesn't appear for me at all. Glow is removed instantly when stop aiming.

Also I was wondering if it's not better to get the last hit (TR_pHit ) in FM_TraceLine instead of using get_user_aiming().
Arkshine is offline
beckham9224
Senior Member
Join Date: Feb 2009
Location: Asia, Mongolia
Old 03-17-2009 , 08:21   Re: Target glow
Reply With Quote #3

Quote:
Glow is removed instantly when stop aiming
Always?
beckham9224 is offline
TheRadiance
Senior Member
Join Date: Nov 2007
Location: Kazakhstan
Old 03-17-2009 , 08:32   Re: Target glow
Reply With Quote #4

Quote:
Glow is removed instantly when stop aiming

Always?
Yes.

Quote:
Also I was wondering if it's not better to get the last hit (TR_pHit ) in FM_TraceLine instead of using get_user_aiming().
Just tried FM_TraceLine, works, but not so instant like get_user_aiming(..) in function..

Last edited by TheRadiance; 03-17-2009 at 08:57.
TheRadiance is offline
Send a message via ICQ to TheRadiance
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 03-17-2009 , 10:54   Re: Target glow
Reply With Quote #5

You basically issue get_user_aiming way too often because you do it on updating against every single player in the game (31 times at max) wich is not necessary if you rely on FM_TraceLine. Even if there is minor difference it should not be noticeable in most cases.
__________________
In Flames we trust!

Last edited by Nextra; 03-17-2009 at 15:46.
Nextra is offline
TheRadiance
Senior Member
Join Date: Nov 2007
Location: Kazakhstan
Old 03-17-2009 , 11:03   Re: Target glow
Reply With Quote #6

Quote:
You basically issue get_user_aiming way too often because you do it on updating against every single player in the game (31 times at max) wich is not necessary if you rely on FM_TraceLine. Even if there is minor difference it should not be noticeable in most cases.
ok, i'll change it to TraceLine. thx for suggest
TheRadiance is offline
Send a message via ICQ to TheRadiance
tuty
Veteran Member
Join Date: Jul 2008
Location: Romania
Old 03-17-2009 , 11:26   Re: Target glow
Reply With Quote #7

like in left 4 dead.. i had this idea a few days ago.. gg
__________________
All my lifetime work is there (includin private big ass plugins and stuff) https://github.com/tutyamxx

tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
TheRadiance
Senior Member
Join Date: Nov 2007
Location: Kazakhstan
Old 03-17-2009 , 11:30   Re: Target glow
Reply With Quote #8

Updated to 1.1:
- Added FM_TraceLine instead of get_user_aiming...
TheRadiance is offline
Send a message via ICQ to TheRadiance
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 03-17-2009 , 13:19   Re: Target glow
Reply With Quote #9

This check is now redundant since you already require the target alive in TraceLine forward:

PHP Code:
is_user_aliveent 
If you add

PHP Code:
else if( g_Glowid ] )
      
g_Glowid ] = 
at the end of TraceLine the only necessary check on AddToFullPack would be this:

PHP Code:
if ( !player || g_iGlowhost ] != ent )
      return 
FMRES_IGNORED 
__________________
In Flames we trust!

Last edited by Nextra; 03-17-2009 at 15:46.
Nextra is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-17-2009 , 13:28   Re: Target glow
Reply With Quote #10

In TraceLine, I would do only : g_iGlow[ id ] = get_tr2( trace, TR_pHit ); ; since you (should) filter with is_user_alive() in AddToFullPack.
Arkshine 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 19:39.


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