ayuda tengo doble say
#1
buenas tengo un problema cuando coloco say @hola o say_team @hola este hace doble mensaje sale hud y tambien lo envia como say solo tengo el admin prefix para cambiar el say de los admin ayuda porfaaa

Código PHP:
/*  AMX Mod X script
*                               ______                       __                    __          __                              ________
*                       / ____ \                      \ \                  / /         /  |                            |______  |
*                      / /    \ \                      \ \                / /         /   |                        __         | |
*                     | /      \ |                      \ \              / /         / /| |                       |__|        | |
*                     | |      | |    ______     _    __ \ \            / /  _      / / | |       ______                      | |
*         _   _____   _____   | |      | |   / ____ \   | |  / /  \ \          / /  |_|    / /  | |      / ____ \                     | |
*    | | / __  | / __  |  | |      | |  | /    \_\  | | / /    \ \        / /    _    / /   | |     /_/    \ \                    | |
*    | |/ /  | |/ /  | |  | |      | |  | \_____    | |/ /      \ \      / /    | |  / /____| |__     ______| |                   | |
*    | | /   | | /   | |  | |      | |   \_____ \   | | /        \ \    / /     | | /_______  |__|   / _____  |                   | |
*    | |/    | |/    | |  | |      | |         \ |  | |/\         \ \  / /      | |         | |     / /     | |        __         | |
*     | |     | |     | |  | \      / |  __     | |  | |\ \         \ \/ /       | |         | |    | |     /| |       |  |        | |
*    | |     | |     | |   \ \____/ /   \ \____/ |  | | \ \         \  /        | |         | |     \ \___/ /\ \      / /    _____| |
*    |_|     |_|     |_|    \______/     \______/   |_|  \_\         \/         |_|         |_|      \_____/  \_\    /_/    |_______|
*
*
*
*** Copyright 2011 - 2013, m0skVi4a ;]
*** Plugin created in Rousse, Bulgaria
*
*
*** Plugin thread 1:
*    https://forums.alliedmods.net/showthread.php?t=183491
*
*** Plugin thread 2:
*    http://amxmodxbg.org/forum/viewtopic.php?t=38972
*
*
*** Description:
*
*    With this plugin you can set prefixes to Admins with special flags. Also Admins can put custom prefixes to them or to other players if they want, but only if they have the required flag.
*
*
*** Commands:
*
*    ap_reload_prefixes
*    Reloads Prefixes' file from console without restarting the server.
*
*    ap_reload_badprefixes
*    Reloads Bad Prefixes' file from console without restarting the server.
*
*    ap_put_player "name" "prefix"
*    Puts prefix to the name you type if you have the special flag. Or if there is no prefix typed, removes the prefix which the player has.
*
*
*** CVARS:
*
*    "ap_bad_prefixes"     -     Is the Bad Prefixes option on(1) or off(0).   Default: 1
*    "ap_listen"         -     Is the Admin Listen option on(1) or off(0).   Default: 1
*    "ap_listen_flag"     -    The flag, needed for Listen option.   Default: a
*    "ap_custom"         -    Is the Custom Prefix option for each Admin is on(1) or off(0).   Default: 1
*    "ap_custom_flag"      -    The flag, needed for setting custom prefix.   Default: b
*    "ap_say_characters"     -    Is the Start Say Characters option on(1) or off(0).   Default: 1
*    "ap_prefix_characters"     -    Is the Checker for Characters in Custom Prefixes' Options on(1) or off(0).   Default: 1
*
*    All CVARS are without quotes!
*
*
*** Credits:
*
*     m0skVi4a ;]        -    for the idea, making and testing the plugin
*    SpeeDeeR        -    for little help with the plugin
*    Ant1Lamer        -    for testing the plugin
*    Vasilii-Zaicev    -    for testing the plugin
*
*
*** Changelog:
*
*    April 22, 2012   -  V1.0:
*        -  First Release
*
*    May 19, 2012   -  V2.0:
*        -  Full optimization
*        -  Added Bad Prefixes' file
*        -  Added Multi-Lingual file
*        -  Added IP and Name support in ap_prefixes.ini
*        -  Added Forbidden Say characters
*        -  New CVARS for setting the flags for each of the options
*    
*    May 29, 2012   -  V2.1:
*        -  Fixed bug with some say or say_team commands are not executed
*
*    January 17, 2013   -  V3.0:
*        -  Full optimization
*        -  Fixed bug when typing spaces and in tha chat is showing an empty message
*        -  SteamID support
*        -  Removed nvault
*        -  Removed ap_put_player command
*        -  ap_put_player command is combined with ap_put command
*        -  Removed some CVARs
*
*    August 18, 2013   -  V4.0:
*        -  Small code changes and little bug fixes
*        -  Added Prefux Toggle command
*        -  Fixed bug with the supporting of the plugin on AMXX 1.8.2
*        -  AMXX 1.8.2 Supprot! 
*        -  SQL Version!
*
*
*** Contact me on:
*    E-MAIL: [email protected]
*    SKYPE: pa7ohin
*/


#include <amxmodx>
#include <amxmisc>
#include <celltrie>
#include <cstrike>

#define VERSION "4.0"
#define FLAG_LOAD ADMIN_CFG
#define MAX_PREFIXES 33
#define MAX_BAD_PREFIXES 100

new g_bad_prefixg_listeng_listen_flagg_customg_custom_flagg_say_charactersg_prefix_characters;
new 
pre_ips_count 0pre_names_count 0pre_steamids_countpre_flags_count 0bad_prefix_count 0itemp_cvar[2];
new 
configs_dir[64], file_prefixes[128], file_bad_prefixes[128], text[128], prefix[32], type[2], key[32], lengthline 0error[256];
new 
g_saytxtg_maxplayersCsTeams:g_team;
new 
g_typed[192], g_message[192], g_name[32];
new 
Trie:pre_ips_collectTrie:pre_names_collectTrie:pre_steamids_collectTrie:pre_flags_collectTrie:bad_prefixes_collectTrie:client_prefix;
new 
str_id[16], temp_key[35], temp_prefix[32], temp_value;
new 
bool:g_toggle[33];

new const 
say_team_info[2][CsTeams][] =
{
    {
"*SPEC* ""*DEAD* ""*DEAD* ""*SPEC* "},
    {
""""""""}
}

new const 
sayteam_team_info[2][CsTeams][] =
{
    {
"(Spectator) ""*DEAD*(Terrorist) ""*DEAD*(Counter-Terrorist) ""(Spectator) "},
    {
"(Spectator) ""(Terrorist) ""(Counter-Terrorist) ""(Spectator) "}
}

new const 
forbidden_say_symbols[] = {
    
"/",
    
"!",
    
"%",
    
"$"
}

new const 
forbidden_prefixes_symbols[] = {
    
"/",
    
"\",
    "
%",
    "
$",
    "
.",
    "
:",
    "
?",
    "
!",
    "
@",
    "
#",
    
"%"
}

new const 
separator[] = "************************************************"
new const in_prefix[] = "[AdminPrefixes]"

public plugin_init()
{
    
register_plugin("Admin Prefixes"VERSION"m0skVi4a ;]")

    
g_bad_prefix register_cvar("ap_bad_prefixes""1")
    
g_listen register_cvar("ap_listen""1")
    
g_listen_flag register_cvar("ap_listen_flag""a")
    
g_custom register_cvar("ap_custom_current""1")
    
g_custom_flag register_cvar("ap_custom_current_flag""b")
    
g_say_characters register_cvar("ap_say_characters""1")
    
g_prefix_characters register_cvar("ap_prefix_characters""1")

    
g_saytxt get_user_msgid ("SayText")
    
g_maxplayers get_maxplayers()

    
register_concmd("ap_reload_prefixes""LoadPrefixes")
    
register_concmd("ap_reload_badprefixes""LoadBadPrefixes")
    
register_concmd("ap_put""SetPlayerPrefix")
    
register_clcmd("say""HookSay")
    
register_clcmd("say_team""HookSayTeam")

    
pre_ips_collect TrieCreate()
    
pre_names_collect TrieCreate()
    
pre_steamids_collect TrieCreate()
    
pre_flags_collect TrieCreate()
    
bad_prefixes_collect TrieCreate()
    
client_prefix TrieCreate()

    
register_dictionary("admin_prefixes.txt")

    
get_configsdir(configs_dircharsmax(configs_dir))
    
formatex(file_prefixescharsmax(file_prefixes), "%s/ap_prefixes.ini"configs_dir)
    
formatex(file_bad_prefixescharsmax(file_bad_prefixes), "%s/ap_bad_prefixes.ini"configs_dir)

    
LoadPrefixes(0)
    
LoadBadPrefixes(0)
}
    
