Raised This Month: $ Target: $400
 0% 

Protect admin against awp sniper


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BoBzY
AlliedModders Donor
Join Date: Aug 2010
Location: Bruxelles
Old 09-20-2011 , 18:57   Protect admin against awp sniper
Reply With Quote #1

hello,

is there anyway to turn admin 'invisible' against awp?

I mean, if someone zoom one admin, he see nothing ^^

ty
BoBzY is offline
TnTSCS
AlliedModders Donor
Join Date: Oct 2010
Location: Undisclosed...
Old 09-20-2011 , 20:01   Re: Protect admin against awp sniper
Reply With Quote #2

hmm... making the player invisible is a bit beyond me... you could make admins immune to damage from AWPs though - that would be easy enough to do using SDKHooks and possibly w/o sdkhooks
TnTSCS is offline
BoBzY
AlliedModders Donor
Join Date: Aug 2010
Location: Bruxelles
Old 09-20-2011 , 20:24   Re: Protect admin against awp sniper
Reply With Quote #3

Quote:
Originally Posted by TnTSCS View Post
hmm... making the player invisible is a bit beyond me... you could make admins immune to damage from AWPs though - that would be easy enough to do using SDKHooks and possibly w/o sdkhooks
I know how to protect against damage, but I wont, I just want them invisible (only against zoom) ^^

If its not possible, Ill do another thing

thanks for fast reply anyway dude
BoBzY is offline
TnTSCS
AlliedModders Donor
Join Date: Oct 2010
Location: Undisclosed...
Old 09-20-2011 , 20:25   Re: Protect admin against awp sniper
Reply With Quote #4

I'm not saying it's not possible... just that I don't know how... so I'm eager to see how this thread turns out
TnTSCS is offline
H0tt0r
SourceMod Donor
Join Date: Aug 2011
Old 09-21-2011 , 07:48   Re: Protect admin against awp sniper
Reply With Quote #5

as far is i know you can not make a player invisible to a spezific player in CSS in TF2 i should be possible same as the cloak effekt ... but in css you can only hide someone from EVERYONE... you could do 2 things..:
1: hide every admin if ANY player from the other team ZOOM...
2: check for visible enemy admins if someone Zoom in and hide them as long as he zoom or FOR x secs and then recheck...

no 1 -> alpha ( SetEntityRenderColor(entity, r=255, g=255, b=255, a=255) (the a = alpha ...)
no 2 -> no1 + TR_TraceRayFilterEx + TR_DidHit
no 3 -> sucks but work^^ ... no2 + make a custom spirit or use an fitting existing one and draw it infront of the admin (on enemy zoom... it do not realy protect him cause the middle of the spirit should be quiet obvious but he is hidde

ps: no3 -> troll
H0tt0r is offline
Monkeys
Veteran Member
Join Date: Jan 2010
Old 09-21-2011 , 12:02   Re: Protect admin against awp sniper
Reply With Quote #6

Using SDKHooks' SetTransmit, you can make him invisible to the player.
Then simply hook the AWP's zoom. (I don't play/code for css, so I have no clue how this happens)

I'm guessing it's a datafield in the awp's entity.
If so, check it in onplayerruncmd and store it in a global bool, and store who to hide after they've connected using GetAdminFlag(entity, /* whatever flag here */).
Then use that bool inside the settransmit hook like so:

Code:
public Action:SetTransmit(entity, Client)
{
    if( entity < MaxClients && isZoomed[Client] && isAdmin[entity])
        return Plugin_Handled;
    else
        return Plugin_Continue;
}
The reason I'd check if the player is zoomed && admin outside the transmit hook is because it loads a LOT. And those callbacks would thus happen a lot too.
__________________
Get a lid on that zombie,
he's never gonna be alri-i-ight.
Oooh get a lid on that zombie,
or he's gonna feed all night.

Last edited by Monkeys; 09-21-2011 at 12:11.
Monkeys is offline
Antithasys
Moderator
Join Date: Apr 2008
Old 09-21-2011 , 12:12   Re: Protect admin against awp sniper
Reply With Quote #7

Monkeys beat me to it. See above ^
__________________
[my plugins]

When you think about asking a question... consider what have you tried?
Antithasys is offline
Reply



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 20:11.


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