AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Seeing through smoke (https://forums.alliedmods.net/showthread.php?t=194273)

Liverwiz 08-26-2012 17:33

Seeing through smoke
 
Is there a way to allow a client to see through smoke grenades that have exploded?

Or an easy way to remove sprites for a single person via a mod?

Arkshine 08-26-2012 18:02

Re: Seeing through smoke
 
Without slowhack (there is probably some client cvar which could be useful for that), I doubt it's possible since the smoke is handled client-side.

Liverwiz 08-26-2012 18:07

Re: Seeing through smoke
 
Is it not possible to display a specific global sprite to players?

i.e. an "empty" smoke sprite is used by clients with this enabled, the others just see regular smoke?
or is the sprites not able to be handled like that?

matsi 08-26-2012 18:18

Re: Seeing through smoke
 
Quote:

Originally Posted by Liverwiz (Post 1783684)
Is it not possible to display a specific global sprite to players?

i.e. an "empty" smoke sprite is used by clients with this enabled, the others just see regular smoke?
or is the sprites not able to be handled like that?

I recommended that but deleted the post.

See this:
http://forums.alliedmods.net/showthread.php?t=94772

Arkshine 08-26-2012 18:18

Re: Seeing through smoke
 
It may have actually a way. When you throw a smoke grenade, an event is sent with PLAYBACK_EVENT_FULL for all players. I guess you could block the original call, and sending a new PLAYBACK_EVENT_FULL but this time with per player and not send to the wanted player.

Liverwiz 08-26-2012 18:42

Re: Seeing through smoke
 
Quote:

Originally Posted by matsi (Post 1783695)
I recommended that but deleted the post.

See this:
http://forums.alliedmods.net/showthread.php?t=94772

That seems to just display a certain sprite to the world, not certain players. I'm looking to do this for like a shop plugin sort of thing. So you have the ability to see through smoke.

Quote:

Originally Posted by Arkshine (Post 1783696)
It may have actually a way. When you throw a smoke grenade, an event is sent with PLAYBACK_EVENT_FULL for all players. I guess you could block the original call, and sending a new PLAYBACK_EVENT_FULL but this time with per player and not send to the wanted player.

Could you point me in any direction to figure that out? As of now i'm pretty lost as to PLAYBACK_EVENT_FULL. furst time i've heard it.

Arkshine 08-26-2012 19:02

Re: Seeing through smoke
 
Here some code from cssdk :

Spoiler


PLAYBACK_EVENT_FULL is just a macro for pfnPlaybackEvent ; so you can hook/call with FM_PlaybackEvent/EngFunc_PlaybackEvent.

All you need to do, is to hook the function at the right time, supercede it, and calling PlayBackEvent for all players except the one you want. First and second params are for flags/invoker. Guess you have to use FEV_HOSTONLY. (hlds_sdk.inc)

Well, test & see.

Liverwiz 08-26-2012 20:09

Re: Seeing through smoke
 
Much thanks, Arkshine!
I'll throw together some code and report back when i get a chance.


All times are GMT -4. The time now is 05:44.

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