public 
LoadPrefixes(id)
{
    if(!(
get_user_flags(id) & FLAG_LOAD))
    {
        
console_print(id"%L"LANG_SERVER"PREFIX_PERMISSION"in_prefix)
        return 
PLUGIN_HANDLED
    
}

    
TrieClear(pre_ips_collect)
    
TrieClear(pre_names_collect)
    
TrieClear(pre_steamids_collect)
    
TrieClear(pre_flags_collect)

    
line 0length 0pre_flags_count 0pre_ips_count 0pre_names_count 0;

    if(!
file_exists(file_prefixes)) 
    {
        
formatex(errorcharsmax(error), "%L"LANG_SERVER"PREFIX_NOT_FOUND"in_prefixfile_prefixes)
        
set_fail_state(error)
    }

    
server_print(separator)

    while(
read_file(file_prefixesline++ , textcharsmax(text), length) && (pre_ips_count pre_names_count pre_steamids_count pre_flags_count) <= MAX_PREFIXES)
    {
        if(!
text[0] || text[0] == '^n' || text[0] == ';' || (text[0] == '/' && text[1] == '/'))
            continue

        
parse(texttypecharsmax(type), keycharsmax(key), prefixcharsmax(prefix))
        
trim(prefix)

        if(!
type[0] || !prefix[0] || !key[0])
            continue

        
replace_all(prefixcharsmax(prefix), "!g""^x04")
        
replace_all(prefixcharsmax(prefix), "!t""^x03")
        
replace_all(prefixcharsmax(prefix), "!n""^x01")

        switch(
type[0])
        {
            case 
'f':
            {
                
pre_flags_count++
                
TrieSetString(pre_flags_collectkeyprefix)
                
server_print("%L"LANG_SERVER"PREFIX_LOAD_FLAG"in_prefixprefixkey[0])
            }
            case 
'i':
            {
                
pre_ips_count++
                
TrieSetString(pre_ips_collectkeyprefix)
                
server_print("%L"LANG_SERVER"PREFIX_LOAD_IP"in_prefixprefixkey)
            }
            case 
's':
            {
                
pre_steamids_count++
                
TrieSetString(pre_steamids_collectkeyprefix)
                
server_print("%L"LANG_SERVER"PREFIX_LOAD_STEAMID"in_prefixprefixkey)
            }
            case 
'n':
            {
                
pre_names_count++
                
TrieSetString(pre_names_collectkeyprefix)
                
server_print("%L"LANG_SERVER"PREFIX_LOAD_NAME"in_prefixprefixkey)
            }
            default:
            {
                continue
            }
        }
    }

    if(
pre_flags_count <= && pre_ips_count <= && pre_steamids_count <= && pre_names_count <= 0)
    {
        
server_print("%L"LANG_SERVER"PREFIX_NO"in_prefix)
    }

    
get_user_name(idg_namecharsmax(g_name))
    
server_print("%L"LANG_SERVER"PREFIX_LOADED_BY"in_prefixg_name)
    
console_print(id"%L"LANG_SERVER"PREFIX_LOADED"in_prefix)

    
server_print(separator)

    for(new 
1<= g_maxplayersi++)
    {
        
num_to_str(istr_idcharsmax(str_id))
        
TrieDeleteKey(client_prefixstr_id)
        
PutPrefix(i)
    }

    return 
PLUGIN_HANDLED
}

public 
LoadBadPrefixes(id)
{
    if(!
get_pcvar_num(g_bad_prefix))
    {
        
console_print(id"%L"LANG_SERVER"BADP_OFF"in_prefix)
        return 
PLUGIN_HANDLED
    
}

    if(!(
get_user_flags(id) & FLAG_LOAD))
    {
        
console_print(id"%L"LANG_SERVER"BADP_PERMISSION"in_prefix)
        return 
PLUGIN_HANDLED
    
}

    
TrieClear(bad_prefixes_collect)

    
line 0length 0bad_prefix_count 0;

    if(!
file_exists(file_bad_prefixes)) 
    {
        
console_print(id"%L"LANG_SERVER"BADP_NOT_FOUND"in_prefixfile_bad_prefixes)
        return 
PLUGIN_HANDLED        
    
}

    
server_print(separator)

    while(
read_file(file_bad_prefixesline++ , textcharsmax(text), length) && bad_prefix_count <= MAX_BAD_PREFIXES)
    {
        if(!
text[0] || text[0] == '^n' || text[0] == ';' || (text[0] == '/' && text[1] == '/'))
            continue

        
parse(textprefixcharsmax(prefix))

        if(!
prefix[0])
            continue

        
bad_prefix_count++
        
TrieSetCell(bad_prefixes_collectprefix1)
        
server_print("%L"LANG_SERVER"BADP_LOAD"in_prefixprefix)
    }

    if(
bad_prefix_count <= 0)
    {
        
server_print("%L"LANG_SERVER"BADP_NO"in_prefix)
    }

    
get_user_name(idg_namecharsmax(g_name))
    
server_print("%L"LANG_SERVER"BADP_LOADED_BY"in_prefixg_name)
    
console_print(id"%L"LANG_SERVER"BADP_LOADED"in_prefix)

    
server_print(separator)

    return 
PLUGIN_HANDLED
}

public 
client_putinserver(id)
{
    
g_toggle[id] = true
    num_to_str
(idstr_idcharsmax(str_id))
    
TrieSetString(client_prefixstr_id"")
    
PutPrefix(id)
}

public 
HookSay(id)
{
    
read_args(g_typedcharsmax(g_typed))
    
remove_quotes(g_typed)

    
trim(g_typed)

    if(
equal(g_typed"") || !is_user_connected(id))
        return 
PLUGIN_HANDLED_MAIN

    
if(equal(g_typed"/prefix"))
    {
        if(
g_toggle[id])
        {
            
g_toggle[id] = false
            client_print
(idprint_chat"%L"LANG_SERVER"PREFIX_OFF"in_prefix)
        }
        else
        {
            
g_toggle[id] = true
            client_print
(idprint_chat"%L"LANG_SERVER"PREFIX_ON"in_prefix)
        }

        return 
PLUGIN_HANDLED_MAIN
    
}

    if(!
g_toggle[id])
        return 
PLUGIN_CONTINUE

    num_to_str
(idstr_idcharsmax(str_id))

    if((
TrieGetString(client_prefixstr_idtemp_prefixcharsmax(temp_prefix)) && get_pcvar_num(g_say_characters) == 1) || (!TrieGetString(client_prefixstr_idtemp_prefixcharsmax(temp_prefix)) && get_pcvar_num(g_say_characters) == 2) || get_pcvar_num(g_say_characters) == 3)
    {
        if(
check_say_characters(g_typed))
            return 
PLUGIN_HANDLED_MAIN
    
}

    
get_user_name(idg_namecharsmax(g_name))

    
g_team cs_get_user_team(id)

    if(
temp_prefix[0])
    {
        
formatex(g_messagecharsmax(g_message), "^1%s^4%s^3 %s :^4 %s"say_team_info[is_user_alive(id)][g_team], temp_prefixg_nameg_typed)
    }
    else
    {
        
formatex(g_messagecharsmax(g_message), "^1%s^3%s :^1 %s"say_team_info[is_user_alive(id)][g_team], g_nameg_typed)
    }

    
get_pcvar_string(g_listen_flagtemp_cvarcharsmax(temp_cvar))

    for(new 
1<= g_maxplayersi++)
    {
        if(!
is_user_connected(i))
            continue

        if(
is_user_alive(id) && is_user_alive(i) || !is_user_alive(id) && !is_user_alive(i) || get_pcvar_num(g_listen) && get_user_flags(i) & read_flags(temp_cvar))
        {
            
send_message(g_messageidi)
        }
    }

    return 
PLUGIN_HANDLED_MAIN
}

public 
HookSayTeam(id)
{
    
read_args(g_typedcharsmax(g_typed))
    
remove_quotes(g_typed)

    
trim(g_typed)

    if(
equal(g_typed"") || !is_user_connected(id))
        return 
PLUGIN_HANDLED_MAIN

    
if(equal(g_typed"/prefix"))
    {
        if(
g_toggle[id])
        {
            
g_toggle[id] = false
            client_print
(idprint_chat"%L"LANG_SERVER"PREFIX_OFF"in_prefix)
        }
        else
        {
            
g_toggle[id] = true
            client_print
(idprint_chat"%L"LANG_SERVER"PREFIX_ON"in_prefix)
        }

        return 
PLUGIN_HANDLED_MAIN
    
}

    if(!
g_toggle[id])
        return 
PLUGIN_CONTINUE

    num_to_str
(idstr_idcharsmax(str_id))

    if((
TrieGetString(client_prefixstr_idtemp_prefixcharsmax(temp_prefix)) && get_pcvar_num(g_say_characters) == 1) || (!TrieGetString(client_prefixstr_idtemp_prefixcharsmax(temp_prefix)) && get_pcvar_num(g_say_characters) == 2) || get_pcvar_num(g_say_characters) == 3)
    {
        if(
check_say_characters(g_typed))
            return 
PLUGIN_HANDLED_MAIN
    
}

    
get_user_name(idg_namecharsmax(g_name))

    
g_team cs_get_user_team(id)

    if(
temp_prefix[0])
    {
        
formatex(g_messagecharsmax(g_message), "^1%s^4%s^3 %s :^4 %s"sayteam_team_info[is_user_alive(id)][g_team], temp_prefixg_nameg_typed)
    }
    else
    {
        
formatex(g_messagecharsmax(g_message), "^1%s^3%s :^1 %s"sayteam_team_info[is_user_alive(id)][g_team], g_nameg_typed)
    }

    
get_pcvar_string(g_listen_flagtemp_cvarcharsmax(temp_cvar))

    for(new 
1<= g_maxplayersi++)
    {
        if(!
is_user_connected(i))
            continue

        if(
get_user_team(id) == get_user_team(i) || get_pcvar_num(g_listen) && get_user_flags(i) & read_flags(temp_cvar))
        {
            if(
is_user_alive(id) && is_user_alive(i) || !is_user_alive(id) && !is_user_alive(i) || get_pcvar_num(g_listen) && get_user_flags(i) & read_flags(temp_cvar))
            {
                
send_message(g_messageidi)
            }
        }
    }

    return 
PLUGIN_HANDLED_MAIN
}

