Участник
Пользователь
- Сообщения
- 218
- Реакции
- 63
- Помог
- 2 раз(а)
- Ошибка
-
Не удаляется админ в users.ini
- ОС
- Linux
- Amx Mod X
-
AMX Mod X 1.10.0.5402 (http://www.amxmodx.org)
- Билд
-
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.11.0.776-dev
- ReGamedll
-
ReGameDLL version: 5.21.0.546-dev
- Версия Metamod
-
Metamod-r v1.3.0.86, API (5:13)
- Список метамодулей
-
[ 1] VoiceTranscoder RUN - VoiceTranscoder. v2017RC5 ini ANY ANY
[ 2] Reunion RUN - reunion_mm_i386. v0.1.0.9 ini Start Never
[ 3] WHBlocker RUN - whblocker_mm_i38 v1.5.697 ini Chlvl ANY
[ 4] HitBox Fix RUN - hitbox_fix_mm_i3 v1.1.2 ini Start ANY
[ 5] AMX Mod X RUN - amxmodx_mm_i386. v1.10.0. ini Start ANY
[ 6] FakeMeta RUN - fakemeta_amxx_i3 v1.10.0. pl5 ANY ANY
[ 7] MySQL RUN - mysql_amxx_i386. v1.10.0. pl5 ANY ANY
[ 8] ReAimDetector RUN - reaimdetector_am v0.2.2 pl5 ANY Never
[ 9] ReAPI RUN - reapi_amxx_i386. v5.21.0. pl5 ANY Never
[10] Fun RUN - fun_amxx_i386.so v1.10.0. pl5 ANY ANY
[11] Engine RUN - engine_amxx_i386 v1.10.0. pl5 ANY ANY
[12] CStrike RUN - cstrike_amxx_i38 v1.10.0. pl5 ANY ANY
- Список плагинов
-
[ 1] 0 FreshBans 1.4.6b kanagava unknown fresh_bans_ running
[ 2] 1 Admin Votes 1.9.0.5294 AMXX Dev Team unknown adminvote.a running
[ 3] 2 Admin Base 1.10.0.540 AMXX Dev Team admin.amxx running
[ 4] 3 Admin Chat 1.9.0.5263 AMXX Dev Team unknown adminchat.a running
[ 5] 4 Admin Commands 1.10.0.540 AMXX Dev Team admincmd.am running
[ 6] 5 Players Menu 1.7 neugomon unknown players_men running
[ 7] 6 Maps Menu 1.4.1 neugomon unknown mapsmenu.am running
[ 8] 7 Menus Front-End 1.5 neugomon unknown menufront_e running
[ 9] 8 Remove admins 0.2 SweatyBanana unknown remove_admi running
- Автор плагина
- SweatyBanana
- Версия плагина
- v0.2
- Исходный код
-
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "Remove admins"
#define VERSION "0.2"
#define AUTHOR "SweatyBanana"
enum{TYPE_STEAM,TYPE_NAME}
public plugin_init()
{
register_plugin(PLUGIN,VERSION,AUTHOR);
register_cvar("ar_version",VERSION,FCVAR_SERVER);
register_clcmd("amx_removeadmin","remove_cmd",ADMIN_RCON,"amx_removeadmin <steamid or nick>");
}
public remove_cmd(id,level,cid)
{
if(!(get_user_flags(id) & ADMIN_RCON))
return PLUGIN_HANDLED;
new players[32], inum, i, player;
new TARGET[32], playerinfo[32];
new command_type;
new bool:is_found = false;
get_players(players,inum);
read_argv(1,TARGET,31);
remove_quotes(TARGET);
if(equal(TARGET,"STEAM_",6))
{
command_type = TYPE_STEAM;
for(i = 0; i < inum; i++)
{
player = players[i];
get_user_authid(player, playerinfo, 31);
if(equal(playerinfo, TARGET))
{
remove_user_flags(player);
break;
}
}
}
else
{
command_type = TYPE_NAME;
for(i = 0; i < inum; i++)
{
player = players[i];
get_user_name(player,playerinfo,31);
if( containi(playerinfo,TARGET) != -1 )
{
remove_user_flags(player);
break;
}
}
}
new filename[64], text[512];
get_configsdir(filename,63);
format(filename,63,"%s/users.ini",filename);
new file = fopen(filename,"rt");
i = 0;
while(!feof(file))
{
fgets(file,text,50);
i++;
if(text[0] == ';')
continue;
parse(text,playerinfo,31,players,1);
if((command_type == TYPE_STEAM && equal(playerinfo, TARGET))
|| (command_type == TYPE_NAME && containi(playerinfo, TARGET) != -1))
{
is_found = true;
format(text,511,";%s",text);
write_file(filename,text,i-1);
console_print(id,"********************ADMIN ID REMOVAL TOOL**************");
console_print(id,"");
console_print(id," The target, %s, was removed from users.ini ",TARGET);
console_print(id,"");
console_print(id,"********************ADMIN ID REMOVAL TOOL**************");
server_cmd("amx_reloadadmins")
break;
}
}
if(!is_found)
{
console_print(id,"********************ADMIN ID REMOVAL TOOL**************");
console_print(id," The entry, %s, was not found in users.ini ",TARGET);
console_print(id,"********************ADMIN ID REMOVAL TOOL**************");
}
fclose(file);
return PLUGIN_HANDLED;
}
Привет всем. Не нашел другого плагина для удаления прав с users.ini, нашел только этот плагин. И это к моему сожалению тоже не работает.
В консоли показывает что "was removed from users.ini" но на деле игрок все ещё остается в users.ini:
"player" "password" "acdefghijklmqu" "a"
Пытаюсь удалить через команду:
amx_removeadmin "player"
В консоли показывает что "was removed from users.ini" но на деле игрок все ещё остается в users.ini:
"player" "password" "acdefghijklmqu" "a"
Пытаюсь удалить через команду:
amx_removeadmin "player"