AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Log a cmd (https://forums.alliedmods.net/showthread.php?t=58366)

Alka 07-24-2007 18:14

Log a cmd
 
Hi.I want to log commands maded in console but is not working how i expect ! 0o i use something like
Code:

public client_command(id)
{
    new args[256]
    read_args(args, 255);
 
  if(containi(args, "amx_") != -1)
  {
      //log to file blah blah "args"
  }
}

Is not loging any command with amx_ but logs numbers and empty args :|...

Minimum 07-24-2007 18:55

Re: Log a cmd
 
I am pretty sure that read_args does not print the actual command that executed it. Not sure how to bypass that though. Hopefully someone else does.

Lee 07-24-2007 19:28

Re: Log a cmd
 
You use read_argv(0, command, 31) to capture the command itself.

Two functioning examples:
http://forums.alliedmods.net/showthread.php?t=7204
http://forums.alliedmods.net/showpos...14&postcount=6

Alka 07-24-2007 20:42

Re: Log a cmd
 
Yup,is what i looking for! Thanks :wink:


All times are GMT -4. The time now is 21:31.

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