public 
SetPlayerPrefix(id)
{
    if(!
get_pcvar_num(g_custom) || !get_pcvar_string(g_custom_flagtemp_cvarcharsmax(temp_cvar)))
    {
        
console_print(id"%L"LANG_SERVER"CUSTOM_OFF"in_prefix)
        return 
PLUGIN_HANDLED
    
}

    if(!(
get_user_flags(id) & read_flags(temp_cvar)))
    {
        
console_print(id"%L"LANG_SERVER"CUSTOM_PERMISSION"in_prefix)
        return 
PLUGIN_HANDLED
    
}

    new 
input[128], target;
    new 
arg_type[2], arg_prefix[32], arg_key[35];
    new 
temp_str[16];

    
read_args(inputcharsmax(input))
    
remove_quotes(input)
    
parse(inputarg_typecharsmax(arg_type), arg_keycharsmax(arg_key), arg_prefixcharsmax(arg_prefix))
    
trim(arg_prefix)

    if(
get_pcvar_num(g_bad_prefix) && is_bad_prefix(arg_prefix) && !equali(arg_prefix""))
    {
        
console_print(id"%L"LANG_SERVER"CUSTOM_FORBIDDEN"in_prefixarg_prefix)
        return 
PLUGIN_HANDLED
    
}

    if(
get_pcvar_num(g_prefix_characters) && check_prefix_characters(arg_prefix))
    {
        
console_print(id"%L"LANG_SERVER"CUSTOM_SYMBOL"in_prefixarg_prefixforbidden_prefixes_symbols[i])
        return 
PLUGIN_HANDLED
    
}

    switch(
arg_type[0])
    {
        case 
'f':
        {
            
target 0
            temp_str 
"Flag"
        
}
        case 
'i':
        {
            
target find_player("d"arg_key)
            
temp_str "IP"
        
}
        case 
's':
        {
            
target find_player("c"arg_key)
            
temp_str "SteamID"
        
}
        case 
'n':
        {
            
target find_player("a"arg_key)
            
temp_str "Name"
        
}
        default:
        {
            
console_print(id"%L"LANG_SERVER"CUSTOM_INVALID"in_prefixarg_type)
            return 
PLUGIN_HANDLED
        
}
    }

    
get_user_name(idg_namecharsmax(g_name))

    if(
equali(arg_prefix""))
    {
        
find_and_delete(arg_typearg_key)

        if(
target)
        {
            
PutPrefix(target)
        }
        
        
console_print(id"%L"LANG_SERVER"CUSTOM_REMOVE"in_prefixtemp_strarg_key)
        
server_print("%L"LANG_SERVER"CUSTOM_REMOVE_INFO"in_prefixg_nametemp_strarg_key)
        return 
PLUGIN_HANDLED
    
}

    
find_and_delete(arg_typearg_key)

    
formatex(textcharsmax(text), "^"%s^" ^"%s^" ^"%s^""arg_typearg_keyarg_prefix)
    
write_file(file_prefixestext, -1)

    switch(
arg_type[0])
    {
        case 
'f':
        {
            
TrieSetString(pre_flags_collectarg_keyarg_prefix)
        }
        case 
'i':
        {
            
TrieSetString(pre_ips_collectarg_keyarg_prefix)
        }
        case 
's':
        {
            
TrieSetString(pre_steamids_collectarg_keyarg_prefix)
        }
        case 
'n':
        {
            
TrieSetString(pre_names_collectarg_keyarg_prefix)
        }
    }

    if(
target)
    {
        
num_to_str(targetstr_idcharsmax(str_id))
        
TrieSetString(client_prefixstr_idarg_prefix)
    }

    
console_print(id"%L"LANG_SERVER"CUSTOM_CHANGE"in_prefixtemp_strarg_keyarg_prefix)
    
server_print("%L"LANG_SERVER"CUSTOM_CHANGE_INFO"in_prefixg_nametemp_strarg_keyarg_prefix

    return 
PLUGIN_HANDLED
}

public 
client_infochanged(id)
{
    if(!
is_user_connected(id))
        return 
PLUGIN_CONTINUE

    
new g_old_name[32];

    
get_user_info(id"name"g_namecharsmax(g_name))
    
get_user_name(idg_old_namecharsmax(g_old_name))

    if(!
equal(g_nameg_old_name))
    {
        
num_to_str(idstr_idcharsmax(str_id))
        
TrieSetString(client_prefixstr_id"")
        
set_task(0.5"PutPrefix"id)
        return 
PLUGIN_HANDLED
    
}

    return 
PLUGIN_CONTINUE
}

public 
PutPrefix(id)
{
    
num_to_str(idstr_idcharsmax(str_id))
    
TrieSetString(client_prefixstr_id"")

    new 
sflags[32], temp_flag[2];
    
get_flags(get_user_flags(id), sflagscharsmax(sflags))

    for(new 
0<= charsmax(sflags); i++)
    {
        
formatex(temp_flagcharsmax(temp_flag), "%c"sflags[i])

        if(
TrieGetString(pre_flags_collecttemp_flagtemp_prefixcharsmax(temp_prefix)))
        {
            
TrieSetString(client_prefixstr_idtemp_prefix)
        }
    }

    
get_user_ip(idtemp_keycharsmax(temp_key), 1)

    if(
TrieGetString(pre_ips_collecttemp_keytemp_prefixcharsmax(temp_prefix)))
    {
        
TrieSetString(client_prefixstr_idtemp_prefix)
    }

    
get_user_authid(idtemp_keycharsmax(temp_key))

    if(
TrieGetString(pre_steamids_collecttemp_keytemp_prefixcharsmax(temp_prefix)))
    {
        
TrieSetString(client_prefixstr_idtemp_prefix)
    }

    
get_user_name(idtemp_keycharsmax(temp_key))

    if(
TrieGetString(pre_names_collecttemp_keytemp_prefixcharsmax(temp_prefix)))
    {
        
TrieSetString(client_prefixstr_idtemp_prefix)
    }

    return 
PLUGIN_HANDLED
}

send_message(const message[], const id, const i)
{
    
message_begin(MSG_ONEg_saytxt, {000}, i)
    
write_byte(id)
    
write_string(message)
    
message_end()
}

bool:check_say_characters(const check_message[])
{
    for(new 
0charsmax(forbidden_say_symbols); i++)
    {
        if(
check_message[0] == forbidden_say_symbols[i])
        {
            return 
true
        
}
    }
    return 
false
}

bool:check_prefix_characters(const check_prefix[])
{
    for(
0charsmax(forbidden_prefixes_symbols); i++)
    {
        if(
containi(check_prefixforbidden_prefixes_symbols[i]) != -1)
        {
            return 
true
        
}
    }
    return 
false
}

bool:is_bad_prefix(const check_prefix[])
{
    if(
TrieGetCell(bad_prefixes_collectcheck_prefixtemp_value))
    {
        return 
true
    
}
    return 
false
}

find_and_delete(const arg_type[], const arg_key[])
{
    
line 0length 0;

    while(
read_file(file_prefixesline++ , textcharsmax(text), length))
    {
        if(!
text[0] || text[0] == '^n' || text[0] == ';' || (text[0] == '/' && text[1] == '/'))
            continue

        
parse(texttypecharsmax(type), keycharsmax(key), prefixcharsmax(prefix))
        
trim(prefix)

        if(!
type[0] || !prefix[0] || !key[0])
            continue
            
        if(!
equal(arg_typetype) || !equal(arg_keykey))
            continue
            
        
write_file(file_prefixes""line 1)
    }
    
    switch(
arg_type[0])
    {
        case 
'f':
        {
            
TrieDeleteKey(pre_flags_collectarg_key)
        }
        case 
'i':
        {
            
TrieDeleteKey(pre_ips_collectarg_key)
        }
        case 
's':
        {
            
TrieDeleteKey(pre_steamids_collectarg_key)
        }
        case 
'n':
        {
            
TrieDeleteKey(pre_names_collectarg_key)
        }
    }

La vida solo es una a si que ha disfrutarla y no desperdiciarla...
Responder
#2
tienes algun otro plugin que tambien hokee el say?
Responder
#3
(11/10/2018, 07:32 AM)Alejandro escribió: tienes algun otro plugin que tambien hokee el say?

no
La vida solo es una a si que ha disfrutarla y no desperdiciarla...
Responder
#4
Muestrame una lista de tus plugins para poder ayudarte :3
Responder
#5
(11/10/2018, 05:30 PM)Alejandro escribió: Muestrame una lista de tus plugins para poder ayudarte :3

Cita:; AMX Mod X plugins
advanced_bans.amxx
accuracy_fix.amxx
recoil_control.amxx
Admin-Espc.amxx
bullet_damage.amxx

; Admin Base - Always one has to be activated
admin.amxx ; admin base (required for any admin-related)
;admin_sql.amxx ; admin base - SQL version (comment admin.amxx)

; Basic
admincmd.amxx ; basic admin console commands
;adminhelp.amxx ; help command for admin console commands
adminslots.amxx ; slot reservation
multilingual.amxx ; Multi-Lingual management

; Menus
menufront.amxx ; front-end for admin menus
cmdmenu.amxx ; command menu (speech, settings)
plmenu.amxx ; players menu (kick, ban, client cmds.)
;telemenu.amxx ; teleport menu (Fun Module required!)
mapsmenu.amxx ; maps menu (vote, changelevel)
pluginmenu.amxx ; Menus for commands/cvars organized by plugin

; Chat / Messages
adminchat.amxx ; console chat commands
;antiflood.amxx ; prevent clients from chat-flooding the server
amx_scrollmsg.amxx
;scrollmsg.amxx ; displays a scrolling message
;imessage.amxx ; displays information messages
adminvote.amxx ; vote commands

; Map related
galileo.amxx
;nextmap.amxx ; displays next map in mapcycle
;mapchooser.amxx ; allows to vote for next map
;timeleft.amxx ; displays time left on map

; Configuration
statsx_shell.amxx
;pausecfg.amxx ; allows to pause and unpause some plugins
statscfg.amxx ; allows to manage stats plugins via menu and commands

; Counter-Strike
restmenu.amxx ; restrict weapons menu

; Enable to use AMX Mod plugins
;amxmod_compat.amxx ; AMX Mod backwards compatibility layer

; Custom - Add 3rd party plugins here
parachute.amxx
alt_end_round_sounds(beta).amxx
ut_killstreak_adv.amxx
team_semiclip.amxx
noagarrararma.amxx
freeammo.amxx
vampire.amxx
Money.amxx
fast_sniper_switch.amxx
combo_sprtes.amxx
GHW_connect.amxx
kill_assist.amxx
resetscore.amxx
Responder
#6
Me parece que esto te esta afectando... adminchat.amxx ; console chat commands intenta quitarlo y pruebalo

e.e proba
Código PHP:
/* AMX Mod X
*   Admin Chat Plugin
*
* by the AMX Mod X Development Team
*  originally developed by OLO
*
* This file is part of AMX Mod X.
*
*
*  This program is free software; you can redistribute it and/or modify it
*  under the terms of the GNU General Public License as published by the
*  Free Software Foundation; either version 2 of the License, or (at
*  your option) any later version.
*
*  This program is distributed in the hope that it will be useful, but
*  WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
*  General Public License for more details.
*
*  You should have received a copy of the GNU General Public License
*  along with this program; if not, write to the Free Software Foundation,
*  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*  In addition, as a special exception, the author gives permission to
*  link the code of this program with the Half-Life Game Engine ("HL
*  Engine") and Modified Game Libraries ("MODs") developed by Valve,
*  L.L.C ("Valve"). You must obey the GNU General Public License in all
*  respects for all of the code used other than the HL Engine and MODs
*  from Valve. If you modify this file, you may extend this exception
*  to your version of the file, but you are not obligated to do so. If
*  you do not wish to do so, delete this exception statement from your
*  version.
*/

#include <amxmodx>
#include <amxmisc>

new g_msgChannel

#define MAX_CLR 10

new g_Colors[MAX_CLR][] = {"COL_WHITE""COL_RED""COL_GREEN""COL_BLUE""COL_YELLOW""COL_MAGENTA""COL_CYAN""COL_ORANGE""COL_OCEAN""COL_MAROON"}
new 
g_Values[MAX_CLR][] = {{255255255}, {25500}, {02550}, {00255}, {2552550}, {2550255}, {0255255}, {227968}, {4589116}, {1034438}}
new 
Float:g_Pos[4][] = {{0.00.0}, {0.050.55}, {-1.00.2}, {-1.00.7}}

new 
amx_show_activity;
new 
g_AdminChatFlag ADMIN_CHAT;

public 
plugin_init()
{
    new 
admin_chat_id

    register_plugin
("Admin Chat"AMXX_VERSION_STR"AMXX Dev Team")
    
register_dictionary("adminchat.txt")
    
register_dictionary("common.txt")
    
register_clcmd("say""cmdSayChat"ADMIN_CHAT"@[@|@|@][w|r|g|b|y|m|c]<text> - displays hud message")
    
register_clcmd("say_team""cmdSayAdmin"0"@<text> - displays message to admins")
    
register_concmd("amx_say""cmdSay"ADMIN_CHAT"<message> - sends message to all players")
    
admin_chat_id register_concmd("amx_chat""cmdChat"ADMIN_CHAT"<message> - sends message to admins")
    
register_concmd("amx_psay""cmdPsay"ADMIN_CHAT"<name or #userid> <message> - sends private message")
    
register_concmd("amx_tsay""cmdTsay"ADMIN_CHAT"<color> <message> - sends left side hud message to all players")
    
register_concmd("amx_csay""cmdTsay"ADMIN_CHAT"<color> <message> - sends center hud message to all players")
    
    
amx_show_activity get_cvar_pointer("amx_show_activity");
    
    if (
amx_show_activity == 0)
    {
        
amx_show_activity register_cvar("amx_show_activity""2");
    }

    new 
str[1]
    
get_concmd(admin_chat_idstr0g_AdminChatFlagstr0, -1)
}

public 
cmdSayChat(id)
{
    if (!
access(idg_AdminChatFlag))
    {
        return 
PLUGIN_CONTINUE
    
}
    
    new 
said[6], 0
    read_argv
(1said5)
    
    while (
said[i] == '@')
    {
        
i++
    }
    
    if (!
|| 3)
    {
        return 
PLUGIN_CONTINUE
    
}
    
    new 
message[192], 0
    read_args
(message191)
    
remove_quotes(message)
    
    switch (
said[i])
    {
        case 
'r'1
        
case 'g'2
        
case 'b'3
        
case 'y'4
        
case 'm'5
        
case 'c'6
        
case 'o'7
    
}
    
    new 
ni
    
if (a)
    {
        
n++
        
s++
    }
    while (
said[s] && isspace(said[s]))
    {
        
n++
        
s++
    }
    

    new 
name[32], authid[32], userid
    
    get_user_authid
(idauthid31)
    
get_user_name(idname31)
    
userid get_user_userid(id)
    
    
log_amx("Chat: ^"%s<%d><%s><>^" tsay ^"%s^""nameuseridauthidmessage[n])
    
log_message("^"%s<%d><%s><>^" triggered ^"amx_tsay^" (text ^"%s^") (color ^"%L^")"nameuseridauthidmessage[n], "en"g_Colors[a])
    
    if (++
g_msgChannel || g_msgChannel 3)
    {
        
g_msgChannel 3
    
}
    
    new 
Float:verpos g_Pos[i][1] + float(g_msgChannel) / 35.0
    
    set_hudmessage
(g_Values[a][0], g_Values[a][1], g_Values[a][2], g_Pos[i][0], verpos06.06.00.50.15, -1)

    switch ( 
get_pcvar_num(amx_show_activity) )
    {
        case 
34:
        {
            new 
maxpl get_maxplayers();
            for (new 
pl 1pl <= maxplpl++)
            {
                if (
is_user_connected(pl) && !is_user_bot(pl))
                {
                    if (
is_user_admin(pl))
                    {
                        
show_hudmessage(pl"%s :   %s"namemessage[n])
                        
client_print(plprint_notify"%s :   %s"namemessage[n])
                    }
                    else
                    {
                        
show_hudmessage(pl"%s"message[n])
                        
client_print(plprint_notify"%s"message[n])
                    }
                }
            }
        }
        case 
2:
        {
            
show_hudmessage(0"%s :   %s"namemessage[n])
            
client_print(0print_notify"%s :   %s"namemessage[n])
        }
        default:
        {
            
show_hudmessage(0"%s"message[n])
            
client_print(0print_notify"%s"message[n])
        }
    }

    return 
PLUGIN_HANDLED
}

public 
cmdSayAdmin(id)
{
    new 
said[2]
    
read_argv(1said1)
    
    if (
said[0] != '@')
        return 
PLUGIN_CONTINUE
    
    
new message[192], name[32], authid[32], userid
    
new players[32], inum
    
    read_args
(message191)
    
remove_quotes(message)
    
get_user_authid(idauthid31)
    
get_user_name(idname31)
    
userid get_user_userid(id)
    
    
log_amx("Chat: ^"%s<%d><%s><>^" chat ^"%s^""nameuseridauthidmessage[1])
    
log_message("^"%s<%d><%s><>^" triggered ^"amx_chat^" (text ^"%s^")"nameuseridauthidmessage[1])
    
    if (
is_user_admin(id))
        
format(message191"(%L) %s :  %s"id"ADMIN"namemessage[1])
    else
        
format(message191"(%L) %s :  %s"id"PLAYER"namemessage[1])

    
get_players(playersinum)
    
    for (new 
0inum; ++i)
    {
        
// dont print the message to the client that used the cmd if he has ADMIN_CHAT to avoid double printing
        
if (players[i] != id && get_user_flags(players[i]) & g_AdminChatFlag)
            
client_print(players[i], print_chat"%s"message)
    }
    
    
client_print(idprint_chat"%s"message)
    
    return 
PLUGIN_HANDLED
}

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

    
new message[192], name[32], players[32], inumauthid[32], userid
    
    read_args
(message191)
    
remove_quotes(message)
    
get_user_authid(idauthid31)
    
get_user_name(idname31)
    
userid get_user_userid(id)
    
get_players(playersinum)
    
    
log_amx("Chat: ^"%s<%d><%s><>^" chat ^"%s^""nameuseridauthidmessage)
    
log_message("^"%s<%d><%s><>^" triggered ^"amx_chat^" (text ^"%s^")"nameuseridauthidmessage)
    
    
format(message191"(ADMINS) %s :   %s"namemessage)
    
console_print(id"%s"message)
    
    for (new 
0inum; ++i)
    {
        if (
access(players[i], g_AdminChatFlag))
            
client_print(players[i], print_chat"%s"message)
    }
    
    return 
PLUGIN_HANDLED
}

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

    
new message[192], name[32], authid[32], userid
    
    read_args
(message191)
    
remove_quotes(message)
    
get_user_authid(idauthid31)
    
get_user_name(idname31)
    
userid get_user_userid(id)
    
client_print(0print_chat"%L"LANG_PLAYER"PRINT_ALL"namemessage)
    
console_print(id"%L"LANG_PLAYER"PRINT_ALL"namemessage)
    
    
log_amx("Chat: ^"%s<%d><%s><>^" say ^"%s^""nameuseridauthidmessage)
    
log_message("^"%s<%d><%s><>^" triggered ^"amx_say^" (text ^"%s^")"nameuseridauthidmessage)
    
    return 
PLUGIN_HANDLED
}

