Поиск Плагин auto steam vip

asd

Сообщения
151
Реакции
17
Помог
3 раз(а)
Ищу плагин русифицирован для автоматической выдачи стим игрокам флагов.
 
  • Нравится
Реакции: ifx
Сообщения
1,419
Реакции
2,509
Помог
59 раз(а)
Код:
#include <amxmodx>
#include <amxmisc>
#tryinclude <reapi>

#pragma semicolon 1

new const PLUGIN_NAME[] = "Auto Set Steam Flag";
new const PLUGIN_VERSION[] = "1.0.0";
new const PLUGIN_AUTHOR[] = "w0w";

/****************************************************************************************
****************************************************************************************/

new const g_szConfigName[] = "auto_set_steam_flag";

new g_szAccess[32];

public plugin_init()
{
    register_plugin(
        .plugin_name = PLUGIN_NAME,
        .version = PLUGIN_VERSION,
        .author = PLUGIN_AUTHOR
    );

    new pCvar = create_cvar("auto_set_steam_flag", "t", FCVAR_NONE, "Flags to set");
    bind_pcvar_string(pCvar, g_szAccess, charsmax(g_szAccess));

    AutoExecConfig(true, g_szConfigName);

    new szPath[PLATFORM_MAX_PATH];
    get_configsdir(szPath, charsmax(szPath));

    server_cmd("exec %s/plugins/%s.cfg", szPath, g_szConfigName);
    server_exec();
}

public client_putinserver(id)
{
    if(is_user_steam(id))
        set_user_flags(id, read_flags(g_szAccess));
}

#if !defined _reapi_included
stock is_user_steam(id)
{
    static dp_pointer;

    if(dp_pointer || (dp_pointer = get_cvar_pointer("dp_r_id_provider")))
    {
        server_cmd("dp_clientinfo %d", id);
        server_exec();
        return (get_pcvar_num(dp_pointer) == 2) ? 1 : 0;
    }

    return 0;
}
#endif
 

asd

Сообщения
151
Реакции
17
Помог
3 раз(а)
Сообщения
143
Реакции
29
w0w , first time seeing 'tryinclude' .. does it mean if i dont have that one in /includes/ , is_user_steam is executed?
 
Сообщения
1,419
Реакции
2,509
Помог
59 раз(а)
jocasrb, #tryinclude means plugin will try to include that file. In reapi include we have a define _reapi_included, so if the file wasn't included the define also doesn't exist so there is a check #if !defined _reapi_included which means if that define doesn't exist stock is_user_steam will be used.
 
Сообщения
345
Реакции
77
Помог
14 раз(а)
Можно сделать с выводом информации в чат, пожалуйста? Спасибо
 

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

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