Raised This Month: $78 Target: $400
 19% 

[TF2] Hide Players


Post New Thread Reply   
 
Thread Tools Display Modes
Author
GNCMatt
Member
Join Date: Apr 2009
Plugin ID:
2079
Plugin Version:
0.1.5
Plugin Category:
Fun Stuff
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
    88 
    Plugin Description:
    Hide player models, projectiles, and sounds. Useful for skill maps.
    Old 11-15-2010 , 19:41   [TF2] Hide Players
    Reply With Quote #1

    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
    Attached Files
    File Type: sp Get Plugin or Get Source (hide.sp - 431 views - 4.5 KB)
    File Type: smx hide.smx (5.0 KB, 462 views)
    __________________

    Last edited by GNCMatt; 01-26-2011 at 15:18. Reason: Update v0.1.5
    GNCMatt is offline
    bl4nk
    SourceMod Developer
    Join Date: Jul 2007
    Old 11-16-2010 , 04:19   Re: [TF2] Hide Players
    Reply With Quote #2

    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.
    bl4nk is offline
    psychonic

    BAFFLED
    Join Date: May 2008
    Old 11-16-2010 , 07:38   Re: [TF2] Hide Players
    Reply With Quote #3

    Quote:
    Originally Posted by bl4nk View Post
    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);
    psychonic is offline
    GNCMatt
    Member
    Join Date: Apr 2009
    Old 11-16-2010 , 10:20   Re: [TF2] Hide Players
    Reply With Quote #4

    Thanks for the suggestions.


    Update

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

    Last edited by GNCMatt; 11-16-2010 at 13:29.
    GNCMatt is offline
    scopesp
    Senior Member
    Join Date: Jan 2009
    Location: Munich
    Old 01-24-2011 , 11:11   Re: [TF2] Hide Players
    Reply With Quote #5

    thanks ;)

    get this spamed in logs

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

    Last edited by scopesp; 01-26-2011 at 14:54.
    scopesp is offline
    GNCMatt
    Member
    Join Date: Apr 2009
    Old 01-26-2011 , 15:19   Re: [TF2] Hide Players
    Reply With Quote #6

    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 is offline
    GNCMatt
    Member
    Join Date: Apr 2009
    Old 01-26-2011 , 15:23   Re: [TF2] Hide Players
    Reply With Quote #7

    Someone requested a version that doesn't remove sound.

    v0.1.5.ns
    Attached Files
    File Type: sp Get Plugin or Get Source (hide.sp - 324 views - 4.0 KB)
    File Type: smx hide.smx (4.7 KB, 98 views)
    __________________
    GNCMatt is offline
    scopesp
    Senior Member
    Join Date: Jan 2009
    Location: Munich
    Old 01-26-2011 , 15:47   Re: [TF2] Hide Players
    Reply With Quote #8

    thanks
    scopesp is offline
    psychonic

    BAFFLED
    Join Date: May 2008
    Old 01-27-2011 , 08:05   Re: [TF2] Hide Players
    Reply With Quote #9

    @ 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).

    Last edited by psychonic; 11-18-2011 at 10:16. Reason: derp... context is a bitch
    psychonic is offline
    Negratius
    Member
    Join Date: Feb 2013
    Location: São Paulo, Brasil
    Old 06-26-2014 , 19:55   Re: [TF2] Hide Players
    Reply With Quote #10

    Plugin not working anymore

    Can anyone check this please?
    Negratius is offline
    Send a message via MSN to Negratius
    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 11:14.


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