public 
cmdPsay(idlevelcid)
{
    if (!
cmd_access(idlevelcid3))
        return 
PLUGIN_HANDLED
    
    
new name[32]
    
read_argv(1name31)
    new 
priv cmd_target(idname0)

    if (!
priv)
        return 
PLUGIN_HANDLED
    
    
new length strlen(name) + 1

    get_user_name
(privname31); 
    
    new 
message[192], name2[32], authid[32], authid2[32], useriduserid2
    
    get_user_authid
(idauthid31)
    
get_user_name(idname231)
    
userid get_user_userid(id)
    
read_args(message191)
    
    if (
message[0] == '"' && message[length] == '"'// HLSW fix
    
{
        
message[0] = ' '
        
message[length] = ' '
        
length += 2
    
}
    
    
remove_quotes(message[length])
    
get_user_name(privname31)
    
    if (
id && id != priv)
        
client_print(idprint_chat"(%s) %s :   %s"namename2message[length])
    
    
client_print(privprint_chat"(%s) %s :   %s"namename2message[length])
    
console_print(id"(%s) %s :   %s"namename2message[length])
    
get_user_authid(privauthid231)
    
userid2 get_user_userid(priv)
    
    
log_amx("Chat: ^"%s<%d><%s><>^" psay ^"%s<%d><%s><>^" ^"%s^""name2useridauthidnameuserid2authid2message[length])
    
log_message("^"%s<%d><%s><>^" triggered ^"amx_psay^" against ^"%s<%d><%s><>^" (text ^"%s^")"name2useridauthidnameuserid2authid2message[length])
    
    return 
PLUGIN_HANDLED
}

public 
cmdTsay(idlevelcid)
{
    if (!
cmd_access(idlevelcid3))
        return 
PLUGIN_HANDLED
    
    
new cmd[16], color[16], color2[16], message[192], name[32], authid[32], userid 0
    
    read_argv
(0cmd15)
    new 
bool:tsay = (tolower(cmd[4]) == 't')
    
    
read_args(message191)
    
remove_quotes(message)
    
parse(messagecolor15)
    
    new 
found 00
    
new lang[3], langnum get_langsnum()

    for (new 
0MAX_CLR; ++i)
    {
        for (new 
0langnumj++)
        {
            
get_lang(jlang)
            
format(color215"%L"langg_Colors[i])
            
            if (
equali(colorcolor2))
            {
                
i
                found 
1
                
break
            }
        }
        if (
found == 1)
            break
    }
    
    new 
length found ? (strlen(color) + 1) : 0
    
    
if (++g_msgChannel || g_msgChannel 3)
        
g_msgChannel 3

    
new Float:verpos = (tsay 0.55 0.1) + float(g_msgChannel) / 35.0
    
    get_user_authid
(idauthid31)
    
get_user_name(idname31)
    
userid get_user_userid(id)
    
set_hudmessage(g_Values[a][0], g_Values[a][1], g_Values[a][2], tsay 0.05 : -1.0verpos06.06.00.50.15, -1)

    switch ( 
get_pcvar_num(amx_show_activity) )
    {
        case 
34:
        {
            new 
maxpl get_maxplayers();
            for (new 
pl 1pl <= maxplpl++)
            {
                if (
is_user_connected(pl) && !is_user_bot(pl))
                {
                    if (
is_user_admin(pl))
                    {
                        
show_hudmessage(pl"%s :   %s"namemessage[length])
                        
client_print(plprint_notify"%s :   %s"namemessage[length])
                    }
                    else
                    {
                        
show_hudmessage(pl"%s"message[length])
                        
client_print(plprint_notify"%s"message[length])
                    }
                }
            }
            
console_print(id"%s :  %s"namemessage[length])
        }
        case 
2:
        {
            
show_hudmessage(0"%s :   %s"namemessage[length])
            
client_print(0print_notify"%s :   %s"namemessage[length])
            
console_print(id"%s :  %s"namemessage[length])
        }
        default:
        {
            
show_hudmessage(0"%s"message[length])
            
client_print(0print_notify"%s"message[length])
            
console_print(id"%s"message[length])
        }
    }

    
log_amx("Chat: ^"%s<%d><%s><>^" %s ^"%s^""nameuseridauthidcmd[4], message[length])
    
log_message("^"%s<%d><%s><>^" triggered ^"%s^" (text ^"%s^") (color ^"%s^")"nameuseridauthidcmdmessage[length], color2)

    return 
PLUGIN_HANDLED

Responder
#7
(11/10/2018, 05:51 PM)Alejandro escribió: Me parece que esto te esta afectando... adminchat.amxx ; console chat commands intenta quitarlo y pruebalo

e.e proba
Código PHP:
/* AMX Mod X
*   Admin Chat Plugin
*
* by the AMX Mod X Development Team
*  originally developed by OLO
*
* This file is part of AMX Mod X.
*
*
*  This program is free software; you can redistribute it and/or modify it
*  under the terms of the GNU General Public License as published by the
*  Free Software Foundation; either version 2 of the License, or (at
*  your option) any later version.
*
*  This program is distributed in the hope that it will be useful, but
*  WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
*  General Public License for more details.
*
*  You should have received a copy of the GNU General Public License
*  along with this program; if not, write to the Free Software Foundation,
*  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*  In addition, as a special exception, the author gives permission to
*  link the code of this program with the Half-Life Game Engine ("HL
*  Engine") and Modified Game Libraries ("MODs") developed by Valve,
*  L.L.C ("Valve"). You must obey the GNU General Public License in all
*  respects for all of the code used other than the HL Engine and MODs
*  from Valve. If you modify this file, you may extend this exception
*  to your version of the file, but you are not obligated to do so. If
*  you do not wish to do so, delete this exception statement from your
*  version.
*/

#include <amxmodx>
#include <amxmisc>

new g_msgChannel

#define MAX_CLR 10

new g_Colors[MAX_CLR][] = {"COL_WHITE""COL_RED""COL_GREEN""COL_BLUE""COL_YELLOW""COL_MAGENTA""COL_CYAN""COL_ORANGE""COL_OCEAN""COL_MAROON"}
new 
g_Values[MAX_CLR][] = {{255255255}, {25500}, {02550}, {00255}, {2552550}, {2550255}, {0255255}, {227968}, {4589116}, {1034438}}
new 
Float:g_Pos[4][] = {{0.00.0}, {0.050.55}, {-1.00.2}, {-1.00.7}}

new 
amx_show_activity;
new 
g_AdminChatFlag ADMIN_CHAT;

public 
plugin_init()
{
    new 
admin_chat_id

    register_plugin
("Admin Chat"AMXX_VERSION_STR"AMXX Dev Team")
    
register_dictionary("adminchat.txt")
    
register_dictionary("common.txt")
    
register_clcmd("say""cmdSayChat"ADMIN_CHAT"@[@|@|@][w|r|g|b|y|m|c]<text> - displays hud message")
    
register_clcmd("say_team""cmdSayAdmin"0"@<text> - displays message to admins")
    
register_concmd("amx_say""cmdSay"ADMIN_CHAT"<message> - sends message to all players")
    
admin_chat_id register_concmd("amx_chat""cmdChat"ADMIN_CHAT"<message> - sends message to admins")
    
register_concmd("amx_psay""cmdPsay"ADMIN_CHAT"<name or #userid> <message> - sends private message")
    
register_concmd("amx_tsay""cmdTsay"ADMIN_CHAT"<color> <message> - sends left side hud message to all players")
    
register_concmd("amx_csay""cmdTsay"ADMIN_CHAT"<color> <message> - sends center hud message to all players")
    
    
amx_show_activity get_cvar_pointer("amx_show_activity");
    
    if (
amx_show_activity == 0)
    {
        
amx_show_activity register_cvar("amx_show_activity""2");
    }

    new 
str[1]
    
get_concmd(admin_chat_idstr0g_AdminChatFlagstr0, -1)
}

public 
cmdSayChat(id)
{
    if (!
access(idg_AdminChatFlag))
    {
        return 
PLUGIN_CONTINUE
    
}
    
    new 
said[6], 0
    read_argv
(1said5)
    
    while (
said[i] == '@')
    {
        
i++
    }
    
    if (!
|| 3)
    {
        return 
PLUGIN_CONTINUE
    
}
    
    new 
message[192], 0
    read_args
(message191)
    
remove_quotes(message)
    
    switch (
said[i])
    {
        case 
'r'1
        
case 'g'2
        
case 'b'3
        
case 'y'4
        
case 'm'5
        
case 'c'6
        
case 'o'7
    
}
    
    new 
ni
    
if (a)
    {
        
n++
        
s++
    }
    while (
said[s] && isspace(said[s]))
    {
        
n++
        
s++
    }
    

    new 
name[32], authid[32], userid
    
    get_user_authid
(idauthid31)
    
get_user_name(idname31)
    
userid get_user_userid(id)
    
    
log_amx("Chat: ^"%s<%d><%s><>^" tsay ^"%s^""nameuseridauthidmessage[n])
    
log_message("^"%s<%d><%s><>^" triggered ^"amx_tsay^" (text ^"%s^") (color ^"%L^")"nameuseridauthidmessage[n], "en"g_Colors[a])
    
    if (++
g_msgChannel || g_msgChannel 3)
    {
        
g_msgChannel 3
    
}
    
    new 
Float:verpos g_Pos[i][1] + float(g_msgChannel) / 35.0
    
    set_hudmessage
(g_Values[a][0], g_Values[a][1], g_Values[a][2], g_Pos[i][0], verpos06.06.00.50.15, -1)

    switch ( 
get_pcvar_num(amx_show_activity) )
    {
        case 
34:
        {
            new 
maxpl get_maxplayers();
            for (new 
pl 1pl <= maxplpl++)
            {
                if (
is_user_connected(pl) && !is_user_bot(pl))
                {
                    if (
is_user_admin(pl))
                    {
                        
show_hudmessage(pl"%s :   %s"namemessage[n])
                        
client_print(plprint_notify"%s :   %s"namemessage[n])
                    }
                    else
                    {
                        
show_hudmessage(pl"%s"message[n])
                        
client_print(plprint_notify"%s"message[n])
                    }
                }
            }
        }
        case 
2:
        {
            
show_hudmessage(0"%s :   %s"namemessage[n])
            
client_print(0print_notify"%s :   %s"namemessage[n])
        }
        default:
        {
            
show_hudmessage(0"%s"message[n])
            
client_print(0print_notify"%s"message[n])
        }
    }

    return 
PLUGIN_HANDLED
}

public 
cmdSayAdmin(id)
{
    new 
said[2]
    
read_argv(1said1)
    
    if (
said[0] != '@')
        return 
PLUGIN_CONTINUE
    
    
new message[192], name[32], authid[32], userid
    
new players[32], inum
    
    read_args
(message191)
    
remove_quotes(message)
    
get_user_authid(idauthid31)
    
get_user_name(idname31)
    
userid get_user_userid(id)
    
    
log_amx("Chat: ^"%s<%d><%s><>^" chat ^"%s^""nameuseridauthidmessage[1])
    
log_message("^"%s<%d><%s><>^" triggered ^"amx_chat^" (text ^"%s^")"nameuseridauthidmessage[1])
    
    if (
is_user_admin(id))
        
format(message191"(%L) %s :  %s"id"ADMIN"namemessage[1])
    else
        
format(message191"(%L) %s :  %s"id"PLAYER"namemessage[1])

    
get_players(playersinum)
    
    for (new 
0inum; ++i)
    {
        
// dont print the message to the client that used the cmd if he has ADMIN_CHAT to avoid double printing
        
if (players[i] != id && get_user_flags(players[i]) & g_AdminChatFlag)
            
client_print(players[i], print_chat"%s"message)
    }
    
    
client_print(idprint_chat"%s"message)
    
    return 
PLUGIN_HANDLED
}

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

    
new message[192], name[32], players[32], inumauthid[32], userid
    
    read_args
(message191)
    
remove_quotes(message)
    
get_user_authid(idauthid31)
    
get_user_name(idname31)
    
userid get_user_userid(id)
    
get_players(playersinum)
    
    
log_amx("Chat: ^"%s<%d><%s><>^" chat ^"%s^""nameuseridauthidmessage)
    
log_message("^"%s<%d><%s><>^" triggered ^"amx_chat^" (text ^"%s^")"nameuseridauthidmessage)
    
    
format(message191"(ADMINS) %s :   %s"namemessage)
    
console_print(id"%s"message)
    
    for (new 
0inum; ++i)
    {
        if (
access(players[i], g_AdminChatFlag))
            
client_print(players[i], print_chat"%s"message)
    }
    
    return 
PLUGIN_HANDLED
}

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

    
new message[192], name[32], authid[32], userid
    
    read_args
(message191)
    
remove_quotes(message)
    
get_user_authid(idauthid31)
    
get_user_name(idname31)
    
userid get_user_userid(id)
    
client_print(0print_chat"%L"LANG_PLAYER"PRINT_ALL"namemessage)
    
console_print(id"%L"LANG_PLAYER"PRINT_ALL"namemessage)
    
    
log_amx("Chat: ^"%s<%d><%s><>^" say ^"%s^""nameuseridauthidmessage)
    
log_message("^"%s<%d><%s><>^" triggered ^"amx_say^" (text ^"%s^")"nameuseridauthidmessage)
    
    return 
PLUGIN_HANDLED
}

