Raised This Month: $ Target: $400
 0% 

Log a cmd


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 07-24-2007 , 18:14   Log a cmd
Reply With Quote #1

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 ...
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
Minimum
Senior Member
Join Date: Jun 2006
Old 07-24-2007 , 18:55   Re: Log a cmd
Reply With Quote #2

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.
Minimum is offline
Send a message via AIM to Minimum Send a message via MSN to Minimum
Lee
AlliedModders Donor
Join Date: Feb 2006
Old 07-24-2007 , 19:28   Re: Log a cmd
Reply With Quote #3

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

Last edited by Lee; 07-24-2007 at 19:33.
Lee is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 07-24-2007 , 20:42   Re: Log a cmd
Reply With Quote #4

Yup,is what i looking for! Thanks
__________________
Still...lovin' . Connor noob! Hello
Alka 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:31.


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