Скриптер
Участник
Пользователь
- Сообщения
- 459
- Реакции
- 272
- Помог
- 9 раз(а)
- Ошибка
-
Нету
- ОС
- Linux
- Amx Mod X
-
AMX Mod X 1.9.0.5262 (http://www.amxmodx.org)
Authors:
David "BAILOPAN" Anderson, Pavol "PM OnoTo" Marko
Felix "SniperBeamer" Geyer, Jonny "Got His Gun" Bergstrom
Lukasz "SidLuke" Wlasinski, Christian "Basic-Master" Hammacher
Borja "faluco" Ferrer, Scott "DS" Ehlert
Compiled: Oct 23 2019 07:26:46
Built from: https://github.com/alliedmodders/amxmodx/commit/be3f2f5
Build ID: 5262:be3f2f5
Core mode: JIT+ASM32
- Билд
-
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.6.0.672-dev
Build date: 17:31:06 Jun 5 2019 (1880)
Build from: https://github.com/dreamstalker/rehlds/commit/0c8d3d7
- ReGamedll
-
ReGameDLL version: 5.9.0.366-dev
Build date: 15:46:24 Jul 30 2019
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/0104389
- Версия Metamod
-
Metamod-r v1.3.0.128, API (5:13)
Metamod-r build: 17:47:54 Aug 24 2018
Metamod-r from: https://github.com/theAsmodai/metamod-r/commit/0cf2f70
- Список метамодулей
-
Currently loaded plugins:
description stat pend file vers src load unload
[ 1] SafeNameAndChat RUN - safenameandchat.so v1.1 ini ANY
[ 2] VoiceTranscoder RUN - vtc.so v2017RC4 ini ANY
[ 3] Reunion RUN - reunion.so v0.1.0.92c ini Start Never
[ 4] AMX Mod X RUN - amxmodx.so v1.9.0.5262 ini Start ANY
[ 5] Rechecker RUN - rechecker.so v2.5 ini ANY
[ 6] ReSRDetector RUN - resrdetector_mm_i386.so v0.1.0 ini ANY
[ 7] WHBlocker RUN - whblocker.so v1.5.696 ini ANY
[ 8] CStrike RUN - cstrike_amxx_i386.so v1.9.0.5262 pl4 ANY
[ 9] CSX RUN - csx_amxx_i386.so v1.9.0.5262 pl4 ANY
[10] GeoIP RUN - geoip_amxx_i386.so v1.9.0.5262 pl4 ANY ANY
[11] ReAPI RUN - reapi_amxx_i386.so v5.9.0.178-dev pl4 ANY Never
[12] MySQL RUN - mysql_amxx_i386.so v1.9.0.5262 pl4 ANY ANY
[13] FakeMeta RUN - fakemeta_amxx_i386.so v1.9.0.5262 pl4 ANY ANY
[14] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.9.0.5262 pl4 ANY ANY
[15] Engine RUN - engine_amxx_i386.so v1.9.0.5262 pl4 ANY ANY
15 plugins, 15 running
- Список плагинов
-
name version author file status
[ 1] Admin Loader v3.5 neygomon admin_loader.am running
[ 2] FreshBans v1.4.2b kanagava fresh_bans.amxx running
[ 3] DopBan v3.0.3b kanagava dop_ban.amxx running
[ 4] Fb forwards v1.0 Pirates! fb_forwards.amx running
[ 5] Lite Admin ESP v1.1 neygomon, AcE admin_esp.amxx running
[ 6] Free Look Crosshair Fi v1.3 Numb free_look_cross running
[ 7] BhopHack Detector v0.1 Mistrick bhophack_detect running
[ 8] [b] Core v0.1.2 81x08 biohazard.amxx running
[ 9] Balance teams v@1 Pirates! balanceteams.am running
[ 10] Show Breakable Killer v1.0 Pirates! breakable_kille running
[ 11] Reconnect punishments v1.1 Pirates! anti_reconnect. running
[ 12] Slots Reservation v@1 Pirates! admin_slots.amx running
[ 13] SQL MAIN INITS v@1 Pirates! main_sql_inits. running
[ 14] Block Safe kill v@1 Pirates! block_safekill. running
[ 15] Mute Menu v@1 Pirates! menu_mute.amxx running
[ 16] Map Stats v@1 Pirates! map_stats.amxx running
[ 17] Custom Knife Distance v@1 Pirates! custom_knife_di running
[ 18] Reklama v09.07.2019 mx?! reklama.amxx running
[ 19] Chat Manager v1.1.1-11 Mistrick chatmanager.amx running
[ 20] Chat Manager: Addon v0.0.4-70 Mistrick chatmanager_add running
[ 21] Chat Web v0.1 GoZombi Server chatmanager_web running
[ 22] Bonuses v@1 Pirates! player_bonuses. running
[ 23] custom models v@1 Pirates! human_models.am running
[ 24] Anti team & colored fl v@1 Pirates! colorflash.amxx running
[ 25] Pop Grenades v[ReAPI] 2. EFFx & HamletEag pop_grenade.amx running
[ 26] Level system v@1 Pirates! level_system.am running
[ 27] ReChecker Logging v1.0 custom rc_logging.amxx running
[ 28] Show spec keys v@1 Pirates! show_keys.amxx running
[ 29] Walls Creator v1.1 d3m37r4 walls_creator.a running
[ 30] Entity Remover v0.4 Exolent entity_remover. running
[ 31] Best round and map pla v@1 Pirates! best_roundnmap. running
[ 32] NoSpectFlash vv3.1 [reap PAffAEJIkA :3 NoSpectFlash.am running
[ 33] [ReAPI] Block 'Fire in v0.0.1 sergrib reapi_block_FIT running
[ 34] Block change name v1.0 kto to block_change_na running
[ 35] nightvision v@1 Pirates! nightvision.amx running
[ 36] UnstUck Player v@1 Pirates! unstuck.amxx running
[ 37] Autounstuck on TP v1.0 beginner teleport_unstuc running
[ 38] Autoshot pistol v@1 Pirates! autoshoot_pisto running
[ 39] Show enemies on radar v0.1b Denzer show_enemies_on running
[ 40] Music manager v1.0.1 .cpCTRL music.amxx running
[ 41] Demorecorder v@1 Pirates! demorecorder.am running
[ 42] Menu main v@1 Pirates! menu_main.amxx running
[ 43] Menu settings v@1 Pirates! menu_settings.a running
[ 44] Lang manage v@1 Pirates! lang_manage.amx running
[ 45] Menu vip v@1 Pirates! menu_vip.amxx running
[ 46] Menu admin v@1 Pirates! menu_admin.amxx running
[ 47] Maps Menu v2.1 Pirates! menu_maps.amxx running
[ 48] Menu rcon v@1 Pirates! menu_rcon.amxx running
[ 49] Players Menu v1.8 Pirates! players_menu.am running
[ 50] Warnings menu v2.1 @beginner menu_warnings.a debug
[ 51] [182] Map Spawns Edito v17.08.27 iG_os & SKAJIbnE MapSpawnsEditor running
[ 52] Block fast infect v@1 Pirates! block_fast_infe running
[ 53] Remove droped weapons v@1 Pirates! remove_weaponsn running
[ 54] Damager[b] v@1 Pirates! damager.amxx running
[ 55] Block & Hide money v@1 Pirates! block_money.amx running
[ 56] Weapons MaxClip v0.3.0 ConnorMcLeod weapon_maxclip. running
[ 57] Map Manager: Core v3.0.0 Mistrick map_manager_cor running
[ 58] Map Manager: Scheduler v0.1.0 Mistrick map_manager_sch running
[ 59] Map Manager: Rtv v0.0.4 Mistrick map_manager_rtv running
[ 60] Map Manager: Nominatio v0.0.8 Mistrick map_manager_nom running
[ 61] Map Manager: BlockList v0.0.3 Mistrick map_manager_blo running
[ 62] Map Manager: Online so v0.0.2 Mistrick map_manager_onl running
[ 63] Map Manager: Effects v0.0.8 Mistrick map_manager_eff running
[ 64] Map Manager: Informer v0.0.5 Mistrick map_manager_inf running
[ 65] Bio Stats v1.0.1 Pirates! bio_stats.amxx debug
[ 66] Real velocity v@1 Pirates! bio_real_veloci running
[ 67] Remove Objectives v@1 Pirates! bio_remove_obje running
[ 68] Block touch & Use v@1 Pirates! bio_block_touch running
[ 69] Restore BP ammo v@1 Pirates! bio_restore_bpa running
[ 70] Informer hud v1.2 Pirates! bio_informer.am debug
[ 71] Napalm Nade v@1 MeRcyLeZZ, Pirat napalm_nades.am running
71 plugins, 71 running
- Автор плагина
- Pirates!
- Версия плагина
- 1.1
- Исходный код
-
#include <amxmodx>
#include <reapi>
#include <nvault>
#include <zmb>
#pragma semicolon 1
const TASK_ID_CHECK = 1378;
new cvPlayersToPunish,
cvPunishmentType,
cvBanTime,
cvBanTimePlus;
new g_iPlayersToPunish,
g_iPunishmentType,
g_iBanTime,
g_iBanTimePlus;
new Array: g_aSteamIds,
g_nPlayersLastBanTimeVault;
new bool: g_bGameStarted;
new g_bConnected;
new g_szSteamId[MAX_PLAYERS + 1][64];
public plugin_init() {
register_plugin("Reconnect punishments", "1.1", "Pirates!");
RegisterHookChain(RG_RoundEnd, "fwRoundEnd_Post", 1);
cvPlayersToPunish = create_cvar(
"ar_players_to_punish",
"4",
.description = "Needed players in game for plugin running",
.has_min = true, .min_val = 1.0,
.has_max = true, .max_val = 32.0
);
cvPunishmentType = create_cvar(
"ar_punishment_type",
"2",
.description = "Punishment type for reconnect^n1 - Normal ban^n2 - With each subsequent reconnect, the ban increases by ar_ban_time_plus minutes",
.has_min = true, .min_val = 1.0,
.has_max = true, .max_val = 2.0
);
cvBanTime = create_cvar(
"ar_ban_time",
"10",
.description = "Time for a normal ban (Or for the first with ar_punishment_type = 2)",
.has_min = true, .min_val = 5.0
);
cvBanTimePlus = create_cvar(
"ar_ban_time_plus",
"10",
.description = "The time for which each subsequent ban will be added with ar_punishment_type = 2",
.has_min = true, .min_val = 5.0
);
AutoExecConfig(true, "plugin-anti_reconnect");
g_aSteamIds = ArrayCreate(64);
}
public plugin_cfg()
register_dictionary("anti_reconnect.txt");
public OnConfigsExecuted() {
bind_pcvar_num(cvPlayersToPunish, g_iPlayersToPunish);
bind_pcvar_num(cvPunishmentType, g_iPunishmentType);
bind_pcvar_num(cvBanTime, g_iBanTime);
bind_pcvar_num(cvBanTimePlus, g_iBanTimePlus);
if (g_iPunishmentType == 2)
{
g_nPlayersLastBanTimeVault = nvault_open("anti_reconnect");
if (g_nPlayersLastBanTimeVault == INVALID_HANDLE)
{
g_iPunishmentType = 1;
log_error(AMX_ERR_NATIVE, "Error opening nvault `anti_reconnect` ar_punishment_type changed to 1");
}
}
}
public plugin_end() {
ArrayDestroy(g_aSteamIds);
if (g_iPunishmentType == 2)
nvault_close(g_nPlayersLastBanTimeVault);
}
public zmb_game_start()
g_bGameStarted = true;
public fwRoundEnd_Post()
g_bGameStarted = false;
public client_putinserver(iIndex) {
SetBit(g_bConnected, iIndex);
get_user_authid(iIndex, g_szSteamId[iIndex], charsmax(g_szSteamId[]));
set_task(0.5, "checkPlayer", iIndex + TASK_ID_CHECK);
}
public client_disconnected(iIndex) {
if (IsNotSetBit(g_bConnected, iIndex))
return PLUGIN_CONTINUE;
if (get_playersnum() < g_iPlayersToPunish)
return PLUGIN_CONTINUE;
new bool: push;
if (g_bGameStarted && is_user_human(iIndex) && get_alive_humans() == 1)
{
push = true;
}
else if (g_bGameStarted && is_user_zombie(iIndex) && get_alive_zombies() == 1)
{
push = true;
}
else if (!g_bGameStarted && is_user_infected(iIndex))
push = true;
if (push)
ArrayPushString(g_aSteamIds, g_szSteamId[iIndex]);
return PLUGIN_CONTINUE;
}
public checkPlayer(iIndex) {
iIndex -= TASK_ID_CHECK;
if (IsNotSetBit(g_bConnected, iIndex))
return PLUGIN_HANDLED;
if (ArrayFindString(g_aSteamIds, g_szSteamId[iIndex]) == -1)
return PLUGIN_HANDLED;
punishPlayer(iIndex);
return PLUGIN_CONTINUE;
}
punishPlayer(iIndex) {
new banTime = g_iBanTime;
if (g_iPunishmentType == 2)
{
if (nvault_get(g_nPlayersLastBanTimeVault, g_szSteamId[iIndex]))
banTime = nvault_get(g_nPlayersLastBanTimeVault, g_szSteamId[iIndex]) + g_iBanTimePlus;
new szBanTime[20];
num_to_str(banTime, szBanTime, charsmax(szBanTime));
nvault_set(g_nPlayersLastBanTimeVault, g_szSteamId[iIndex], szBanTime);
}
ArrayDeleteItem(g_aSteamIds, ArrayFindString(g_aSteamIds, g_szSteamId[iIndex]));
server_cmd("fb_ban %d #d %L", banTime, get_user_userid(iIndex), LANG_PLAYER, "AR_BAN_REASON");
}
Не могу выявить причину по которой плагин не работает, ошибок нет, с этим прекрасно, но он не выполняет свой функционал. Позже залогирую пишет ли стимид в массив, а пока прошу руку помощи
В этой теме было размещено решение! Перейти к решению.