public 
cmdPsay(idlevelcid)
{
    if (!
cmd_access(idlevelcid3))
        return 
PLUGIN_HANDLED
    
    
new name[32]
    
read_argv(1name31)
    new 
priv cmd_target(idname0)

    if (!
priv)
        return 
PLUGIN_HANDLED
    
    
new length strlen(name) + 1

    get_user_name
(privname31); 
    
    new 
message[192], name2[32], authid[32], authid2[32], useriduserid2
    
    get_user_authid
(idauthid31)
    
get_user_name(idname231)
    
userid get_user_userid(id)
    
read_args(message191)
    
    if (
message[0] == '"' && message[length] == '"'// HLSW fix
    
{
        
message[0] = ' '
        
message[length] = ' '
        
length += 2
    
}
    
    
remove_quotes(message[length])
    
get_user_name(privname31)
    
    if (
id && id != priv)
        
client_print(idprint_chat"(%s) %s :   %s"namename2message[length])
    
    
client_print(privprint_chat"(%s) %s :   %s"namename2message[length])
    
console_print(id"(%s) %s :   %s"namename2message[length])
    
get_user_authid(privauthid231)
    
userid2 get_user_userid(priv)
    
    
log_amx("Chat: ^"%s<%d><%s><>^" psay ^"%s<%d><%s><>^" ^"%s^""name2useridauthidnameuserid2authid2message[length])
    
log_message("^"%s<%d><%s><>^" triggered ^"amx_psay^" against ^"%s<%d><%s><>^" (text ^"%s^")"name2useridauthidnameuserid2authid2message[length])
    
    return 
PLUGIN_HANDLED
}

public 
cmdTsay(idlevelcid)
{
    if (!
cmd_access(idlevelcid3))
        return 
PLUGIN_HANDLED
    
    
new cmd[16], color[16], color2[16], message[192], name[32], authid[32], userid 0
    
    read_argv
(0cmd15)
    new 
bool:tsay = (tolower(cmd[4]) == 't')
    
    
read_args(message191)
    
remove_quotes(message)
    
parse(messagecolor15)
    
    new 
found 00
    
new lang[3], langnum get_langsnum()

    for (new 
0MAX_CLR; ++i)
    {
        for (new 
0langnumj++)
        {
            
get_lang(jlang)
            
format(color215"%L"langg_Colors[i])
            
            if (
equali(colorcolor2))
            {
                
i
                found 
1
                
break
            }
        }
        if (
found == 1)
            break
    }
    
    new 
length found ? (strlen(color) + 1) : 0
    
    
if (++g_msgChannel || g_msgChannel 3)
        
g_msgChannel 3

    
new Float:verpos = (tsay 0.55 0.1) + float(g_msgChannel) / 35.0
    
    get_user_authid
(idauthid31)
    
get_user_name(idname31)
    
userid get_user_userid(id)
    
set_hudmessage(g_Values[a][0], g_Values[a][1], g_Values[a][2], tsay 0.05 : -1.0verpos06.06.00.50.15, -1)

    switch ( 
get_pcvar_num(amx_show_activity) )
    {
        case 
34:
        {
            new 
maxpl get_maxplayers();
            for (new 
pl 1pl <= maxplpl++)
            {
                if (
is_user_connected(pl) && !is_user_bot(pl))
                {
                    if (
is_user_admin(pl))
                    {
                        
show_hudmessage(pl"%s :   %s"namemessage[length])
                        
client_print(plprint_notify"%s :   %s"namemessage[length])
                    }
                    else
                    {
                        
show_hudmessage(pl"%s"message[length])
                        
client_print(plprint_notify"%s"message[length])
                    }
                }
            }
            
console_print(id"%s :  %s"namemessage[length])
        }
        case 
2:
        {
            
show_hudmessage(0"%s :   %s"namemessage[length])
            
client_print(0print_notify"%s :   %s"namemessage[length])
            
console_print(id"%s :  %s"namemessage[length])
        }
        default:
        {
            
show_hudmessage(0"%s"message[length])
            
client_print(0print_notify"%s"message[length])
            
console_print(id"%s"message[length])
        }
    }

    
log_amx("Chat: ^"%s<%d><%s><>^" %s ^"%s^""nameuseridauthidcmd[4], message[length])
    
log_message("^"%s<%d><%s><>^" triggered ^"%s^" (text ^"%s^") (color ^"%s^")"nameuseridauthidcmdmessage[length], color2)

    return 
PLUGIN_HANDLED


aun tengo el mismo problema hay te dejo una foto trate de usar otro plugin que es este me esta gustando pero tambien tengo el mismo problema
Código PHP:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

enum _:ADM_DATA ADMIN_TYPE30 ], ADMIN_FLAGS }

