Поиск Spectators can read anyone's chat.

Сообщения
576
Реакции
1,003
Помог
18 раз(а)
Код:
public plugin_init()
{
    register_srvcmd("amx_reaload_prefixes", "Reloadprefixes");
    
    // to addons
    register_srvcmd("amx_reaload_blocklist", "ReloadBlocklist");
    register_srvcmd("amx_reaload_whitelist", "ReloadWhitelist");
}


public Reloadprefixes() {
    TrieDestroy(g_tSteamPrefixes);
    TrieDestroy(g_tNamePrefixes);
    ArrayDestroy(g_aFlagPrefixes);
    g_iTrieSteamSize = 0; // so maybe exist some global counters, this need set to 0
    g_iTrieNameSize = 0;
    LoadPlayersPrefixes();
}

public ReloadBlocklist()
{
    ArrayDestroy(g_aBlackList);
    g_iBlackListSize = 0;
    LoadBlackList()
}

public ReloadWhitelist()
{
    ArrayDestroy(g_aWhiteListIp);
    ArrayDestroy(g_aWhiteListDomain);
    LoadWhiteList();
}
 
Сообщения
213
Реакции
71
Помог
2 раз(а)
Код:
public plugin_init()
{
    register_srvcmd("amx_reaload_prefixes", "Reloadprefixes");
   
    // to addons
    register_srvcmd("amx_reaload_blocklist", "ReloadBlocklist");
    register_srvcmd("amx_reaload_whitelist", "ReloadWhitelist");
}


public Reloadprefixes() {
    TrieDestroy(g_tSteamPrefixes);
    TrieDestroy(g_tNamePrefixes);
    ArrayDestroy(g_aFlagPrefixes);
    g_iTrieSteamSize = 0; // so maybe exist some global counters, this need set to 0
    g_iTrieNameSize = 0;
    LoadPlayersPrefixes();
}

public ReloadBlocklist()
{
    ArrayDestroy(g_aBlackList);
    g_iBlackListSize = 0;
    LoadBlackList()
}

public ReloadWhitelist()
{
    ArrayDestroy(g_aWhiteListIp);
    ArrayDestroy(g_aWhiteListDomain);
    LoadWhiteList();
}
Perfect but won't this also come in core instead of addon? since this is part of core and whitelist and blacklist are of addons? [A Question]

Код:
}


public Reloadprefixes() {
    TrieDestroy(g_tSteamPrefixes);
    TrieDestroy(g_tNamePrefixes);
    ArrayDestroy(g_aFlagPrefixes);
    g_iTrieSteamSize = 0; // so maybe exist some global counters, this need set to 0
    g_iTrieNameSize = 0;
    LoadPlayersPrefixes();
}
 
Сообщения
576
Реакции
1,003
Помог
18 раз(а)
DrStrange, yes, code for reload prefixes need paste to core sma.
 
Сообщения
213
Реакции
71
Помог
2 раз(а)
DrStrange, yes, code for reload prefixes need paste to core sma.
Mistrick Sorry for being late.

I was testing + made some minor changes, srvcmd to concmd, blocklist to blacklist & added typo of ; (that was accidentally missed by you) + fixed typo of reaload -> reload in all commands & added console print.

I have edited your default version of plugin too, with current changes and added it in archive if you want to update it or anybody wants it.

And Thanks Alot Mistrick

Код:
     // to chatmanager
public plugin_init()
{
    register_concmd("amx_reload_prefixes", "Reloadprefixes", ADMIN_RCON, "Reload Chat Manager Prefixes");
}

public Reloadprefixes(id) {
    TrieDestroy(g_tSteamPrefixes);
    TrieDestroy(g_tNamePrefixes);
    ArrayDestroy(g_aFlagPrefixes);
    g_iTrieSteamSize = 0; // so maybe exist some global counters, this need set to 0
    g_iTrieNameSize = 0;
    LoadPlayersPrefixes();
    console_print(id, "Reloaded Chat Manager Prefixes");
}
     // to addons
public plugin_init()
{
    register_concmd("amx_reload_blacklist", "ReloadBlacklist", ADMIN_RCON, "Reload Chat Manager Blacklist");
    register_concmd("amx_reload_whitelist", "ReloadWhitelist", ADMIN_RCON, "Reload Chat Manager Whitelist");
}

public ReloadBlacklist(id)
{
    ArrayDestroy(g_aBlackList);
    g_iBlackListSize = 0;
    LoadBlackList();
    console_print(id, "Reloaded Chat Manager Blacklist");
}

public ReloadWhitelist(id)
{
    ArrayDestroy(g_aWhiteListIp);
    ArrayDestroy(g_aWhiteListDomain);
    LoadWhiteList();
    console_print(id, "Reloaded Chat Manager Whitelist");
}
 

Вложения

Последнее редактирование:

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу