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

button Y


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
loiraolhosazul
Member
Join Date: May 2020
Old 10-26-2020 , 12:54   button Y
Reply With Quote #1

is there a hook to find out if the user presses Y?

already tried
PHP Code:
register_clcmd("messagemode""func"
dont work

Last edited by loiraolhosazul; 10-26-2020 at 12:54.
loiraolhosazul is offline
r0ma
Senior Member
Join Date: Apr 2012
Location: Great Tomb of Nazarick
Old 10-26-2020 , 20:00   Re: button Y
Reply With Quote #2

PHP Code:
public plugin_init() {
    
register_clcmd("nice_try""nice_try");
}

public 
nice_try(id) {
    new 
szBuffer[33];
    
    
read_args(szBuffercharsmax(szBuffer));
    
remove_quotes(szBuffer);
    
    
client_print(idprint_chat"messagemode -> %s"szBuffer);
    
    return 
PLUGIN_HANDLED;
}
//somewhere
client_cmd(id"messagemode nice_try"); 
__________________
Discord:FluffyDeveloper#4753
Github: https://github.com/francoromaniello
AMX-ES: https://amxmodx-es.com/r0ma'
r0ma is offline
Send a message via MSN to r0ma
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 10-26-2020 , 20:26   Re: button Y
Reply With Quote #3

It is not possible to know which buttons have been pressed. You can only hook commands that are sent to the server. Specifically regarding messagemode, it is not a command that is sent to the server and therefore you cannot detect when it occurs. You can only detect when they hit enter and the command is sent to the server as the "say" command. You can hook "say" and then parse the data that is provided (i.e. the chat message text) and do what you want with it.

I expect that this isn't he answer you would like so if you want to solve your actual problem, you'll need to provide more details of what you are actually trying to do.
__________________
fysiks 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 11:33.


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