new const 
Admins[][ADM_DATA] =
{
    { 
"[ DUEÑO | BOY ]"ADMIN_LEVEL_A },
    { 
"[ DUEÑA | GIRL ]"ADMIN_LEVEL_B },
    { 
"[ SOCIO | BOY ]"ADMIN_LEVEL_C },
    { 
"[ SOCIO | GIRL ]"ADMIN_LEVEL_D },
    { 
"[ ADMIN | BOY ]"ADMIN_LEVEL_E },
    { 
"[ ADMIN | GIRL ]"ADMIN_LEVEL_F },
    { 
"[ VIP | BOY ]"ADMIN_LEVEL_G },
    { 
"[ VIP | GIRL ]"ADMIN_LEVEL_H }
};

new 
kAdminType33 ][ 30 ], kMPkPN33 ][ 32 ], cvar_adminlistenadmlisten;

public 
plugin_init() 
{
    
register_plugin"Admin Say n Types" "1.0" "kikizon" );
    
    
register_clcmd("say""BlockSay")
    
register_clcmd("say_team""BlockTeamSay")

    
// Cvar Definicion
    // 0 = Los vivos no pueden leer a los muertos
    // 1 = Los vivos no pueden leer a los muertos, Excepto los admins
    // 2 = Todos se pueden leer
    
