Поиск Set Server Pass from chat

Сообщения
256
Реакции
12
I there any plugin available from where we can set server password from chat? I do not want to give cvar & pass access to my admins to use amx_cvar sv_password.
I had got a similar plugin on allied https://forums.alliedmods.net/showthread.php?t=104456 but I saw that the attachments are removed.
Can someone please help me
 
Сообщения
140
Реакции
24
Помог
2 раз(а)
C++:
#include <amxmodx>

#define ADMIN_ACCESS

#if defined ADMIN_ACCESS
    #define ADMIN_FLAG ADMIN_IMMUNITY
#endif 

public plugin_init() {
    register_plugin("set sv password", "0.0.1", "");

    register_clcmd("say /setpassword", "@clcmd_setpw");
    register_clcmd("setpassword", "@clcmd_setpassword");
}

@clcmd_setpw(const pPlayer) {
    client_cmd(pPlayer, "messagemode setpassword");
    return PLUGIN_HANDLED;
}

@clcmd_setpassword(const pPlayer) {
#if defined ADMIN_ACCESS 
    if(~get_user_flags(pPlayer) & ADMIN_FLAG) {
        return PLUGIN_HANDLED;
    }
#endif 
    new szArg[32];
    read_args(szArg, charsmax(szArg));
    remove_quotes(szArg);
  
    set_pcvar_string(get_cvar_pointer("sv_password"), szArg);
    client_print_color(0, 0, "^1Admin ^4%n ^1set password ^1[^4%s^1].", pPlayer, szArg);
    return PLUGIN_HANDLED;
}
 

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

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