Hello. I want to block this pair of symbols connect server. here is a short code. But it's not working.
Код:
#include <amxmodx>
new const g_szsymbol[][] =
{
"\",
"`",
"'"
}
new const g_szKickReason[] = "Kick name symbol not allowed!"
new Trie:g_tsymbol
public plugin_init()
{
g_tsymbol = TrieCreate()
for(new i; i < sizeof(g_szsymbol); i++)
TrieSetCell(g_tsymbol, g_szsymbol[i], true)
}
public plugin_end()
TrieDestroy(g_tsymbol)
public client_connect(id)
{
new szName[32], szCode[3]
get_user_name(id, szName, 31);
if(TrieKeyExists(g_tsymbol, szCode))
server_cmd("kick #%i ^"%s^"", get_user_userid(id), g_szKickReason)
}