cvar_adminlisten register_cvar"amx_adminlisten""2" );
    
admlisten get_pcvar_numcvar_adminlisten );
    
    
kMP get_maxplayers();
}

public 
client_putinserverindex )
{
    
get_user_nameindexkPNindex ], 31 );
    
kAdminTypeindex ] = "^0";
    
    if(
is_user_adminindex ))
    {
        static 
iflagsflags get_user_flagsindex );
        
        for(
sizeof Admins i++ ) 
        {
            if(
flags Admins[i][ADMIN_FLAGS])
            {                     
                
formatex(kAdminType[index], charsmax(kAdminType), "%s"Admins[i][ADMIN_TYPE]);
                break;
            }
        }
    }    
}

public 
BlockSayindex )
{
    static 
said[191];
    
read_args(saidcharsmax(said));
    
remove_quotes(said);
    
replace_all(saidcharsmax(said), "%"" "); replace_all(saidcharsmax(said), "#"" ");
        
    if (!
ValidMessage(said1)) return PLUGIN_CONTINUE;
    
    static 
color[11], prefix[91]
    
get_user_team(indexcolorcharsmax(color))
    
    
formatex(prefixcharsmax(prefix), "%s^x04%s^x03 %s"
    
is_user_aliveindex ) ? "^x01" "^x01*MUERTO* ",  kAdminTypeindex ], kPNindex ])
    
    if (
is_user_admin(index)) format(saidcharsmax(said), "^x04%s"said)    
    
    
format(saidcharsmax(said), "%s^x01 :  %s"prefixsaid)
    
    static 
iteam[11];
    for (
1<= kMPi++)
    {
        if (!
is_user_connected(i)) continue;

        if( 
admlisten == && ( is_user_aliveindex ) && is_user_alive) || !is_user_aliveindex ) && !is_user_alive(i))
        || 
admlisten == && (is_user_admin(i) || is_user_aliveindex ) && is_user_alive) || !is_user_aliveindex ) && !is_user_alive(i)) 
        || 
admlisten == )
        {        
            
get_user_team(iteamcharsmax(team))            
            
changeTeamInfo(icolor)            
            
writeMessage(isaid)
            
changeTeamInfo(iteam)
        }
    }
        
    return 
PLUGIN_HANDLED_MAIN;
}

public 
BlockTeamSayindex )
{
    static 
said[191];
    
read_args(saidcharsmax(said));
    
remove_quotes(said);
    
replace_all(saidcharsmax(said), "%"" "); replace_all(saidcharsmax(said), "#"" ");
        
    if (!
ValidMessage(said1)) return PLUGIN_CONTINUE;
    
    static 
playerTeamteamname[19];
    
playerTeam get_user_team(index);
    
    switch (
playerTeam)
    {
        case 
1formatexteamname18" ^x01[^x03 TT^x01 ] ");
        case 
2formatexteamname18" ^x01[^x03 CT^x01 ] ");
        default: 
formatexteamname18" ^x01[^x03 SPEC^x01 ] ");
    }
    
    static 
color[11], prefix[91]
    
get_user_team(indexcolorcharsmax(color))
    
    
formatex(prefixcharsmax(prefix), "%s%s^x04%s^x03 %s"
    
is_user_aliveindex ) ? "^x01" "^x01*MUERTO* ",  teamnamekAdminTypeindex ], kPNindex ])
    
    if (
is_user_admin(index)) format(saidcharsmax(said), "^x04%s"said)    
    
    
format(saidcharsmax(said), "%s^x01 :  %s"prefixsaid)
    
    static 
iteam[11];
    for (
1<= kMPi++)
    {
        if (!
is_user_connected(i)) continue;
        
        if (
get_user_team(i) == playerTeam)
        {
            if( 
admlisten == && ( is_user_aliveindex ) && is_user_alive) || !is_user_aliveindex ) && !is_user_alive(i))
            || 
admlisten == && (is_user_admin(i) || is_user_aliveindex ) && is_user_alive) || !is_user_aliveindex ) && !is_user_alive(i)) 
            || 
