This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Hook when the player escapes messagemod


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
zeus
Senior Member
Join Date: Jul 2008
Old 05-13-2015 , 10:39   Hook when the player escapes messagemod
Reply With Quote #1

I use a function to handle something like this to read some user input data
Code:
client_cmd( id, "messagemode _datafield" );
How can I hook when the player cancels ( escape button ) the custom messagemod chat ?
I need it because when the messagemode is triggered I also have a custum hud message that repeats at 1.0 seconds until the player inputs some valid data.
If he escapes from the messagemod I don't know when to remove the task.
zeus is offline
aron9forever
Veteran Member
Join Date: Feb 2013
Location: Rromania
Old 05-13-2015 , 10:59   Re: Hook when the player escapes messagemod
Reply With Quote #2

I'm pretty sure you can't, since messagemode is basically a client-side input, with a predefined command (_datafield in your case) and a parameter which is written in the chat
__________________
Meanwhile, in 2050:
Quote:
Originally Posted by aron9forever
useless small optimizations
Quote:
Originally Posted by Black Rose View Post
On a map that is 512x512x128 units you end up with 3,355,443,200,000 different "positions". To store each one of those positions individually in the variable "user_or" you need 12 terabytes of memory.
aron9forever is offline
zeus
Senior Member
Join Date: Jul 2008
Old 05-13-2015 , 11:01   Re: Hook when the player escapes messagemod
Reply With Quote #3

I can't even hook when he pressed the escape button ?
zeus is offline
JusTGo
Veteran Member
Join Date: Mar 2013
Old 05-13-2015 , 11:15   Re: Hook when the player escapes messagemod
Reply With Quote #4

mayby ?
PHP Code:
    if(equal(typed""))
        return 
PLUGIN_HANDLED 
JusTGo is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 05-13-2015 , 12:01   Re: Hook when the player escapes messagemod
Reply With Quote #5

You can set a task with a limited timer.

But you can try to hook CS_InternalCommand or client_command forwards.
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
zeus
Senior Member
Join Date: Jul 2008
Old 05-13-2015 , 15:13   Re: Hook when the player escapes messagemod
Reply With Quote #6

I was thinking also to set a timer as a plan B.
Thank you for your replies.
zeus 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 21:16.


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