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

Plmenu request


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MrSnow
Junior Member
Join Date: Feb 2024
Old 03-01-2024 , 11:04   Plmenu request
Reply With Quote #1

Hey, So i recently got a coloured AdminCmd.sma to make the slaps/ban/kick etc coloured But it didnt came with the plmenu for slapmenu coloured, for example i use amx_slap from console it is coloured But when i use amx_slapmenu it is not coloured and i want to make it coloured just Like how AdminCmd is, this is the admincmd.sma code:

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

#define MAXRCONCVARS 16

new g_cvarRcon[MAXRCONCVARS][32]
new 
g_cvarRconNum
new g_pauseCon
new Float:g_pausAble
new bool:g_Paused
new bool:g_PauseAllowed false
new g_addCvar[] = "amx_cvar add %s"

public plugin_init()
{
    
register_plugin("Admin Commands"AMXX_VERSION_STR"ANONIM")
    
register_dictionary("admincmd.txt")
    
register_dictionary("common.txt")
    
register_concmd("amx_kick""cmdKick"ADMIN_KICK"<name or #userid> [reason]")
    
register_concmd("amx_ban""cmdBan"ADMIN_BAN"<name or #userid> <minutes> [reason]")
    
register_concmd("amx_banip""cmdBanIP"ADMIN_BAN"<name or #userid> <minutes> [reason]")
    
register_concmd("amx_addban""cmdAddBan"ADMIN_RCON"<authid or ip> <minutes> [reason]")
    
register_concmd("amx_unban""cmdUnban"ADMIN_BAN"<authid or ip>")
    
register_concmd("amx_slay""cmdSlay"ADMIN_SLAY"<name or #userid>")
    
register_concmd("amx_slap""cmdSlap"ADMIN_SLAY"<name or #userid> [power]")
    
register_concmd("amx_leave""cmdLeave"ADMIN_KICK"<tag> [tag] [tag] [tag]")
    
register_concmd("amx_pause""cmdPause"ADMIN_CVAR"- pause or unpause the game")
    
register_concmd("amx_who""cmdWho"ADMIN_ADMIN"- displays who is on server")
    
register_concmd("amx_cvar""cmdCvar"ADMIN_CVAR"<cvar> [value]")
    
register_concmd("amx_plugins""cmdPlugins"ADMIN_ADMIN)
    
register_concmd("amx_modules""cmdModules"ADMIN_ADMIN)
    
register_concmd("amx_map""cmdMap"ADMIN_MAP"<mapname>")
    
register_concmd("amx_cfg""cmdCfg"ADMIN_CFG"<filename>")
    
register_concmd("amx_nick""cmdNick"ADMIN_SLAY"<name or #userid> <new nick>")
    
register_clcmd("amx_rcon""cmdRcon"ADMIN_RCON"<command line>")
    
register_clcmd("amx_showrcon""cmdShowRcon"ADMIN_RCON"<command line>")
    
register_clcmd("pauseAck""cmdLBack")
}

public 
plugin_cfg()
{
    
// Cvars which can be changed only with rcon access
    
server_cmd(g_addCvar"rcon_password")
    
server_cmd(g_addCvar"amx_show_activity")
    
server_cmd(g_addCvar"amx_mode")
    
server_cmd(g_addCvar"amx_password_field")
    
server_cmd(g_addCvar"amx_default_access")
    
server_cmd(g_addCvar"amx_reserved_slots")
    
server_cmd(g_addCvar"amx_reservation")
    
server_cmd(g_addCvar"amx_conmotd_file")
}

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

    
new arg[32]
    
read_argv(1arg31)
    new 
player cmd_target(idarg1)
    
    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)
    
    switch (
get_cvar_num("amx_show_activity"))
    {
        case 
2chat_color(0,"%L"LANG_PLAYER"ADMIN_KICK_2"namename2)
        case 
1chat_color(0,"%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^""userid2reason)
        else
            
server_cmd("kick #%d"userid2)
    }
    
    
console_print(id"[AMXX] Client ^"%s^" kicked"name2)
    
    return 
PLUGIN_HANDLED
}

public 
cmdUnban(idlevelcid)
{
    if (!
cmd_access(idlevelcid2))
        return 
PLUGIN_HANDLED
    
    
new arg[32], authid[32], name[32]
    
    
read_argv(1arg31)
    
    if (
contain(arg".") != -1)
    {
        
server_cmd("removeip ^"%s^";writeip"arg)
        
console_print(id"[AMXX] %L"id"IP_REMOVED"arg)
    } else {
        
server_cmd("removeid %s;writeid"arg)
        
console_print(id"[AMXX] %L"id"AUTHID_REMOVED"arg)
    }

    
get_user_name(idname31)
    
    switch (
get_cvar_num("amx_show_activity"))
    {
        case 
2chat_color(0,"%L"LANG_PLAYER"ADMIN_UNBAN_2"namearg)
        case 
1chat_color(0,"%L"LANG_PLAYER"ADMIN_UNBAN_1"arg)
    }

    
get_user_authid(idauthid31)
    
log_amx("Cmd: ^"%s<%d><%s><>^" unban ^"%s^""nameget_user_userid(id), authidarg)
    
    return 
PLUGIN_HANDLED
}

public 
cmdAddBan(idlevelcid)
{
    if (!
cmd_access(idlevelcid3))
        return 
PLUGIN_HANDLED

    
new arg[32], authid[32], name[32], minutes[32], reason[32]
    
    
read_argv(1arg31)
    
read_argv(2minutes31)
    
read_argv(3reason31)
    
    if (
contain(arg".") != -1)
    {
        
server_cmd("addip ^"%s^" ^"%s^";wait;writeip"minutesarg)
        
console_print(id"[AMXX] Ip ^"%s^" added to ban list"arg)
    } else {
        
server_cmd("banid ^"%s^" ^"%s^";wait;writeid"minutesarg)
        
console_print(id"[AMXX] Authid ^"%s^" added to ban list"arg)
    }

    
get_user_name(idname31)

    switch (
get_cvar_num("amx_show_activity"))
    {
        case 
2chat_color(0,"%L"LANG_PLAYER"ADMIN_ADDBAN_2"namearg)
        case 
1chat_color(0,"%L"LANG_PLAYER"ADMIN_ADDBAN_1"arg)
    }

    
get_user_authid(idauthid31)
    
log_amx("Cmd: ^"%s<%d><%s><>^" ban ^"%s^" (minutes ^"%s^") (reason ^"%s^")"nameget_user_userid(id), authidargminutesreason)

    return 
PLUGIN_HANDLED
}

public 
cmdBan(idlevelcid)
{
    if (!
cmd_access(idlevelcid3))
        return 
PLUGIN_HANDLED
    
    
new target[32], minutes[8], reason[64]
    
    
read_argv(1target31)
    
read_argv(2minutes7)
    
read_argv(3reason63)
    
    new 
player cmd_target(idtarget9)
    
    if (!
player)
        return 
PLUGIN_HANDLED
    
    
new authid[32], name2[32], authid2[32], name[32]
    new 
userid2 get_user_userid(player)
    
    
get_user_authid(playerauthid231)
    
get_user_authid(idauthid31)
    
get_user_name(playername231)
    
get_user_name(idname31)
    
    
    new 
temp[64], banned[16], nNum str_to_num(minutes)
    if (
nNum)
        
format(temp63"Ai primit ban pentru %s minute"minutes)
    else
        
format(temp63"Ai primit ban permanent Permanent"player"PERM")
    
format(banned15""player"BANNED")

    new 
address[32]
    
get_user_ip(playeraddress311)

    if (
reason[0])
        
server_cmd("kick #%d ^"%(%%s)^";wait;addip ^"%s^" ^"%s^";wait;writeip"userid2reasonbannedtempminutesaddress)
    else
        
server_cmd("kick #%d ^"%%s^";wait;addip ^"%s^" ^"%s^";wait;writeip"userid2bannedtempminutesaddress)

    new 
pl[32];
    
get_user_name(playerpl31)
    
chat_color(0,"!gADMIN!team %s!g: ban!team %s!g pentru!team %s!g minute. Motiv: (!team %s!g )"nameplminutesreason)    
    
client_cmd(player"wait;snapshot;wait");
        
    new 
activity get_cvar_num("amx_show_activity")
    if (
activity != 0)
    {

    }
    
console_print(id"Jucatorul %s a fost banat"name2)
    
    return 
PLUGIN_HANDLED
}

