Участник
Пользователь
- Сообщения
- 460
- Реакции
- 68
- Помог
- 7 раз(а)
- Ошибка
-
Не верный вывод сообщения в AntiFlood_Change_Name
Скрин приложу ниже.
- ОС
- Linux
- Amx Mod X
-
AMX Mod X 1.9.0.5249 (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: Jun 19 2019 13:31:53
Built from: https://github.com/alliedmodders/amxmodx/commit/6cecb34
Build ID: 5249:6cecb34
Core mode: JIT+ASM32
- Билд
-
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.7.0.692-dev
Build date: 18:58:01 Sep 21 2019 (1988)
Build from: https://github.com/dreamstalker/rehlds/commit/e7232be
- ReGamedll
-
ReGameDLL version: 5.11.0.420-dev+m
Build date: 12:57:16 Oct 9 2019
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/4996564
- Версия 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 ANY
[ 2] Reunion RUN - reunion_mm_i386.so v0.1.0.133 ini Start Never
[ 3] ReAuthCheck RUN - reauthcheck_mm_i386.so v0.1.6 ini Start Never
[ 4] VoiceTranscoder RUN - VoiceTranscoder.so v2017RC3 ini ANY ANY
[ 5] AMX Mod X RUN - amxmodx_mm_i386.so v1.9.0.5249 ini Start ANY
[ 6] WHBlocker RUN - whblocker_mm_i386.so v1.5.696 ini Chlvl ANY
[ 7] ReSemiclip RUN - resemiclip_mm_i386.so v2.3.9 ini Chlvl ANY
[ 8] Rechecker RUN - rechecker_mm_i386.so v2.5 ini Chlvl ANY
[ 9] ReAimDetector RUN - reaimdetector_amxx_i386.so v0.2.2 pl5 ANY Never
[10] ReAPI RUN - reapi_amxx_i386.so v5.10.0.188-dev pl5 ANY Never
[11] SQLite RUN - sqlite_amxx_i386.so v1.9.0.5249 pl5 ANY ANY
[12] hackdetector RUN - hackdetector_amxx_i386.so v0.15.328.lite pl5 ANY ANY
[13] CStrike RUN - cstrike_amxx_i386.so v1.9.0.5249 pl5 ANY ANY
[14] Engine RUN - engine_amxx_i386.so v1.9.0.5249 pl5 ANY ANY
[15] FakeMeta RUN - fakemeta_amxx_i386.so v1.9.0.5249 pl5 ANY ANY
[16] CSX RUN - csx_amxx_i386.so v1.9.0.5249 pl5 ANY ANY
[17] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.9.0.5249 pl5 ANY ANY
[18] SxGeo RUN - sxgeo_amxx_i386.so v2.2 pl5 ANY Never
18 plugins, 18 running
- Список плагинов
-
Currently loaded plugins:
name version author file status
[ 1] ReAimDetector API 0.2.2 ReHLDS Team reaimdetector.a running
[ 2] Advanced Client Checke 0.3.6 Mistrick cmdchecker.amxx running
[ 3] CSStatsX SQL 0.7.4+2 serfreeman1337 csstatsx_sql.am running
[ 4] FreshBans 1.4.2b kanagava fresh_bans_142_ running
[ 5] ScreenMaker 1.1 neygomon screen_maker.am running
[ 6] RC BaseChanger 1.0 phe rc_basechanger. stopped
[ 7] ReChecker Logging 1.0 phe rc_logging.amxx running
[ 8] Lite Admin ESP 1.1 neygomon, AcE admin_esp_ace.a running
[ 9] Admin Base 1.9.0.5241 AMXX Dev Team admin.amxx running
[ 10] Ping Control 1.4 neygomon Ping_Control.am running
[ 11] AFK Control ReNew 1.2(a) neygomon afk_control.amx running
[ 12] AES: StatsX 0.5+1 serfreeman1337 aes_statsx_cstr running
[ 13] Stats Configuration 1.10.0.525 AMXX Dev Team statscfg.amxx running
[ 14] Advanced Gag 1.9.0 neygomon amx_gag.amxx running
[ 15] Maps Menu 1.4.1 neugomon mapsmenu.amxx running
[ 16] Server Menu 1.5.0 F@nt0M server_menu.amx running
[ 17] Parachute for ALL [ReA 3.0 Leo_[BH] parachute_leo.a running
[ 18] DemoRecoder 1.1 neygomon amx_demorec.amx running
[ 19] Rock to Ban 1.02 Safety1st rock2ban.amxx running
[ 20] Players Menu 1.7 neugomon players_menu.am running
[ 21] [ReAPI] Kills Counter 0.3 serfreeman1337 kills_counter.a running
[ 22] Killer ScreenFade 0.0.5 Vaqtincha reapi_killer_sc running
[ 23] SF Warn Menu 0.1.4g serfreeman1337 sf_admin_warns. running
[ 24] AES: StatsX Info Rank 0.1 serfreeman1337 aes_statsx_rank running
[ 25] Adverts 1.0 pUzzlik adverts_message running
[ 26] BunnyHop 1.0 PurposeLess bunnyhop.amxx running
[ 27] KiLL Assist poka_4to_b PRoSToTeM@ Kill_assist_rea running
[ 28] Advanced MapChooser 1.4 neygomon map_chooser_CSD running
[ 29] resetscore(ReAPI) 1.0 Phantom resetscore.amxx running
[ 30] Steam Models 0.1b+mod.l Freedo.m steam_models.am running
[ 31] Online Helper 2.1.3 Nordic Warrior online_helper.a running
[ 32] [SxGeo] Connect Info 1.0 s1lent sxgeo_connect_i running
[ 33] Grab 2.5 Support123 grab_new.amxx running
[ 34] Team Select 1.5.0 F@nt0M teamselect.amxx running
[ 35] ProKreedz Hook v2.3 vato loco [GE-S] dr_hook.amxx running
[ 36] Damager 0.0.6 steelzzz damager.amxx running
[ 37] Weapon Icon 1.0 Zenix (m$ubn) weapon_icon.amx running
[ 38] Easy MultiJump 1.6 twistedeuphoria/ reapi_multijump running
[ 39] GameName Changer 1.0 neugomon gamename_change running
[ 40] DM AutoBalance 0.3.5-beta Nordic Warrior AutoBalance.amx running
[ 41] CSDM Core 0.0.8 Vaqtincha csdm_core.amxx running
[ 42] CSDM Protection 0.0.8 Vaqtincha csdm_protection running
[ 43] Team Grenade Trail 1.2 Numb team_grenade_tr running
[ 44] Vzruv Golovu 1.0 eL vzruv_golovu.am running
[ 45] AntiFlood Change Name 28.11.2018 sergrib AntiFlood_Chang running
[ 46] Camera Changer 1.3 Bl0ck Camera_Changer. running
[ 47] Lite Translit 2.8 neygomon lite_translit_c running
[ 48] Advanced Experience Sy 0.5.9 [REA serfreeman1337/s aes_main.amxx running
[ 49] AES: CStrike Addon 0.5.9 [REA serfreeman1337/s aes_exp_cstrike running
[ 50] AES: Informer 0.5.9 [REA serfreeman1337/s aes_informer.am running
[ 51] AES: Admin Tools 0.5.9 [REA serfreeman1337/s aes_exp_editor. running
51 plugins, 50 running
- Автор плагина
- sergrib
- Версия плагина
- не указано см. исход ниже.
- Исходный код
-
#include <amxmodx>
#include <reapi>
#pragma semicolon 1
#define MAC_MAXWARNINGS 3 // максимальное кол-во предупреждений перед киком
#define MAC_CHANGEDELAY 120 // время в секундах, по истечению которого ник вновь можно будет сменить
new Float:g_flTimeNextChangeName[MAX_PLAYERS +1], g_iWarnings[MAX_PLAYERS +1];
public plugin_init()
{
register_plugin("AntiFlood Change Name", "28.11.2018", "sergrib");
RegisterHookChain(RG_CBasePlayer_SetClientUserInfoName, "CBasePlayer_SetClientUserInfoName_Pre", .post = false);
}
public client_putinserver(iPlayer)
{
g_flTimeNextChangeName[iPlayer] = 0.0;
g_iWarnings[iPlayer] = 0;
}
public CBasePlayer_SetClientUserInfoName_Pre(const iPlayer, infobuffer[], szNewName[])
{
new Float:flCurrentTime = get_gametime();
if (g_flTimeNextChangeName[iPlayer] > flCurrentTime)
{
if (g_iWarnings[iPlayer] < MAC_MAXWARNINGS)
{
client_print_color(iPlayer, print_team_default, "^1[^4NameFlooding^1] ^3Ник ^1можно будет сменить через^4 %0.f^1 сек. Предупреждение:^4 %i/%i",
client_cmd(iPlayer, "spk buttons/button2.wav"),
g_flTimeNextChangeName[iPlayer] - flCurrentTime, g_iWarnings[iPlayer]+1, MAC_MAXWARNINGS);
}
else if (g_iWarnings[iPlayer] == MAC_MAXWARNINGS)
{
server_cmd("kick #%i ^"Name change flooding!^"", get_user_userid(iPlayer));
}
g_iWarnings[iPlayer]++;
SetHookChainReturn(ATYPE_BOOL, false);
return HC_SUPERCEDE;
}
g_flTimeNextChangeName[iPlayer] = flCurrentTime + MAC_CHANGEDELAY.0;
g_iWarnings[iPlayer] = 0;
return HC_CONTINUE;
}
Привет форумчане столкнулся с маленьким казусом. Суть в том что за место указано го в переменой значения
выводит какое то мега огромное число, а вместо
выводит нулевое значение сообщением в чат.
Просьба помочь кто по опытней.
p.s исходник я немного подкурочил под себя ?
Скрин см. ниже
C++:
#define MAC_MAXWARNINGS 3 // максимальное кол-во предупреждений перед киком
C++:
#define MAC_CHANGEDELAY 120 // время в секундах, по истечению которого ник вновь можно будет сменить
Просьба помочь кто по опытней.
p.s исходник я немного подкурочил под себя ?
Скрин см. ниже
В этой теме было размещено решение! Перейти к решению.
Вложения
-
1.4 MB Просмотры: 317