Raised This Month: $51 Target: $400
 12% 

Admin commands


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
siikaisz
Junior Member
Join Date: Aug 2007
Old 03-02-2008 , 15:33   Admin commands
Reply With Quote #1

I tried to make admin commaands to not show admin activities to players but only admins but something dont work...

When i try to kick player, to admins dont show msg and also to players dont show

To kick Players admin command:
Code:
register_concmd("xkick", "cmdKick", ADMIN_KICK, "<name or #userid> [reason]")
My new cmdKick:

Code:
public cmdKick(id, level, cid)
{
    if (!cmd_access(id, level, cid, 2))
        return PLUGIN_HANDLED

    new arg[32]
    read_argv(1, arg, 31)
    new player = cmd_target(id, arg, 1)
    new players[32], inum
    
    if (!player)
        return PLUGIN_HANDLED
    
    new authid[32], authid2[32], name2[32], name[32], userid2, reason[32]
    
    get_user_authid(id, authid, 31)
    get_user_authid(player, authid2, 31)
    get_user_name(player, name2, 31)
    get_user_name(id, name, 31)
    userid2 = get_user_userid(player)
    read_argv(2, reason, 31)
    remove_quotes(reason)
    
    log_amx("Kick: ^"%s<%d><%s><>^" kick ^"%s<%d><%s><>^" (reason ^"%s^")", name, get_user_userid(id), authid, name2, userid2, authid2, reason)
    get_players(players, inum)
    
    for (new i = 0; i < inum; ++i)
    {
    if (players[i] != id && get_user_flags(players[i]) & ADMIN_CHAT) {
    switch (get_cvar_num("amx_show_activity"))
    {
        case 2: client_print(players[i], print_chat, "%L", LANG_PLAYER, "ADMIN_KICK_2", name, name2)
        case 1: client_print(players[i], print_chat, "%L", LANG_PLAYER, "ADMIN_KICK_1", name2)
    } 
    }
    }
    if (is_user_bot(player))
        server_cmd("kick #%d", userid2)
    else
    {
        if (reason[0])
            server_cmd("kick #%d ^"%s^"", userid2, reason)
        else
            server_cmd("kick #%d", userid2)
    }
    
    console_print(id, "[BALTIC] Client ^"%s^" kicked", name2)
    
    return PLUGIN_HANDLED
}
siikaisz is offline
kp_uparrow
Penalized Member
Join Date: Jun 2006
Location: 192.168.0.1
Old 03-02-2008 , 16:58   Re: Admin commands
Reply With Quote #2

amx_show_activity is more than 0?
__________________
I USED A SECOND ACCOUNT TO DO MORE KARMA UPS AND DOWNS UNTIL GREENTRYST CAUGHT ME
kp_uparrow is offline
siikaisz
Junior Member
Join Date: Aug 2007
Old 03-03-2008 , 04:32   Re: Admin commands
Reply With Quote #3

that was default admin comands code i just added
Code:
 for (new i = 0; i < inum; ++i)
    {
    if (players[i] != id && get_user_flags(players[i]) & ADMIN_CHAT) {
siikaisz is offline
siikaisz
Junior Member
Join Date: Aug 2007
Old 03-04-2008 , 09:28   Re: Admin commands
Reply With Quote #4

noone?
siikaisz is offline
siikaisz
Junior Member
Join Date: Aug 2007
Old 03-04-2008 , 11:07   Re: Admin commands
Reply With Quote #5

fixed... CLOSE
siikaisz 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 16:20.


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