Raised This Month: $7 Target: $400
 1% 

[L4D] HideHUDOnVomit (Blind Luck)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
grandwazir
Senior Member
Join Date: Jan 2009
Plugin ID:
752
Plugin Version:
1.1.1
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    43 
    Plugin Description:
    This mod hides a survivor's HUD when they are vomitted on.
    Old 02-03-2009 , 02:30   [L4D] HideHUDOnVomit (Blind Luck)
    Reply With Quote #1

    What does it do?

    Have you noticed that your friends don't seem to have massive blue name plates above their heads? Isn't it annoying when survivors can just see through a boomer's vomit?


    This plug-in has the answer. Blind Luck allows server administrators to temporarily remove part of a player's HUD to help simulate blindness. The majority of the HUD is removed except for weapon selection, the cross hair and chat area. While a survivor is blinded the health bars and name plates of other players are unavailable.

    How do I use it?

    Simply upload it and enjoy. Currently there are no in game commands although the mod is configurable through two ConVars. You can either choose to hide the HUD until the player is completely free of the vomit
    , or only hide it for a specified time:-
    • bl_hide_until_dry: If true the mod will hide a player's UI until they are completely free of vomit.
    • bl_time: The amount of time to blind a player for if bl_hide_until_dry is false. Has no effect if bl_hide_until_dry is true.
    • bl_hud_to_apply: The bitmask to provide to hide_hud command. You can use this to hide whatever you like.
    Sounds great! But is there anything wrong with it?

    Not any more!
    Thanks to olj and doku, we have worked out away to hide the HUD without spoofing sv_cheats. The new version has none of the limitations of the old one.

    Last, but by no means least, The all knowing change log

    Code:
    * Version 1.0
    *         - Initial release.
    * Version 1.0.1
    *         - Now works with sv_cheats off (thanks TESLA-X4 for the idea).
    * Version 1.0.2
    *         - Fixed the two ConVars so they no longer cause error messages in client consoles when connecting.
    *         - Corrected some spelling mistakes in the comments that were bugging me.
    * Version 1.0.3
    *         - Fixed ArrayOutOfBounds error.
    *         - Seperated Blind Luck configuation into cfg/sourcemod/plugin.blindluck
    * Version 1.1.0
    *         - No longer requires the spoofing of sv_cheats. This gets rid of the client messages.
    *         - Added ConVar 'bl_hud_to_apply' to allow administrators to decide which parts of the HUD to hide.
    *         - Event 'player_no_longer_it' is now unhooked when it is not needed. 
    *         - Added minimum and maximum values to 'bl_blind_time'. The maximum time is 25 seconds with the minimum being 5 seconds.
    *         - Now compiles without indentation warnings.
    * Version 1.1.1
    *         - Fixed error message being logged whenrestoring the HUD on some entities.
    Attached Files
    File Type: sp Get Plugin or Get Source (blindluck.sp - 5078 views - 4.6 KB)
    __________________

    Last edited by grandwazir; 06-18-2010 at 13:13. Reason: released 1.1.1
    grandwazir is offline
    djromero
    Senior Member
    Join Date: Dec 2008
    Location: Maracaibo, Venezuela
    Old 02-03-2009 , 05:15   Re: [L4D] HideHUDOnVomit (Blind Luck)
    Reply With Quote #2

    Just rewrite the following function like this:

    Code:
    StripAndExecuteClientCommand(client, const String:command[], param) {
        
        // Removes sv_cheat flag from command
        new flags = GetCommandFlags(command);
        SetCommandFlags(command, flags & ~FCVAR_CHEAT);
        
        ClientCommand(client, "%s %d", command, param)
        
        // Restore sv_cheat flag on command
        SetCommandFlags(command, flags);
    
    }
    Now it won't require sv_cheats.

    I took the liberty of posting the fixed plugin:
    Attached Files
    File Type: sp Get Plugin or Get Source (blindluck.sp - 2671 views - 3.5 KB)
    __________________
    David Romero


    djromero is offline
    fr3akY
    Junior Member
    Join Date: Aug 2007
    Old 02-03-2009 , 05:34   Re: [L4D] HideHUDOnVomit (Blind Luck)
    Reply With Quote #3

    Nice plugin i tested it and it works perfectly without sv_cheats 1

    Thx ^^
    fr3akY is offline
    grandwazir
    Senior Member
    Join Date: Jan 2009
    Old 02-03-2009 , 06:47   Re: [L4D] HideHUDOnVomit (Blind Luck)
    Reply With Quote #4

    I tried doing exactly that last night and the bloody thing would not work, I've tried your fix on my server and it still does not hide the HUD claiming sv_cheats is not on. It is odd it works for fr3aky and yourself but not for me

    Something in my server.cfg maybe?
    grandwazir is offline
    djromero
    Senior Member
    Join Date: Dec 2008
    Location: Maracaibo, Venezuela
    Old 02-03-2009 , 11:59   Re: [L4D] HideHUDOnVomit (Blind Luck)
    Reply With Quote #5

    Quote:
    Originally Posted by grandwazir View Post
    I tried doing exactly that last night and the bloody thing would not work, I've tried your fix on my server and it still does not hide the HUD claiming sv_cheats is not on. It is odd it works for fr3aky and yourself but not for me

    Something in my server.cfg maybe?
    Nope, i don't think so, but if you have Kigen's Anti-cheat (or any other like it), this won't work.

    If this is not the case, you could PM your server.cfg content (without passwords ;) ) and i'll give your a hand. A listing of your installed plugins will be usefull too.
    __________________
    David Romero



    Last edited by djromero; 02-03-2009 at 12:09.
    djromero is offline
    Big Myke
    Senior Member
    Join Date: Jan 2009
    Location: Grain Belt, USA
    Old 02-03-2009 , 12:56   Re: [L4D] HideHUDOnVomit (Blind Luck)
    Reply With Quote #6

    I cannot get it to work unless cheats are enabled ='( I've used your hot fix too dj. Man, it works like a charm with cheats enabled, hopefully I can get it to work with cheats off soon ;)
    Big Myke is offline
    djromero
    Senior Member
    Join Date: Dec 2008
    Location: Maracaibo, Venezuela
    Old 02-03-2009 , 13:32   Re: [L4D] HideHUDOnVomit (Blind Luck)
    Reply With Quote #7

    Quote:
    Originally Posted by Big Myke View Post
    I cannot get it to work unless cheats are enabled ='( I've used your hot fix too dj. Man, it works like a charm with cheats enabled, hopefully I can get it to work with cheats off soon ;)
    Hum, weird. Sure you don't have any anti-cheat plugin installed on your server??? For instance, Kigen's anti-cheat will hook (and stop) all commands that requieres sv_cheats at plugin startup, so even if you temporarily remove a command's flag later, the hook will be called and it won't allow the command to execute.
    __________________
    David Romero



    Last edited by djromero; 02-03-2009 at 13:41.
    djromero is offline
    Big Myke
    Senior Member
    Join Date: Jan 2009
    Location: Grain Belt, USA
    Old 02-03-2009 , 13:50   Re: [L4D] HideHUDOnVomit (Blind Luck)
    Reply With Quote #8

    I placed the anti cheat in the disabled folder. Is there more that I need to do to disable the anti cheat? I can enable sv_cheats and the pluggin will work.

    Update: I've removed additional pluggins and only had your hotfix pluggin enabled, DJ and it still does not work with sv_cheats set to 0

    Last edited by Big Myke; 02-03-2009 at 15:47.
    Big Myke is offline
    Fyren
    FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren
    Join Date: Feb 2106
    Old 02-03-2009 , 18:32   Re: [L4D] HideHUDOnVomit (Blind Luck)
    Reply With Quote #9

    Running an otherwise-default server with sv_cheats on is not safe. Using KAC may allow you to safely run with sv_cheats on (I haven't looked at it), but then your plugin apparently won't work anyway.
    Fyren is offline
    Sammy-ROCK!
    Senior Member
    Join Date: Jun 2008
    Location: Near Mrs.Lag
    Old 02-03-2009 , 19:20   Re: [L4D] HideHUDOnVomit (Blind Luck)
    Reply With Quote #10

    Quote:
    Originally Posted by djromero View Post
    Just rewrite the following function like this:

    Code:
    StripAndExecuteClientCommand(client, const String:command[], param) {
        
        // Removes sv_cheat flag from command
        new flags = GetCommandFlags(command);
        SetCommandFlags(command, flags & ~FCVAR_CHEAT);
        
        ClientCommand(client, "%s %d", command, param)
        
        // Restore sv_cheat flag on command
        SetCommandFlags(command, flags);
    
    }
    Now it won't require sv_cheats.

    I took the liberty of posting the fixed plugin:
    This code wouldn't work unless you use FakeClientCommand.
    Just because ClientCommand makes the command in client's console while FakeClientCommand simulates the command as the client did in the same frame. FakeClientCommandEx simulates like FakeClientCommand but in the next frame.
    Sammy-ROCK! 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 22:49.


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