public 
cmdBanIP(idlevelcid)
{
    if (!
cmd_access(idlevelcid3))
        return 
PLUGIN_HANDLED
    
    
new target[32], minutes[8], reason[64]
    
    
read_argv(1target31)
    
read_argv(2minutes7)
    
read_argv(3reason63)
    
    new 
player cmd_target(idtarget9)
    
    if (!
player)
        return 
PLUGIN_HANDLED
    
    
new authid[32], name2[32], authid2[32], name[32]
    new 
userid2 get_user_userid(player)
    
    
get_user_authid(playerauthid231)
    
get_user_authid(idauthid31)
    
get_user_name(playername231)
    
get_user_name(idname31)
    
    
    new 
temp[64], banned[16], nNum str_to_num(minutes)
    if (
nNum)
        
format(temp63"Ai primit ban pentru %s minute"minutes)
    else
        
format(temp63"Ai primit ban permanent"player"PERM")
    
format(banned15""player"BANNED")

    new 
address[32]
    
get_user_ip(playeraddress311)

    if (
reason[0])
        
server_cmd("kick #%d ^"%(%%s)^";wait;addip ^"%s^" ^"%s^";wait;writeip"userid2reasonbannedtempminutesaddress)
    else
        
server_cmd("kick #%d ^"%%s^";wait;addip ^"%s^" ^"%s^";wait;writeip"userid2bannedtempminutesaddress)

    new 
pl[32];
    
get_user_name(playerpl31)
    
chat_color(0,"!gADMIN!team %s!g: ban!team %s!g pentru!team %s!g minute. Motiv: (!team %s!g )"nameplminutesreason)     
    
client_cmd(player"wait;snapshot;wait");
        
    new 
activity get_cvar_num("amx_show_activity")
    if (
activity != 0)
    {

    }
    
console_print(id"JucaTorul %s a FosT banaT!"name2)
    
    return 
PLUGIN_HANDLED
}

public 
cmdSlay(idlevelcid)
{
    if (!
cmd_access(idlevelcid2))
        return 
PLUGIN_HANDLED
    
    
new arg[32]
    
    
read_argv(1arg31)
    
    new 
player cmd_target(idarg5)
    
    if (!
player)
        return 
PLUGIN_HANDLED
    
    user_kill
(player)
    
    new 
authid[32], name2[32], authid2[32], name[32]
    
    
get_user_authid(idauthid31)
    
get_user_name(idname31)
    
get_user_authid(playerauthid231)
    
get_user_name(playername231)
    
    
log_amx("Cmd: ^"%s<%d><%s><>^" slay ^"%s<%d><%s><>^""nameget_user_userid(id), authidname2get_user_userid(player), authid2)

    switch (
get_cvar_num("amx_show_activity"))
    {
        case 
2chat_color(0,"%L"LANG_PLAYER"ADMIN_SLAY_2"namename2)
        case 
1chat_color(0,"%L"LANG_PLAYER"ADMIN_SLAY_1"name2)
    }
    
console_print(id"[AMXX] %L"id"CLIENT_SLAYED"name2)
    
    return 
PLUGIN_HANDLED
}

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

    
new arg[32]
    
    
read_argv(1arg31)
    new 
player cmd_target(idarg5)
    
    if (!
player)
        return 
PLUGIN_HANDLED

    
new spower[32], authid[32], name2[32], authid2[32], name[32]
    
    
read_argv(2spower31)
    
    new 
damage str_to_num(spower)
    
    
user_slap(playerdamage)
    
    
get_user_authid(idauthid31)
    
get_user_name(idname31)
    
get_user_authid(playerauthid231)
    
get_user_name(playername231)
    
    
log_amx("Cmd: ^"%s<%d><%s><>^" slap with %d damage ^"%s<%d><%s><>^""nameget_user_userid(id), authiddamagename2get_user_userid(player), authid2)

    switch (
get_cvar_num("amx_show_activity"))
    {
        case 
2chat_color(0,"%L"LANG_PLAYER"ADMIN_SLAP_2"namename2damage)
        case 
1chat_color(0,"%L"LANG_PLAYER"ADMIN_SLAP_1"name2damage)
    }
    
console_print(id"[AMXX] %L"id"CLIENT_SLAPED"name2damage)
    
    return 
PLUGIN_HANDLED
}

public 
chMap(map[])
{
    
server_cmd("changelevel %s"map)
}

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

    
new arg[32]
    new 
arglen read_argv(1arg31)
    
    if (!
is_map_valid(arg))
    {
        
console_print(id"[AMXX] %L"id"MAP_NOT_FOUND")
        return 
PLUGIN_HANDLED
    
}

    new 
