Raised This Month: $ Target: $400
 0% 

Plugin Request [Admin Command Logs]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Alber9091
Veteran Member
Join Date: Jun 2014
Location: Karachi, Pakistan
Old 09-24-2018 , 12:51   Plugin Request [Admin Command Logs]
Reply With Quote #1

I know there are many plugins but some are quite complicated and some don't lie on request, so,

Can anyone make, a small Plugin

#Define Flag: C (Kick) And D (Ban)

Record Command Logs:

Saved in configs/AdminCmdLogs.txt

Time, Admin Nick, Admin Steam Id, Command Executed !!!!

May be if the plugin, trace?

amx_ (logs)

Last edited by Alber9091; 10-13-2018 at 11:06.
Alber9091 is offline
Alber9091
Veteran Member
Join Date: Jun 2014
Location: Karachi, Pakistan
Old 10-10-2018 , 15:09   Re: Plugin Request [Admin Command Logs]
Reply With Quote #2

Bump !!! (After 17 Days)
Anyone Here Please? Who can help?

Last edited by Alber9091; 10-11-2018 at 03:07.
Alber9091 is offline
shehzad1234
BANNED
Join Date: Jan 2016
Location: https://t.me/pump_upp
Old 10-10-2018 , 15:24   Re: Plugin Request [Admin Command Logs]
Reply With Quote #3

bump
shehzad1234 is offline
Send a message via ICQ to shehzad1234 Send a message via AIM to shehzad1234 Send a message via Yahoo to shehzad1234
D4rkSiD3Rs
Senior Member
Join Date: Jan 2018
Location: Morocco
Old 10-11-2018 , 15:26   Re: Plugin Request [Admin Command Logs]
Reply With Quote #4

PHP Code:
#include <amxmodx>
#include <amxmisc>

new g_cmdLine1[512], g_cmdLine2[512], g_cmdLine3[512], g_cmdLine4[512]

public 
plugin_init()
{
    
register_plugin("Admin Commands Logger""1.0""TheWhitesmith"// Edited by D4rkSiD3Rs
}

public 
client_command(id)
{
    if(!(
get_user_flags(id) & ADMIN_KICK) && !(get_user_flags(id) & ADMIN_BAN))
        return 
PLUGIN_CONTINUE

    
new name[32]
    new 
authid[32]
    new 
logfile[50];
    new 
configsdir[20];

    new 
text[charsmax(name)+(4*charsmax(g_cmdLine1))]
    
get_configsdir(configsdircharsmax(configsdir));
    
formatex(logfilecharsmax(logfile), "%s/admin_commands_log.txt"configsdir);
    
get_user_name(idnamecharsmax(name))
    
get_user_authid(idauthidcharsmax(authid))

    
read_argv(0g_cmdLine1511)
    
read_argv(1g_cmdLine2511)
    
read_argv(2g_cmdLine3511)
    
read_argv(3g_cmdLine4511)
    
    static 
datestr[11]
    
get_time("%Y-%m-%d"datestr10)
    new 
timestr[9]
    
get_time("%H:%M:%S"timestr8)

    
formatex(textcharsmax(text), "L %s - %s: Name: %s | SteamID: %s | Command: %s %s %s %s"datestrtimestrnameauthidg_cmdLine1g_cmdLine2g_cmdLine3g_cmdLine4);
    
write_file(logfiletext)
    
    return 
PLUGIN_CONTINUE

__________________


D4rkSiD3Rs is offline
Alber9091
Veteran Member
Join Date: Jun 2014
Location: Karachi, Pakistan
Old 10-11-2018 , 16:58   Re: Plugin Request [Admin Command Logs]
Reply With Quote #5

Quote:
L 10/11/2018 - 213:20: Couldn't write file "cstrike/addons/amxmodx/conf/admin_commands_log.txt"
L 10/11/2018 - 213:20: [AMXX] Displaying debug trace (plugin "admincmdlogs.amxx")
L 10/11/2018 - 213:20: [AMXX] Run time error 10: native error (native "write_file")
L 10/11/2018 - 213:20: [AMXX] [0] admincmdlogs.sma::client_command (line 38 )
I believe this is line 38:

Quote:
write_file(logfile, text)
Anyone there to help?

Last edited by Alber9091; 10-11-2018 at 17:02.
Alber9091 is offline
D4rkSiD3Rs
Senior Member
Join Date: Jan 2018
Location: Morocco
Old 10-11-2018 , 17:29   Re: Plugin Request [Admin Command Logs]
Reply With Quote #6

change :

Code:
new configsdir[20];
to :

Code:
new configsdir[200];
__________________


D4rkSiD3Rs is offline
Alber9091
Veteran Member
Join Date: Jun 2014
Location: Karachi, Pakistan
Old 10-12-2018 , 05:53   Re: Plugin Request [Admin Command Logs]
Reply With Quote #7

Quote:
Originally Posted by D4rkSiD3Rs View Post
change :

Code:
new configsdir[20];
to :

Code:
new configsdir[200];
Hy, Thanks alot for the code but it logs all commands.
I mean to even it logs say, say Hello, fps_max 100, menuselect 2, every single keyword.

But I want to log only keywords having only amx_ and rcon if possible, instead of recording every single letter.

Last edited by Alber9091; 10-12-2018 at 06:24.
Alber9091 is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 10-13-2018 , 02:26   Re: Plugin Request [Admin Command Logs]
Reply With Quote #8

The plugin is very badly coded if you want to share it atleast Inform him.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
D4rkSiD3Rs
Senior Member
Join Date: Jan 2018
Location: Morocco
Old 10-13-2018 , 06:26   Re: Plugin Request [Admin Command Logs]
Reply With Quote #9

Quote:
Originally Posted by Natsheh View Post
The plugin is very badly coded if you want to share it atleast Inform him.
I'm not the author of that plugin. I just added some stuffs and shared it
__________________


D4rkSiD3Rs is offline
Alber9091
Veteran Member
Join Date: Jun 2014
Location: Karachi, Pakistan
Old 10-13-2018 , 11:06   Re: Plugin Request [Admin Command Logs]
Reply With Quote #10

Quote:
Originally Posted by Natsheh View Post
The plugin is very badly coded if you want to share it atleast Inform him.
Brother, if you have time, Can you please help? It woild be appreciated !!!

Thanks in advance !!!
Alber9091 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 12:15.


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