Open client console

Discussions about Coding and Scripting
Post Reply
iloveut99
Skilled
Posts: 231
Joined: Mon Aug 16, 2010 10:25 pm

Open client console

Post by iloveut99 »

Hi, I would like to open the console in the client to show some message I have tried this:

Code: Select all

UTConsole(PlayerPawn(P).Player.Console).bQuickKeyEnable = true;
UTConsole(PlayerPawn(P).Player.Console).LaunchUWindow();
UTConsole(PlayerPawn(P).Player.Console).ShowConsole();
But seems don't work.
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: Open client console

Post by JackGriffin »

Don't use that, it will just be abused. Use ClientSendMessage or create your own class that pops up if you just have to.
So long, and thanks for all the fish
iloveut99
Skilled
Posts: 231
Joined: Mon Aug 16, 2010 10:25 pm

Re: Open client console

Post by iloveut99 »

JackGriffin wrote:Don't use that, it will just be abused. Use ClientSendMessage or create your own class that pops up if you just have to.
Hello, I don't understand.

How abused?

ClientSendMessage will open the console? (because I want to destroy the player after I send the message)

My idea was send the message via "P.ClientMessage("")) and then open his console to show up my message, like anthchecker do for example.
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: Open client console

Post by JackGriffin »

What are trying to accomplish?
So long, and thanks for all the fish
iloveut99
Skilled
Posts: 231
Joined: Mon Aug 16, 2010 10:25 pm

Re: Open client console

Post by iloveut99 »

I am editing the kick for proxy mod originally made by dane to kick for tunnel detected by ace.
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: Open client console

Post by JackGriffin »

Then just script your own pop-up class and add your message. Any number of mods do this. A good one to follow would be the nexgen kick one.
So long, and thanks for all the fish
iloveut99
Skilled
Posts: 231
Joined: Mon Aug 16, 2010 10:25 pm

Re: Open client console

Post by iloveut99 »

I still don't get what's the problem with displaying client console, can that open some breaches if it becomes public or is it extremely hard to do that I need to write my own windows? Thanks for the ngen tip btw.
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: Open client console

Post by JackGriffin »

It's my own personal thing and no doubt you'll find coders who disagree with my views (which is good, dissent is the impetus for invention). I just try to stay away from forcing the client to do anything using their own console. Can it be done? Sure, it's easy. But so is adding all sorts of stuff like forcing set input commands, etc. You may not do it but I can guarantee you someone else will come along and borrow your code for no good purposes.

Case in point:
http://www.unrealadmin.org/forums/showt ... hp?t=30051

I scripted a neat little container mod and it was quickly used to cheat. I called the guy out and it got so ugly. I did nothing wrong but people looked at me like I was also culpable in this little charade. I ended up defending myself quite a lot, to the extent I copied the MSN chat logs to a couple of senior UT coders to back up my side. The guys using your stuff don't care AT ALL if it causes you problems and they will happily leave your mod declarations so people look at you first.

So to tie things up the bottom line becomes "Can I do this another way and accomplish the end objective?" The answer is yes, so that's why I feel this way.
So long, and thanks for all the fish
iloveut99
Skilled
Posts: 231
Joined: Mon Aug 16, 2010 10:25 pm

Re: Open client console

Post by iloveut99 »

Ok thanks for the explanation. Well execute console commands in the clients is pretty easy, since we can find examples in the uscript engine. But now you let me thinking if I should search everywhere how to display the client console or do my own (this one seems more complicated, since I never worked with guis) or don't even do anything and just kick.
Post Reply