Raised This Month: $ Target: $400
 0% 

Mouse1 "+attack" & Enter "+attack".


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Decompiler
>:)
Join Date: Mar 2013
Old 09-18-2013 , 08:58   Mouse1 "+attack" & Enter "+attack".
Reply With Quote #1

Q1: What's the difference between the +attack executed when pressing enter and when clicking mouse1?

I can close the MOTD by pressing Enter, where as I can't close the motd with my mouse unless I move it to where it says "OK. Yet both are binded to +attack?

Q2: Is there a way to trick the game into thinking the player pressed Enter? To force close the MOTD for the player.
__________________
Decompiling maps, decompiling plugins, stealing code, replacing authors name. I do it all .

Last edited by Decompiler; 09-18-2013 at 08:58.
Decompiler is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 09-18-2013 , 09:23   Re: Mouse1 "+attack" & Enter "+attack".
Reply With Quote #2

the +attack bind has nothing to do with closing the motd (you can still close the motd by unbinding mouse1 and enter key), and no you cant force the client to close it

Last edited by jimaway; 09-18-2013 at 09:24.
jimaway is offline
HLM
Senior Member
Join Date: Apr 2008
Location: C:\WINDOWS\System32
Old 09-18-2013 , 19:44   Re: Mouse1 "+attack" & Enter "+attack".
Reply With Quote #3

Quote:
Originally Posted by Decompiler View Post
Q1: What's the difference between the +attack executed when pressing enter and when clicking mouse1?

I can close the MOTD by pressing Enter, where as I can't close the motd with my mouse unless I move it to where it says "OK. Yet both are binded to +attack?

Q2: Is there a way to trick the game into thinking the player pressed Enter? To force close the MOTD for the player.
do you move your mouse to the login button, or do you press enter? I press enter, but its all preference, its just the way things are, the 'OK' button is the only 'clickable' element outside the MOTD (which loads after the MOTD window) so it gets the element focus first, so pressing enter would activate it (unless you press tab and there is a hyperlink in the MOTD)

Read more about it here:
http://en.wikipedia.org/wiki/Focus_(computing)
http://en.wikipedia.org/wiki/Tab_order
__________________
+|- KARMA Respectively

HLM is offline
Decompiler
>:)
Join Date: Mar 2013
Old 09-19-2013 , 01:47   Re: Mouse1 "+attack" & Enter "+attack".
Reply With Quote #4

Quote:
Originally Posted by HLM View Post
do you move your mouse to the login button, or do you press enter? I press enter, but its all preference, its just the way things are, the 'OK' button is the only 'clickable' element outside the MOTD (which loads after the MOTD window) so it gets the element focus first, so pressing enter would activate it (unless you press tab and there is a hyperlink in the MOTD)

Read more about it here:
http://en.wikipedia.org/wiki/Focus_(computing)
http://en.wikipedia.org/wiki/Tab_order
But what is Enter to CS? Can't I tell the game that the player pressed enter? And so force close the MOTD?

Question 3: Can I force load another MOTD ontop of the old MOTD? So instead of closing them, I just have it load motd1, then motd2 and so on.
__________________
Decompiling maps, decompiling plugins, stealing code, replacing authors name. I do it all .
Decompiler is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 09-19-2013 , 01:49   Re: Mouse1 "+attack" & Enter "+attack".
Reply With Quote #5

Quote:
Originally Posted by Decompiler View Post
But what is Enter to CS?
In the MOTD, the same thing as it is when you are on a Web Site.

Quote:
Can't I tell the game that the player pressed enter?
GoldSrc does not provide the ability to do so

Quote:
And so force close the MOTD?
GoldSrc does not provide the ability to do so

Quote:
Question 3: Can I force load another MOTD ontop of the old MOTD? So instead of closing them, I just have it load motd1, then motd2 and so on.
Try it?
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Decompiler
>:)
Join Date: Mar 2013
Old 09-19-2013 , 03:03   Re: Mouse1 "+attack" & Enter "+attack".
Reply With Quote #6

Quote:
Originally Posted by YamiKaitou View Post
Try it?
I did and it didn't work. I was hoping there would be a method that would work.

Well thanks for helping out. I guess I'll print the results in chat instead.
__________________
Decompiling maps, decompiling plugins, stealing code, replacing authors name. I do it all .
Decompiler is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 09-19-2013 , 09:09   Re: Mouse1 "+attack" & Enter "+attack".
Reply With Quote #7

you could use javascript functionality to change the motd content
jimaway is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 09-19-2013 , 16:14   Re: Mouse1 "+attack" & Enter "+attack".
Reply With Quote #8

Here's what I did for my server:
Code:
#include <amxmodx> #define MOTD "Hello %s" // I edited it to make the example clear. public plugin_init() {     register_plugin("Test Plugin 6", "", "");     } public client_putinserver(id) {     new buffer[1024], name[32];     get_user_name(id, name, charsmax(name));     formatex(buffer, charsmax(buffer), MOTD, name);         new hFile = fopen("motd.txt", "w");     fputs(hFile, buffer);     fclose(hFile); }

I guess there is a small chance it could fail if two people join very close to each other depending on how far apart the client_putinserver() and the showing of default motd is in actual code. Most likely (and someone could probably look it up) is that they are both called from the same function and since the server is single-threaded it will not accept any new player until this function is done.

Do javascript really work in MOTD?
__________________

Last edited by Black Rose; 09-19-2013 at 16:14.
Black Rose 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 19:01.


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