Raised This Month: $ Target: $400
 0% 

[REQ] Save Admins Data


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
JoaoVieira
Senior Member
Join Date: May 2013
Location: Portugal
Old 01-31-2016 , 13:05   [REQ] Save Admins Data
Reply With Quote #1

Hey alliedmodders , i want a plugin here it regist the comands which admin do. (BAD ENGLISH!)

Exemple:

"admin-player: banned "user-player"

on log or ini it will regist this comand and the name of the admin.

Last edited by JoaoVieira; 01-31-2016 at 13:06.
JoaoVieira is offline
JoaoVieira
Senior Member
Join Date: May 2013
Location: Portugal
Old 01-31-2016 , 13:15   Re: [REQ] Save Admins Data
Reply With Quote #2

And yes , i allready google it i didnt found...
JoaoVieira is offline
Croxeye
Member
Join Date: Jul 2015
Old 01-31-2016 , 13:48   Re: [REQ] Save Admins Data
Reply With Quote #3

Deafult admin commands are loggin in addons/amxmodx/logs/L20160xxx

And if you want to long your own command add this line in your code:

Code:
log_amx("Kick: ^"%s<%d><%s><>^" kick ^"%s<%d><%s><>^" (reason ^"%s^")", name, get_user_userid(id), authid, name2, userid2, authid2, reason)
Example for kick cmd
Croxeye is offline
JoaoVieira
Senior Member
Join Date: May 2013
Location: Portugal
Old 01-31-2016 , 15:06   Re: [REQ] Save Admins Data
Reply With Quote #4

Quote:
Originally Posted by Croxeye View Post
Deafult admin commands are loggin in addons/amxmodx/logs/L20160xxx

And if you want to long your own command add this line in your code:

Code:
log_amx("Kick: ^"%s<%d><%s><>^" kick ^"%s<%d><%s><>^" (reason ^"%s^")", name, get_user_userid(id), authid, name2, userid2, authid2, reason)
Example for kick cmd
I want a plugin , i dont have it , and i didnt understand your method..
JoaoVieira is offline
Croxeye
Member
Join Date: Jul 2015
Old 01-31-2016 , 15:28   Re: [REQ] Save Admins Data
Reply With Quote #5

PHP Code:
register_concmd("amx_kick""cmdKick"ADMIN_KICK"<name or #userid> [reason]")

public 
cmdKick(idlevelcid)
{
    if (!
cmd_access(idlevelcid2))
        return 
PLUGIN_HANDLED

    
new arg[32]
    
read_argv(1arg31)
    new 
player cmd_target(idargCMDTARGET_OBEY_IMMUNITY CMDTARGET_ALLOW_SELF)
    
    if (!
player)
        return 
PLUGIN_HANDLED
    
    
new authid[32], authid2[32], name2[32], name[32], userid2reason[32]
    
    
get_user_authid(idauthid31)
    
get_user_authid(playerauthid231)
    
get_user_name(playername231)
    
get_user_name(idname31)
    
userid2 get_user_userid(player)
    
read_argv(2reason31)
    
remove_quotes(reason)
    
    
log_amx("Kick: ^"%s<%d><%s><>^" kick ^"%s<%d><%s><>^" (reason ^"%s^")"nameget_user_userid(id), authidname2userid2authid2reason)

    
show_activity_key("ADMIN_KICK_1""ADMIN_KICK_2"namename2);

    if (
is_user_bot(player))
        
server_cmd("kick #%d"userid2)
    else
    {
        if (
reason[0])
            
server_cmd("kick #%d ^"%s^""userid2reason)
        else
            
server_cmd("kick #%d"userid2)
    }
    
    
console_print(id"[AMXX] Client ^"%s^" kicked"name2)
    
    return 
PLUGIN_HANDLED

What you don't understend ? This is default admin kick command and when admin use this command, you can see all informations about that in your logs folder.

And you can found admincmd.sma with all default commands in your scripting folder

Last edited by Croxeye; 01-31-2016 at 15:28.
Croxeye is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 02-01-2016 , 01:06   Re: [REQ] Save Admins Data
Reply With Quote #6

Quote:
Originally Posted by JoaoVieira View Post
And yes , i allready google it i didnt found...
Google isn't the answer to everything, try searching the actual forum.

P.S. It's not hard to find.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd 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 07:03.


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