authid[32], name[32]
    
    
get_user_authid(idauthid31)
    
get_user_name(idname31)
    
    switch (
get_cvar_num("amx_show_activity"))
    {
        case 
2chat_color(0,"%L"LANG_PLAYER"ADMIN_MAP_2"namearg)
        case 
1chat_color(0,"%L"LANG_PLAYER"ADMIN_MAP_1"arg)
    }
    
    
log_amx("Cmd: ^"%s<%d><%s><>^" changelevel ^"%s^""nameget_user_userid(id), authidarg)
    
    new 
_modName[10]
    
get_modname(_modName9)
    
    if (!
equal(_modName"zp"))
    {
        
message_begin(MSG_ALLSVC_INTERMISSION)
        
message_end()
    }
    
    
set_task(2.0"chMap"0argarglen 1)
    
    return 
PLUGIN_HANDLED
}

onlyRcon(name[])
{
    for (new 
0g_cvarRconNum; ++a)
        if (
equali(g_cvarRcon[a], name))
            return 
1
    
return 0
}

public 
cmdCvar(idlevelcid)
{
    if (!
cmd_access(idlevelcid2))
        return 
PLUGIN_HANDLED
    
    
new arg[32], arg2[64]
    
    
read_argv(1arg31)
    
read_argv(2arg263)
    
    if (
equal(arg"add") && (get_user_flags(id) & ADMIN_RCON))
    {
        if (
cvar_exists(arg2))
        {
            if (
g_cvarRconNum MAXRCONCVARS)
                
copy(g_cvarRcon[g_cvarRconNum++], 31arg2)
            else
                
console_print(id"[AMXX] %L"id"NO_MORE_CVARS")
        }
        return 
PLUGIN_HANDLED
    
}
    
    if (!
cvar_exists(arg))
    {
        
console_print(id"[AMXX] %L"id"UNKNOWN_CVAR"arg)
        return 
PLUGIN_HANDLED
    
}
    
    if (
onlyRcon(arg) && !(get_user_flags(id) & ADMIN_RCON))
    {
        
console_print(id"[AMXX] %L"id"CVAR_NO_ACC")
        return 
PLUGIN_HANDLED
    
}
    else if (
equal(arg"sv_password") && !(get_user_flags(id) & ADMIN_PASSWORD))
    {
        
console_print(id"[AMXX] %L"id"CVAR_NO_ACC")
        return 
PLUGIN_HANDLED
    
}
    
    if (
read_argc() < 3)
    {
        
get_cvar_string(argarg263)
        
console_print(id"[AMXX] %L"id"CVAR_IS"argarg2)
        return 
PLUGIN_HANDLED
    
}

    new 
authid[32], name[32]
    
    
get_user_authid(idauthid31)
    
get_user_name(idname31)
    
    
log_amx("Cmd: ^"%s<%d><%s><>^" set cvar (name ^"%s^") (value ^"%s^")"nameget_user_userid(id), authidargarg2)
    
set_cvar_string(argarg2)

    new 
activity get_cvar_num("amx_show_activity")
    if (
activity != 0)
    {
        new 
players[32], pnumadmin[64], cvar_val[64], len
        get_players
(playerspnum"c")
        
        for (new 
0pnumi++)
        {
            
len format(admin255"%L"players[i], "ADMIN")
            
            if (
activity == 1)
                
len += copy(admin[len], 255-len":")
            else
                
len += format(admin[len], 255-len" %s:"name)

            if (
equal(arg"rcon_password") || equal(arg"sv_password"))
                
format(cvar_val63"*** %L ***"players[i], "PROTECTED")
            else
                
copy(cvar_val63arg2)
            
            
chat_color(players[i],"%L"players[i], "SET_CVAR_TO"nameargarg2)
        }
    }
    
console_print(id"[AMXX] %L"id"CVAR_CHANGED"argarg2)
    
    return 
PLUGIN_HANDLED
}

