AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [TF2] Hide Players (https://forums.alliedmods.net/showthread.php?t=143191)

GNCMatt 11-15-2010 19:41

[TF2] Hide Players
 
6 Attachment(s)
Hide Players
Hide player models, projectiles, and sounds. Useful for skill maps.


Description:
This plugin is designed for Jump Servers. It lets clients hide all other players from their screen, which is quite useful when playing skill maps in crowded areas, plus you also can't be bumped by other players while hide is enabled so it feels like you are playing alone.


Command List:

sm_hide - Toggles hide on yourself.
sm_hide_reload - [Admin Command] Run this command if you reload the plugin while players are in the server.

CVAR List:
sm_hide_explosions <0/1> (Default: 1) - Hide Explosions Globally. 1 = Hide Explosions, 0 = Don't Hide Explosions


Dependencies:
SDK Hooks


Special Thanks:
All the jumpers that helped beta test.


Known Issues:
  • As far as I can tell there is no way to disable explosions on a per-person basis. So there is an included cvar "sm_hide_explosions" (defaulted to hide explosions) that will disable all explosions for everyone.
  • Removes more sounds then it probably should.

Other Notes:
  • Haven't worked on this for a while, I'm pretty sure it all works but please post bugs if you find them.
  • This plugin is designed for TF2, but it would probably work on other mods as well. The only TF2 specific parts I remember is a string array of entity names to be hidden, located at the top of the file. So if you wanted to use it on another mod you could probably just change that to the relevant entities.

Changelog:
v0.1.5 (2011-01-26)
* Minor bug fixes

v0.1.4 (2010-11-16)
* Minor bug fixes

v0.1.3 (2010-11-15)
* Initial public release

bl4nk 11-16-2010 04:19

Re: [TF2] Hide Players
 
PHP Code:

public Action:SoundHook(clients[MAXPLAYERS], &numClientsString:sample[PLATFORM_MAX_PATH], &entity, &channel, &Float:volume, &level, &pitch, &flags

Should probably be MAXPLAYERS+1.

And you should change this line:
PHP Code:

if(owner || owner MAXPLAYERS

to MaxClients to prevent any possible problems.

psychonic 11-16-2010 07:38

Re: [TF2] Hide Players
 
Quote:

Originally Posted by bl4nk (Post 1350449)
PHP Code:

public Action:SoundHook(clients[MAXPLAYERS], &numClientsString:sample[PLATFORM_MAX_PATH], &entity, &channel, &Float:volume, &level, &pitch, &flags

Should probably be MAXPLAYERS+1.

Though both MAXPLAYERS and MAXPLAYERS+1 will work (unless you try to access the 65th member), it's currently at a hardcoded 64 in callback listed in the inc to match the array passed from sdktools.
PHP Code:

pFunc->PushArray(players64SM_PARAM_COPYBACK); 

Code:
functag public Action:NormalSHook(clients[64], &numClients, String:sample[PLATFORM_MAX_PATH], &entity, &channel, &Float:volume, &level, &pitch, &flags);

GNCMatt 11-16-2010 10:20

Re: [TF2] Hide Players
 
Thanks for the suggestions.


Update

v0.1.4 (2010-11-16)
* Minor bug fixes

scopesp 01-24-2011 11:11

Re: [TF2] Hide Players
 
thanks ;)

get this spamed in logs :(

L 01/25/2011 - 22:34:32: [SM] Plugin encountered error 15: Array index is out of bounds
L 01/25/2011 - 22:34:32: [SM] Displaying call stack trace for plugin "hide.smx":
L 01/25/2011 - 22:34:32: [SM] [0] Line 64, hide.sp::SoundHook()

GNCMatt 01-26-2011 15:19

Re: [TF2] Hide Players
 
Well, I'm not sure what caused that, so I just added some range checks to try to catch anything out of bounds...


Update

v0.1.5 (2011-01-26)
* Minor bug fixes

GNCMatt 01-26-2011 15:23

Re: [TF2] Hide Players
 
2 Attachment(s)
Someone requested a version that doesn't remove sound.

v0.1.5.ns

scopesp 01-26-2011 15:47

Re: [TF2] Hide Players
 
thanks :)

psychonic 01-27-2011 08:05

Re: [TF2] Hide Players
 
@ GNCMatt

Code:
AddNormalSoundHook(NormalSHook:SoundHook); AddTempEntHook("TFExplosion", TEHook:TEHookTest);

Harmless, but you don't need to tag SoundHook and TEHookTest here. The tags are only in the native's declaration to force you to use functions of those types as parameters (which you are).

Negratius 06-26-2014 19:55

Re: [TF2] Hide Players
 
Plugin not working anymore

Can anyone check this please?


All times are GMT -4. The time now is 08:07.

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