admlisten == )
            {        
                
get_user_team(iteamcharsmax(team))            
                
changeTeamInfo(icolor)            
                
writeMessage(isaid)
                
changeTeamInfo(iteam)
            }
        }
    }
    
    return 
PLUGIN_HANDLED_MAIN;
}

public 
changeTeamInfo(playerteam[])
{
    
message_begin(MSG_ONEget_user_msgid"TeamInfo" ), _player)
    
write_byte(player)
    
write_string(team)
    
message_end()
}

public 
writeMessage(playermessage[])
{
    
message_begin(MSG_ONEget_user_msgid"SayText" ), {000}, player)
    
write_byte(player)
    
write_string(message)
    
message_end()
}

stock ValidMessage(text[], maxcount
{
    static 
lenicount;
    
len strlen(text);
    
count 0;
    
    if (!
len) return false;
    
    for (
0leni++) 
    {
        if (
text[i] != ' '
        {
            
count++
            if (
count >= maxcount)
                return 
true;
        }
    }
    
    return 
false;



Archivos adjuntos Miniatura(s)
   
Responder
#8
Código PHP:
if(said[0] = '@' || said[0] =='/' || said[0] == '!' || said[0] == '.') return PLUGIN_HANDLED
[Imagen: bvpq9q-6.png]

NO DOY AYUDA VIA MENSAJE PRIVADO

* Si requieres algún servicio de pago puedes contactarme vía MP o en mi facebook
Responder
#9
(12/10/2018, 09:51 PM)kikizon2 escribió:
Código PHP:
if(said[0] = '@' || said[0] =='/' || said[0] == '!' || said[0] == '.') return PLUGIN_HANDLED

eso lo coloco a donde si es el admin prefix
Responder
#10
(12/10/2018, 10:00 PM)Forever123 escribió:
(12/10/2018, 09:51 PM)kikizon2 escribió:
Código PHP:
if(said[0] = '@' || said[0] =='/' || said[0] == '!' || said[0] == '.') return PLUGIN_HANDLED

eso lo coloco a donde si es el admin prefix

En el culo pontelo... Dios...

Código PHP:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

enum _:ADM_DATA ADMIN_TYPE30 ], ADMIN_FLAGS }

new const 
Admins[][ADM_DATA] =
{
    { 
"[ DUEÑO | BOY ]"ADMIN_LEVEL_A },
    { 
"[ DUEÑA | GIRL ]"ADMIN_LEVEL_B },
    { 
"[ SOCIO | BOY ]"ADMIN_LEVEL_C },
    { 
"[ SOCIO | GIRL ]"ADMIN_LEVEL_D },
    { 
"[ ADMIN | BOY ]"ADMIN_LEVEL_E },
    { 
"[ ADMIN | GIRL ]"ADMIN_LEVEL_F },
    { 
"[ VIP | BOY ]"ADMIN_LEVEL_G },
    { 
"[ VIP | GIRL ]"ADMIN_LEVEL_H }
};

new 
kAdminType33 ][ 30 ], kMPkPN33 ][ 32 ], cvar_adminlistenadmlisten;

public 
plugin_init() 
{
    
register_plugin"Admin Say n Types" "1.0" "kikizon" );
    
    
register_clcmd("say""BlockSay")
    
register_clcmd("say_team""BlockTeamSay")

    
// Cvar Definicion
    // 0 = Los vivos no pueden leer a los muertos
    // 1 = Los vivos no pueden leer a los muertos, Excepto los admins
    // 2 = Todos se pueden leer
    
cvar_adminlisten register_cvar"amx_adminlisten""2" );
    
admlisten get_pcvar_numcvar_adminlisten );
    
    
kMP get_maxplayers();
}

public 
client_putinserverindex )
{
    
get_user_nameindexkPNindex ], 31 );
    
kAdminTypeindex ] = "^0";
    
    if(
is_user_adminindex ))
    {
        static 
iflagsflags get_user_flagsindex );
        
        for(
sizeof Admins i++ ) 
        {
            if(
flags Admins[i][ADMIN_FLAGS])
            {                     
                
formatex(kAdminType[index], charsmax(kAdminType), "%s"Admins[i][ADMIN_TYPE]);
                break;
            }
        }
    }    
}

public 
BlockSayindex )
{
    static 
said[191];
    
read_args(saidcharsmax(said));
    
remove_quotes(said);
    
replace_all(saidcharsmax(said), "%"" "); replace_all(saidcharsmax(said), "#"" ");
        
    if (!
ValidMessage(said1)) return PLUGIN_CONTINUE;
    if(
said[0] = '@' || said[0] =='/' || said[0] == '!' || said[0] == '.') return PLUGIN_HANDLED;
    
    static 
color[11], prefix[91]
    
get_user_team(indexcolorcharsmax(color))
    
    
formatex(prefixcharsmax(prefix), "%s^x04%s^x03 %s"
    
is_user_aliveindex ) ? "^x01" "^x01*MUERTO* ",  kAdminTypeindex ], kPNindex ])
    
    if (
is_user_admin(index)) format(saidcharsmax(said), "^x04%s"said)    
    
    
format(saidcharsmax(said), "%s^x01 :  %s"prefixsaid)
    
    static 
iteam[11];
    for (
1<= kMPi++)
    {
        if (!
is_user_connected(i)) continue;

        if( 
admlisten == && ( is_user_aliveindex ) && is_user_alive) || !is_user_aliveindex ) && !is_user_alive(i))
        || 
admlisten == && (is_user_admin(i) || is_user_aliveindex ) && is_user_alive) || !is_user_aliveindex ) && !is_user_alive(i)) 
        || 
admlisten == )
        {        
            
get_user_team(iteamcharsmax(team))            
            
changeTeamInfo(icolor)            
            
writeMessage(isaid)
            
changeTeamInfo(iteam)
        }
    }
        
    return 
PLUGIN_HANDLED_MAIN;
}

public 
BlockTeamSayindex )
{
    static 
said[191];
    
read_args(saidcharsmax(said));
    
remove_quotes(said);
    
replace_all(saidcharsmax(said), "%"" "); replace_all(saidcharsmax(said), "#"" ");
        
    if (!
ValidMessage(said1)) return PLUGIN_CONTINUE;
    if(
said[0] = '@' || said[0] =='/' || said[0] == '!' || said[0] == '.') return PLUGIN_HANDLED;
    
    static 
playerTeamteamname[19];
    
playerTeam get_user_team(index);
    
    switch (
playerTeam)
    {
        case 
1formatexteamname18" ^x01[^x03 TT^x01 ] ");
        case 
2formatexteamname18" ^x01[^x03 CT^x01 ] ");
        default: 
formatexteamname18" ^x01[^x03 SPEC^x01 ] ");
    }
    
    static 
color[11], prefix[91]
    
get_user_team(indexcolorcharsmax(color))
    
    
formatex(prefixcharsmax(prefix), "%s%s^x04%s^x03 %s"
    
is_user_aliveindex ) ? "^x01" "^x01*MUERTO* ",  teamnamekAdminTypeindex ], kPNindex ])
    
    if (
is_user_admin(index)) format(saidcharsmax(said), "^x04%s"said)    
    
    
format(saidcharsmax(said), "%s^x01 :  %s"prefixsaid)
    
    static 
iteam[11];
    for (
1<= kMPi++)
    {
        if (!
is_user_connected(i)) continue;
        
        if (
get_user_team(i) == playerTeam)
        {
            if( 
admlisten == && ( is_user_aliveindex ) && is_user_alive) || !is_user_aliveindex ) && !is_user_alive(i))
            || 
admlisten == && (is_user_admin(i) || is_user_aliveindex ) && is_user_alive) || !is_user_aliveindex ) && !is_user_alive(i)) 
            || 
admlisten == )
            {        
                
get_user_team(iteamcharsmax(team))            
                
changeTeamInfo(icolor)            
                
writeMessage(isaid)
                
changeTeamInfo(iteam)
            }
        }
    }
    
    return 
PLUGIN_HANDLED_MAIN;
}

public 
changeTeamInfo(playerteam[])
{
    
message_begin(MSG_ONEget_user_msgid"TeamInfo" ), _player)
    
write_byte(player)
    
write_string(team)
    
message_end()
}

public 
writeMessage(playermessage[])
{
    
message_begin(MSG_ONEget_user_msgid"SayText" ), {000}, player)
    
write_byte(player)
    
write_string(message)
    
message_end()
}

stock ValidMessage(text[], maxcount
{
    static 
lenicount;
    
len strlen(text);
    
count 0;
    
    if (!
len) return false;
    
    for (
0leni++) 
    {
        if (
text[i] != ' '
        {
            
count++
            if (
count >= maxcount)
                return 
true;
        }
    }
    
    return 
false;

[Imagen: bvpq9q-6.png]

NO DOY AYUDA VIA MENSAJE PRIVADO

* Si requieres algún servicio de pago puedes contactarme vía MP o en mi facebook
Responder
#11
Kikizone ayudame a mi xd
Responder


Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)