Raised This Month: $51 Target: $400
 12% 

[L4D] HideHUDOnVomit (Blind Luck)


Post New Thread Reply   
 
Thread Tools Display Modes
Big Myke
Senior Member
Join Date: Jan 2009
Location: Grain Belt, USA
Old 02-03-2009 , 19:27   Re: [L4D] HideHUDOnVomit (Blind Luck)
Reply With Quote #11

Do you have a solution Sammy or anyone?

Last edited by Big Myke; 02-03-2009 at 19:57.
Big Myke is offline
TESLA-X4
Senior Member
Join Date: Dec 2008
Location: $Recycle.Bin
Old 02-03-2009 , 21:54   Re: [L4D] HideHUDOnVomit (Blind Luck)
Reply With Quote #12

How about making use of the SendConVarValue method to make the client think that sv_cheats are on? (just remember to reset it later or the client will be able to run other commands like mat_wireframe)

I'm not sure if KAC will start banning the clients for that though...

Last edited by TESLA-X4; 02-03-2009 at 21:59.
TESLA-X4 is offline
grandwazir
Senior Member
Join Date: Jan 2009
Old 02-04-2009 , 00:26   Re: [L4D] HideHUDOnVomit (Blind Luck)
Reply With Quote #13

I'm going to give Sammys idea a test along with TESLA-X4 suggestions and see if I can get it working with cheats off. I think you have to use ClientCommand though because FakeClientCommand only simulates a command coming from a client and executes it on the server whereabouts ClientCommand actually runs it in their console, which is what is needed with the hidehud command. I shall give it ago anyway

As with the stripping of the flags you might find this code interesting. If you run it on your server, it seems that you can not actually alter any of the command flags associated with hidehud at all. SetCommandFlag always returns false regardless of what you try to set the commands to. It seems like it might be protected somehow.

I'm starting to wonder if the cheat flag would be reapplied before the client can actually execute it anyway.

If this is going to work at all with cheats off I think SendConVarValue is the way to go. I'm not concerned though if it will work with anti-cheat plugins however as there is really only one way to do this and hidehud is considered a client side cheat anyway.

Last edited by grandwazir; 02-04-2009 at 00:44.
grandwazir is offline
voiderest
Junior Member
Join Date: Jan 2009
Old 02-04-2009 , 00:41   Re: [L4D] HideHUDOnVomit (Blind Luck)
Reply With Quote #14

I've been working on a way to run any command/cvar without cheats and for commands removing the flags then putting them back real fast didn't always work.

The solution that I'm going with is to do it kinda fast using a timer.

Code:
public Action:RandomFunction34(thecmd, args)
{
    //code maybe

    SetCommandFlags(thecmd,flags^FCVAR_CHEAT);
    ServerCommand("%s%s",thecmd,args); //I think you use a different one
    new Handle:data;
    CreateDataTimer(0.5, resetcmd, data); //make longer or shorter as you see fit
    WritePackString(data, thecmd);
    WritePackCell(data, flags);

    //code maybe
}

//voiderest wrote the resetcmd function
public Action:resetcmd(Handle:timer, Handle:data)
{
    new String:buf[32];
    ReadPackString(data, buf, 32);
    SetCommandFlags(buf, ReadPackCell(data));
}
Anyone should feel free to use and abuse that code, but leaving the little comment in the code would be nice.

Last edited by voiderest; 02-04-2009 at 00:42. Reason: grammer
voiderest is offline
grandwazir
Senior Member
Join Date: Jan 2009
Old 02-04-2009 , 00:50   Re: [L4D] HideHUDOnVomit (Blind Luck)
Reply With Quote #15

Interesting stuff void. I'll give it a go and see if it works (and obviously credit accordingly )
grandwazir is offline
grandwazir
Senior Member
Join Date: Jan 2009
Old 02-04-2009 , 01:32   Re: [L4D] HideHUDOnVomit (Blind Luck)
Reply With Quote #16

Quote:
Originally Posted by Sammy-ROCK!
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.
As I suspected FakeClientCommand won't work here because it executes the command on the server and not on the client. For hidehud to work it has to be executed using ClientCommand.
grandwazir is offline
Big Myke
Senior Member
Join Date: Jan 2009
Location: Grain Belt, USA
Old 02-04-2009 , 01:32   Re: [L4D] HideHUDOnVomit (Blind Luck)
Reply With Quote #17

GLad to see you're still working on perfecting the plugin ;)
Big Myke is offline
grandwazir
Senior Member
Join Date: Jan 2009
Old 02-04-2009 , 02:59   Re: [L4D] HideHUDOnVomit (Blind Luck)
Reply With Quote #18

SendConVarValue does indeed work and it is working on my server with sv_cheats off. The only way this can work though is to enable sv_cheats client side while we are hiding the HUD (about 25 seconds if you do it by events or however long if you want to use a timer instead).

I've been doing some testing to see what commands work when sv_cheats is enabled clientside but not serverside. You can't use things like god mode or noclip so it seems to be fairly safe as far as game breaking commands go. I've not checked the impulse commands etc.

I'm assuming (but not sure) that any cheat that affects the actual game has to go through the server first meaning they won't work. However clientside stuff like changing hud, wireframes would most likely work. It is reset back to 0 when it displays the HUD back so any changes or cheats the clients activated during this time would be reversed. This also means that a client could easily just reverse the changes of the mod if he didn't like it as well.

Stripping the cheat flags from the command and running it would be better. I don't think you would even need to put them back on but it would be best practise too. I doubt someone can gain an massive advantage by turning aspects of their HUD off but hidehud acts in a weird way when it comes to flags. I'll have another look at stripping the flags today now I have a fresh mind to look at it.
grandwazir is offline
Big Myke
Senior Member
Join Date: Jan 2009
Location: Grain Belt, USA
Old 02-04-2009 , 12:04   Re: [L4D] HideHUDOnVomit (Blind Luck)
Reply With Quote #19

Thanks for the update man. It works but I'll accept its draw backs as well. Maybe you'll find a better solution to making it work with out sv_cheats enabled. The only draw back is when you go in console you see the "achievement disabled because of sv cheats is enabled blah blah blah" and that you can't get that achievement on the server. Eitehr way. Its a keeper on my server and I'm happy
Big Myke is offline
grandwazir
Senior Member
Join Date: Jan 2009
Old 02-04-2009 , 12:15   Re: [L4D] HideHUDOnVomit (Blind Luck)
Reply With Quote #20

Glad to know at least one person likes it
grandwazir 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 13:52.


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