Raised This Month: $ Target: $400
 0% 

Hook pause or read console


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
4JOKE
Member
Join Date: Jan 2008
Old 07-26-2008 , 19:39   Hook pause or read console
Reply With Quote #1

Is possible to hook pause event?
If it isn't possible, how can I read text(from console) "Pause is not allowed." when someone write "pause" into console?
4JOKE is offline
hzqst
Senior Member
Join Date: Jul 2008
Old 07-26-2008 , 23:38   Re: Hook pause or read console
Reply With Quote #2

try client_command
hzqst is offline
4JOKE
Member
Join Date: Jan 2008
Old 07-27-2008 , 18:36   Re: Hook pause or read console
Reply With Quote #3

Quote:
Originally Posted by hzqst View Post
try client_command
hm, I know that this event is calling by every command from client consolem, but you didn't mentioned the main problem ?!?!
How can I read text "Pause not allowed" from console ?!?!
4JOKE is offline
scrtxxcaz
Senior Member
Join Date: Feb 2007
Location: a place u cant find
Old 07-28-2008 , 16:25   Re: Hook pause or read console
Reply With Quote #4

I think you can do either one of these and it will work

PHP Code:
public plugin_init() {
     
register_plugin(PLUGINVERSIONAUTHOR)
     
register_concmd("","pausecmd")
}
public 
pausecmd(id) {
     new 
arg[32]
     
read_argv(id,arg,31)
     if(
contain(arg,"pause"))
     {
          
console_print(id,"Pause Not Allowed")
     }

or
PHP Code:
public plugin_init() {
     
register_plugin(PLUGINVERSIONAUTHOR)
     
register_concmd("pause","pausecmd")
}
public 
pausecmd(id) {
     
//pause was typed in console... do this

__________________
Please leave your name when giving me any karma

Counter Strike Freeze Tag
Status: Testing.... (bugs)

Revised Registration
Status: In Progress
scrtxxcaz is offline
Send a message via AIM to scrtxxcaz
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 05:34.


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