AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Hook pause or read console (https://forums.alliedmods.net/showthread.php?t=74892)

4JOKE 07-26-2008 19:39

Hook pause or read console
 
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?

hzqst 07-26-2008 23:38

Re: Hook pause or read console
 
try client_command

4JOKE 07-27-2008 18:36

Re: Hook pause or read console
 
Quote:

Originally Posted by hzqst (Post 659537)
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 ?!?!

scrtxxcaz 07-28-2008 16:25

Re: Hook pause or read console
 
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




All times are GMT -4. The time now is 05:34.

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