public 
cmdPlugins(idlevelcid)
{
    if (!
cmd_access(idlevelcid1))
        return 
PLUGIN_HANDLED

    
new name[32], version[32], author[32], filename[32], status[32]
    new 
lName[32], lVersion[32], lAuthor[32], lFile[32], lStatus[32]

    
format(lName31"%L"id"NAME")
    
format(lVersion31"%L"id"VERSION")
    
format(lAuthor31"%L"id"AUTHOR")
    
format(lFile31"%L"id"FILE")
    
format(lStatus31"%L"id"STATUS")

    new 
num get_pluginsnum()
    new 
running 0
    
    console_print
(id"%L:"id"LOADED_PLUGINS")
    
console_print(id"%-18.17s %-8.7s %-17.16s %-16.15s %-9.8s"lNamelVersionlAuthorlFilelStatus)

    for (new 
0<numi++)
    {
        
get_plugin(ifilename31name31version31author31status31)
        
console_print(id"%-18.17s %-8.7s %-17.16s %-16.15s %-9.8s"nameversionauthorfilenamestatus)
        
        if (
status[0]=='d' || status[0]=='r'// "debug" or "running"
            
running++
    }
    
console_print(id"%L"id"PLUGINS_RUN"numrunning)

    return 
PLUGIN_HANDLED
}

public 
cmdModules(idlevelcid)
{
    if (!
cmd_access(idlevelcid1))
        return 
PLUGIN_HANDLED

    
new name[32], version[32], author[32], statussStatus[16]
    new 
lName[32], lVersion[32], lAuthor[32]

    
format(lName31"%L"id"NAME")
    
format(lVersion31"%L"id"VERSION")
    
format(lAuthor31"%L"id"AUTHOR")

    new 
num get_modulesnum()
    
    
console_print(id"%L:"id"LOADED_MODULES")
    
console_print(id"%-23.22s %-8.7s %-20.19s"lNamelVersionlAuthor)
    
    for (new 
0numi++)
    {
        
get_module(iname31author31version31status)
        
        switch (
status)
        {
            case 
module_loadedcopy(sStatus15"running")
            default: 
copy(sStatus15"error")
        }
        
        
console_print(id"%-23.22s %-8.7s %-20.19s"nameversionauthor)
    }
    
console_print(id"%L"id"NUM_MODULES"num)

    return 
PLUGIN_HANDLED
}

public 
cmdCfg(idlevelcid)
{
    if (!
cmd_access(idlevelcid2))
        return 
PLUGIN_HANDLED
    
    
new arg[128]
    
read_argv(1arg127)
    
    if (!
file_exists(arg))
    {
        
console_print(id"[AMXX] %L"id"FILE_NOT_FOUND"arg)
        return 
PLUGIN_HANDLED
    
}
    
    new 
authid[32], name[32]
    
    
get_user_authid(idauthid31)
    
get_user_name(idname31)
    
    
log_amx("Cmd: ^"%s<%d><%s><>^" execute cfg (file ^"%s^")"nameget_user_userid(id), authidarg)
    
    
console_print(id"[AMXX] Executing file ^"%s^""arg)
    
server_cmd("exec %s"arg)

    switch(
get_cvar_num("amx_show_activity"))
    {
        case 
2chat_color(0,"%L"LANG_PLAYER"ADMIN_CONF_2"namearg)
        case 
1chat_color(0,"%L"LANG_PLAYER"ADMIN_CONF_1"arg)
    }

    return 
PLUGIN_HANDLED
}

public 
cmdLBack()
{
    if (!
g_PauseAllowed)
        return 
PLUGIN_CONTINUE    

    
new paused[25]
    
    
format(paused24"%L"g_pauseCong_Paused "UNPAUSED" "PAUSED")
    
set_cvar_float("pausable"g_pausAble)
    
console_print(g_pauseCon"[AMXX] Server %s"paused)
    
g_PauseAllowed false
    
    
if (g_Paused)
        
g_Paused false
    
else 
        
g_Paused true
    
    
return PLUGIN_HANDLED
}

public 
cmdPause(idlevelcid)
{
    if (!
cmd_access(idlevelcid1))
        return 
PLUGIN_HANDLED 
    
    
new authid[32], name[32], slayer id
    
    get_user_authid
(idauthid31
    
get_user_name(idname31
    
g_pausAble get_cvar_float("pausable")
    
    if (!
slayer)
        
slayer find_player("h"
    
    if (!
slayer)
    { 
        
console_print(id"[AMXX] %L"id"UNABLE_PAUSE"
        return 
PLUGIN_HANDLED
    
}

    
set_cvar_float("pausable"1.0)
    
g_PauseAllowed true
    client_cmd
(slayer"pause;pauseAck")
    
    
log_amx("Cmd: ^"%s<%d><%s><>^" %s server"nameget_user_userid(id), authidg_Paused "unpause" "pause")
    
    
console_print(id"[AMXX] %L"idg_Paused "UNPAUSING" "PAUSING")

    new 
activity get_cvar_num("amx_show_activity")
    if (
activity != 0)
    {
        new 
players[32], pnummsg[128], len
        get_players
(playerspnum"c")
        
        for (new 
0pnumi++)
        {
            
len format(msg127"%L"players[i], "ADMIN")
            
            if (
activity == 1)
                
len += copy(msg[len], 127-len": ")
            else
                
len += format(msg[len], 127-len" %s: "name)
            
            
format(msg[len], 127-len"%L"players[i], g_Paused "UNPAUSE" "PAUSE")
            
client_print(players[i], print_chat"%s server"msg)
        }
    }
    
g_pauseCon id
    
    
return PLUGIN_HANDLED


public 
cmdShowRcon(idlevelcid)
{
    if (!
cmd_access(idlevelcid2))
        return 
PLUGIN_HANDLED
        
    
new password[64]
    
    
get_cvar_string("rcon_password"password63)
    
    if (!
password[0])
    {
        
cmdRcon(idlevelcid)
    } else {
        new 
args[128]
        
        
read_args(args127)
        
client_cmd(id"rcon_password %s"password)
        
client_cmd(id"rcon %s"args)
    }
    
    return 
PLUGIN_HANDLED
}

public 
cmdRcon(idlevelcid)
{
    if (!
cmd_access(idlevelcid2))
        return 
PLUGIN_HANDLED
    
    
new arg[128], authid[32], name[32]
    
    
read_args(arg127)
    
get_user_authid(idauthid31)
    
get_user_name(idname31)
    
    
log_amx("Cmd: ^"%s<%d><%s><>^" server console (cmdline ^"%s^")"nameget_user_userid(id), authidarg)
    
    
console_print(id"[AMXX] %L"id"COM_SENT_SERVER"arg)
    
server_cmd("%s"arg)
    
    return 
PLUGIN_HANDLED
}

public 
cmdWho(idlevelcid)
{
    if (!
cmd_access(idlevelcid1))
        return 
PLUGIN_HANDLED

    
new players[32], inumcl_on_server[64], authid[32], name[32], flagssflags[32]
    new 
lImm[16], lRes[16], lAccess[16], lYes[16], lNo[16]
    
    
format(lImm15"%L"id"IMMU")
    
format(lRes15"%L"id"RESERV")
    
format(lAccess15"%L"id"ACCESS")
    
format(lYes15"%L"id"YES")
    
format(lNo15"%L"id"NO")
    
    
get_players(playersinum)
    
format(cl_on_server63"%L"id"CLIENTS_ON_SERVER")
    
console_print(id"^n%s:^n #  %-16.15s %-20s %-8s %-4.3s %-4.3s %s"cl_on_server"nick""authid""userid"lImmlReslAccess)
    
    for (new 
0inum; ++a)
    {
        
get_user_authid(players[a], authid31)
        
get_user_name(players[a], name31)
        
flags get_user_flags(players[a])
        
get_flags(flagssflags31)
        
console_print(id"%2d  %-16.15s %-20s %-8d %-6.5s %-6.5s %s"players[a], nameauthid
        
get_user_userid(players[a]), (flags&ADMIN_IMMUNITY) ? lYes lNo, (flags&ADMIN_RESERVATION) ? lYes lNosflags)
    }
    
    
console_print(id"%L"id"TOTAL_NUM"inum)
    
get_user_authid(idauthid31)
    
get_user_name(idname31)
    
log_amx("Cmd: ^"%s<%d><%s><>^" ask for players list"nameget_user_userid(id), authid
    
    return 
PLUGIN_HANDLED
}

hasTag(name[], tags[4][32], tagsNum)
{
    for (new 
0tagsNum; ++a)
        if (
contain(nametags[a]) != -1)
            return 
a
    
return -1
}

public 
cmdLeave(idlevelcid)
{
    if (!
cmd_access(idlevelcid2))
        return 
PLUGIN_HANDLED
    
    
new argnum read_argc()
    new 
ltags[4][32]
    new 
ltagsnum 0
    
    
for (new 15; ++a)
    {
        if (
argnum)
            
read_argv(altags[ltagsnum++], 31)
        else
            
ltags[ltagsnum++][0] = 0
    
}
    
    new 
nick[32], irespnum get_maxplayers() + 1count 0lReason[128]
    
    for (new 
1pnum; ++b)
    {
        if (!
is_user_connected(b) && !is_user_connecting(b)) continue

        
get_user_name(bnick31)
        
ires hasTag(nickltagsltagsnum)
        
        if (
ires != -1)
        {
            
console_print(id"[AMXX] %L"id"SKIP_MATCH"nickltags[ires])
            continue
        }
        
        if (
get_user_flags(b) & ADMIN_IMMUNITY)
        {
            
console_print(id"[AMXX] %L"id"SKIP_IMM"nick)
            continue
        }
        
        
console_print(id"[AMXX] %L"id"KICK_PL"nick)
        
        if (
is_user_bot(b))
            
server_cmd("kick #%d"get_user_userid(b))
        else
        {
            
format(lReason127"%L"b"YOU_DROPPED")
            
server_cmd("kick #%d ^"%s^""get_user_userid(b), lReason)
        }
        
count++
    }
    
    
console_print(id"[AMXX] %L"id"KICKED_CLIENTS"count)
    
    new 
authid[32], name[32]

    
get_user_authid(idauthid31)
    
get_user_name(idname31)
    
log_amx("Kick: ^"%s<%d><%s><>^" leave some group (tag1 ^"%s^") (tag2 ^"%s^") (tag3 ^"%s^") (tag4 ^"%s^")"nameget_user_userid(id), authidltags[0], ltags[1], ltags[2], ltags[3])

    switch(
get_cvar_num("amx_show_activity"))
    {
        case 
2chat_color(0,"%L"LANG_PLAYER"ADMIN_LEAVE_2"nameltags[0], ltags[1], ltags[2], ltags[3])
        case 
1chat_color(0,"%L"LANG_PLAYER"ADMIN_LEAVE_1"ltags[0], ltags[1], ltags[2], ltags[3])
    } 

    return 
PLUGIN_HANDLED
}

public 
cmdNick(idlevelcid)
{
    if (!
cmd_access(idlevelcid3))
        return 
PLUGIN_HANDLED

    
new arg1[32], arg2[32], authid[32], name[32], authid2[32], name2[32]

    
read_argv(1arg131)
    
read_argv(2arg231)

    new 
player cmd_target(idarg11)
    
    if (!
player)
        return 
PLUGIN_HANDLED

    get_user_authid
(idauthid31)
    
get_user_name(idname31)
    
get_user_authid(playerauthid231)
    
get_user_name(playername231)

    
client_cmd(player"name ^"%s^""arg2)

    
log_amx("Cmd: ^"%s<%d><%s><>^" change nick to ^"%s^" ^"%s<%d><%s><>^""nameget_user_userid(id), authidarg2name2get_user_userid(player), authid2)

    switch (
get_cvar_num("amx_show_activity"))
    {
        case 
2chat_color(0,"%L"LANG_PLAYER"ADMIN_NICK_2"namename2arg2)
        case 
1chat_color(0,"%L"LANG_PLAYER"ADMIN_NICK_1"name2arg2)
    }
    
console_print(id"[AMXX] %L"id"CHANGED_NICK"name2arg2)

    return 
PLUGIN_HANDLED
}
stock chat_color(const id, const input[], any:...)
{
 new 
count 1players[32]
 static 
msg[191]
 
vformat(msg190input3)
 
 
replace_all(msg190"!g""^4")
 
replace_all(msg190"!y""^1")
 
replace_all(msg190"!team""^3")
 
 if (
idplayers[0] = id; else get_players(playerscount"ch")
 {
  for (new 
0counti++)
  {
   if (
is_user_connected(players[i]))
   {
    
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _players[i])
    
write_byte(players[i]);
    
write_string(msg);
    
message_end();
   }
  }
 }

MrSnow is offline
Uzviseni Bog
Senior Member
Join Date: Jun 2020
Old 03-01-2024 , 11:47   Re: Plmenu request
Reply With Quote #2

\r -red
\w -white
\y -yellow
Uzviseni Bog is offline
MrSnow
Junior Member
Join Date: Feb 2024
Old 03-01-2024 , 12:45   Re: Plmenu request
Reply With Quote #3

How is that going to help me ? Its not Like i understand anything with this.
MrSnow is offline
MrSnow
Junior Member
Join Date: Feb 2024
Old 03-01-2024 , 15:43   Re: Plmenu request
Reply With Quote #5

I dont understand anything.
MrSnow is offline
Reply


Thread Tools
Display Modes

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 04:06.


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