[ReAPI] Flasher Punish плагин

Статус
В этой теме нельзя размещать новые ответы.
Сообщения
2
Реакции
0
Дезинформация
Ошибка
L 05/31/2020 - 15:26:42: [AMXX] Displaying debug trace (plugin "reapi_flasher_punish.amxx")
L 05/31/2020 - 15:26:42: [AMXX] Run time error 10: native error (native "SetHookChainReturn")
L 05/31/2020 - 15:26:42: [AMXX] [0] e7c36a7b706a6ed48e2e263771893764.sma::CBasePlayer_HasRestrictItem (line 240)
ОС
Linux
Amx Mod X
AMX Mod X 1.9.0
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 "Damaged Soul" Ehlert
Compiled: Feb 14 2013, 00:55:00
URL:http://www.amxmodx.org/
Билд
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
Exe build: 15:17:55 Jul 24 2019 (8308)
ReGamedll
Нету
Версия Metamod
Metamod v1.21p37  2013/05/30 (5:13)
by Will Day
http://www.metamod.org/
Patch: Metamod-P (mm-p) v37
by Jussi Kivilinna
http://metamod-p.sourceforge.net/
compiled: May 30 2013, 11:41:16 EET (optimized)
ifvers: 5:13
Список метамодулей
Currently running plugins:
[ 1] Reunion, v0.1.75, 2016-12-20, by The Legion, see
[ 2] SafeNameAndChat, v1.1, 2017.02.01, by WPMG.PRoSToC0der, see http://snac.wpmg.ru/
[ 3] ProcessCmds, v1.1.6, 06.04.2020, by GoDtm666, see http://www.myarena.ru/
[ 4] AMX Mod X, v1.8.2, Feb 14 2013, by AMX Mod X Dev Team, see http://www.amxmodx.org
[ 5] Revoice, v0.1.0.34, 2020-03-03, by The Legion, see
[ 6] Rechecker, v2.5, Oct 21 2017, by s1lent, see http://www.dedicated-server.ru/
[ 7] ReSemiclip, v2.3.9, 13/02/17, by s1lent & Adidasman, see http://www.dedicated-server.ru/
[ 8] Engine, v1.8.2, Feb 14 2013, by AMX Mod X Dev Team, see http://www.amxmodx.org
[ 9] FakeMeta, v1.8.2, Feb 14 2013, by AMX Mod X Dev Team, see http://www.amxmodx.org
[ 10] MySQL, v1.8.2, Feb 14 2013, by AMX Mod X Dev Team, see http://www.amxmodx.org/
[ 11] CStrike, v1.8.2, Feb 14 2013, by AMX Mod X Dev Team, see http://www.amxmodx.org
[ 12] CSX, v1.8.2, Feb 14 2013, by AMX Mod X Dev Team, see http://www.amxmodx.org/
[ 13] Ham Sandwich, v1.8.2, Feb 14 2013, by AMX Mod X Dev Team, see http://www.amxmodx.org
[ 14] Fun, v1.8.2, Feb 14 2013, by AMX Mod X Dev Team, see http://www.amxmodx.org
[ 15] ReAPI, v5.13.0.194-dev, 2020-05-14, by Asmodai & s1lent, see https://github.com/s1lentq/reapi/
[ 16] ReAimDetector, v0.2.2, 2018-02-06, by ReHLDS Team, see http://www.dedicated-server.ru/
Список плагинов
name                    version     author            file             status   
[ 1] [182] AMXBans RBS 19.11.29 SKAJIbnEJIb & La amxbans_rbs.amx running
[ 2] Anti Flood 1.8.2 AMXX Dev Team antiflood.amxx running
[ 3] Admin Commands 1.8.1.3746 AMXX Dev Team admincmd.amxx running
[ 4] Admin Votes 1.8.1.3746 Wildness Team adminvote.amxx running
[ 5] Admin Chat 1.8.M AMXX Dev Team adminchat.amxx running
[ 6] Commands Menu 1.8.2 AMXX Dev Team cmdmenu.amxx running
[ 7] Info. Messages 1.8.2 AMXX Dev Team imessage.amxx running
[ 8] Maps Menu 1.8.1.3746 AMXX Dev Team mapsmenu.amxx running
[ 9] CS Misc. Stats 1.8.2 AMXX Dev Team miscstats.amxx running
[ 10] Aliases checker 1.0.6 kanagava alias_detector_ running
[ 11] Menus Front-End 18.12.18 AMXX Dev Team & amxmodmenu_rbs. running
[ 12] Pause Plugins 1.8.2 AMXX Dev Team pausecfg.amxx running
[ 13] Players Menu 1.8.1.3746 AMXX Dev Team plmenu.amxx running
[ 14] Lite VoteBan 1.4 neygomon lite_voteban.am debug
[ 15] Scrolling Message 1.8.2 AMXX Dev Team scrollmsg.amxx running
[ 16] CS Stats Logging 1.8.2 AMXX Dev Team stats_logging.a running
[ 17] [182] Army Ranks Ultim 19.11.29 SKAJIbnEJIb army_ranks_ulti running
[ 18] [182] Stats Configurat 18.05.15 SKAJIbnEJIb & AM statscfg_rbs.am running
[ 19] [182] StatsX RBS 19.08.28 SKAJIbnEJIb & AM statsx_rbs.amxx running
[ 20] [182] FunGun Updater 17.10.30 SKAJIbnEJIb fungunupdater.a stopped
[ 21] [182] Chat RBS 19.12.23 SKAJIbnEJIb chat_rbs.amxx running
[ 22] Grab+ 1.2.3 Ian Cammarata grab_plus.amxx running
[ 23] [182] Jobs RBS 19.02.22 SKAJIbnEJIb jobs_rbs.amxx running
[ 24] High Ping Kicker 1.0 Shadow/Bo0m! amx_hpk.amxx running
[ 25] Autoresponder/Advertis 0.5 MaximusBrood ad_manager.amxx running
[ 26] [182] Snipers RBS 19.11.29 SKAJIbnEJIb snipers_rbs.amx running
[ 27] TOP VIP (Auto Set) 1.0a Leo_[BH] top_vip.amxx running
[ 28] [182] VIP RBS 19.12.09 SKAJIbnEJIb vip_rbs.amxx running
[ 29] [182] Damager RBS 19.08.30 SKAJIbnEJIb damager_rbs.amx running
[ 30] Auto recording demo 2.0 IzI | Bonaqua (R amx_autodemorec running
[ 31] [182] Warmup RBS 19.12.23 SKAJIbnEJIb warmup_rbs.amxx running
[ 32] AMXX Defender 1.0 BaHeK defender.amxx running
[ 33] Ultimate Gore 1.6 JTP10181 amx_gore_ultima running
[ 34] [182] Parachute RBS 17.12.12 KRoT@L/JTP10181 parachute_rbs.a running
[ 35] ADV. QUAKE SOUNDS (ENA 5.0 HATTRICK (HTTRCK quakesounds.amx running
[ 36] Admin ESP 1.5b_mini KoST admin_esp_mini. running
[ 37] Block HudTextArgs 1.0 ConnorMcLeod hudtextargsbloc running
[ 38] SpecList 1.2a FatalisDK speclist_rus.am running
[ 39] FM ResetScore 0.1 neygomon fm_rs.amxx running
[ 40] Lite Kill Assist 1.17 neygomon lite_kill_assis running
[ 41] [182] AfkKicker RBS 19.08.28 SKAJIbnEJIb afkkicker_rbs.a running
[ 42] [182] PTB RBS 17.10.30 Ptahhotep & SKAJ ptb_rbs.amxx running
[ 43] [182] Ultimate Informe 17.10.30 SKAJIbnEJIb ultimate_inform running
[ 44] [182] Ultimate Flags 19.10.30 SKAJIbnEJIb ultimate_flags. running
[ 45] mute menu 1.0 cheap_suit mute_menu.amxx running
[ 46] COLORS MENU 1.2 DUKKHAZ0R color.amxx running
[ 47] Map Spawns Editor 1.0.16 iG_os map_spawns_edit running
[ 48] Map Manager: Advanced 0.0.5 Mistrick map_manager_adv running
[ 49] Map Manager: BlockList 0.0.3 Mistrick map_manager_blo running
[ 50] Map Manager: Core 3.0.7 Mistrick map_manager_cor running
[ 51] Map Manager: Effects 0.0.9 Mistrick map_manager_eff running
[ 52] Map Manager: Nominatio 0.1.2 Mistrick map_manager_nom running
[ 53] Map Manager: Informer 0.0.5 Mistrick map_manager_inf running
[ 54] Map Manager: Online so 0.0.2 Mistrick map_manager_onl debug
[ 55] Map Manager: Rtv 0.1.1 Mistrick map_manager_rtv running
[ 56] Map Manager: Scheduler 0.1.5 Mistrick map_manager_sch running
[ 57] [ReAPI] Flasher Punish 0.0.2b Vaqtincha reapi_flasher_p debug
[ 58] ReAimDetector API 0.2.2 ReHLDS Team reaimdetector.a running
[ 59] Last players sound 1.0 dev-cs community last_players_so running
59 plugins, 58 running
Автор плагина
Vaqtincha
Версия плагина
0.0.2b
Исходный код
// Copyright © 2016 Vaqtincha

/**■■■■■■■■■■■■■■■■■■■■■■■■■■■■ CONFIG START ■■■■■■■■■■■■■■■■■■■■■■■■■■■■*/
/// main:
#define PUNISH_BEGIN 3 // fails
// #define IMMUNITY_FLAG ADMIN_IMMUNITY
// #define RESET_IN_RESTART
#define TEMP_SAVE_DATA // reconnect protection


/// penalty's:
#define RESTRICT_FLASHBANG 600 // restrict time (sec)
#define NO_MONEY_NEXT_ROUND // NoReceiveMoneyNextRound
// #define MONEY_PENALTY 100 //
#define SLAP_FLASHER 10 // set slap power
// #define STRIP_WEAPONS // remove all items
// #define MIROR_BLIND //

/**■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ CONFIG END ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■*/

#define PL_VERSION "0.0.2b"
// #define DEBUG // test

#include <amxmodx>

#if AMXX_VERSION_NUM < 183
#include <colorchat>
#endif

#include <reapi>


#define rg_set_account rg_add_account
#define MAX_NAME_LEN 32
#define MAX_AUTHID_LEN 32

#define FFADE_IN 0x0000
#define sec_to_scrfade_units(%1) clamp((floatround(%1))<<12, 0, 0xFFFF)

new g_szPlayerName[MAX_CLIENTS+1][MAX_NAME_LEN]
new g_iFails[MAX_CLIENTS+1]
#if defined RESTRICT_FLASHBANG
new Float:g_flLastBlind[MAX_CLIENTS+1]
#endif

#if defined TEMP_SAVE_DATA
new g_szAuthid[MAX_CLIENTS+1][MAX_AUTHID_LEN]
new Trie:g_tPlayerData

public plugin_end()
{
TrieDestroy(g_tPlayerData)
}

public client_disconnect(pPlayer)
{
if(g_szAuthid[pPlayer][0] && g_iFails[pPlayer])
TrieSetCell(g_tPlayerData, g_szAuthid[pPlayer], g_iFails[pPlayer])
}
#endif

public plugin_init()
{
register_plugin("[ReAPI] Flasher Punish", PL_VERSION, "Vaqtincha")

RegisterHookChain(RG_PlayerBlind, "PlayerBlind", .post = false)
RegisterHookChain(RG_CBasePlayer_SetClientUserInfoName, "CBasePlayer_SetUserInfoName", .post = true)

#if defined RESTRICT_FLASHBANG
RegisterHookChain(RG_CBasePlayer_HasRestrictItem, "CBasePlayer_HasRestrictItem", .post = false)
RegisterHookChain(RG_CBasePlayer_AddPlayerItem, "CBasePlayer_AddPlayerItem", .post = false)
#endif
#if defined DEBUG
RegisterHookChain(RG_CBasePlayer_Spawn, "CBasePlayer_Spawn", .post = true)
#endif
#if defined TEMP_SAVE_DATA
g_tPlayerData = TrieCreate()
#endif
#if defined RESET_IN_RESTART
register_event("TextMsg", "Event_NewGame", "a", "2=#Game_will_restart_in", "2=#Game_Commencing")
}

public Event_NewGame()
{
arrayset(g_iFails, 0, sizeof(g_iFails))
#if defined RESTRICT_FLASHBANG
// arrayset(g_flLastBlind, 0.0, sizeof(g_flLastBlind))
#endif
#endif
}

#if defined DEBUG
public CBasePlayer_Spawn(const pPlayer)
{
if(is_user_alive(pPlayer))
{
rg_give_item(pPlayer, "weapon_flashbang")
rg_give_item(pPlayer, "weapon_flashbang")
}

return HC_CONTINUE
}
#endif

public client_putinserver(pPlayer)
{
get_user_name(pPlayer, g_szPlayerName[pPlayer], MAX_NAME_LEN -1)

#if defined TEMP_SAVE_DATA
get_user_authid(pPlayer, g_szAuthid[pPlayer], MAX_AUTHID_LEN -1)
if(g_szAuthid[pPlayer][0] == 'S' && TrieGetCell(g_tPlayerData, g_szAuthid[pPlayer], g_iFails[pPlayer]))
{
#if defined RESTRICT_FLASHBANG
g_flLastBlind[pPlayer] = get_gametime() + RESTRICT_FLASHBANG.0
#endif
}
else{
g_iFails[pPlayer] = 0
g_szAuthid[pPlayer][0] = 0
#if defined RESTRICT_FLASHBANG
g_flLastBlind[pPlayer] = 0.0
#endif
}
#else
g_iFails[pPlayer] = 0
#endif
}


/// MAIN
public PlayerBlind(const pPlayer, const inflictor, const pAttacker, const Float:fadeTime, const Float:fadeHold, const alpha, Float:color[3])
{
if(pPlayer == pAttacker)
return HC_CONTINUE

if(get_member(pPlayer, m_iTeam) == get_member(pAttacker, m_iTeam))
{
client_print_color(pPlayer, print_team_default, "^4* ^1Вас ослепил ^3%s", g_szPlayerName[pAttacker])

#if defined IMMUNITY_FLAG
if(get_user_flags(pAttacker) & IMMUNITY_FLAG)
return HC_CONTINUE
#endif
g_iFails[pAttacker]++
client_print_color(pAttacker, print_team_default, "^4* ^1Вы ослепили тиммейта ^3%s ^1всего: ^4%d ^1раз(a)", g_szPlayerName[pPlayer], g_iFails[pAttacker])

if(g_iFails[pAttacker] < PUNISH_BEGIN)
return HC_CONTINUE

#if defined RESTRICT_FLASHBANG
g_flLastBlind[pAttacker] = get_gametime() + RESTRICT_FLASHBANG.0
#endif
#if defined NO_MONEY_NEXT_ROUND
set_member(pAttacker, m_bReceivesNoMoneyNextRound, true)
#endif
#if defined STRIP_WEAPONS
rg_remove_all_items(pAttacker)
#endif
#if defined MONEY_PENALTY
rg_set_account(pAttacker, max(get_member(pAttacker, m_iAccount) - MONEY_PENALTY, 0), .typeSet = AS_SET)
#endif
#if defined SLAP_FLASHER
user_slap(pAttacker, SLAP_FLASHER)
#endif
#if defined MIROR_BLIND
ScreenFade(pAttacker, fadeTime, fadeHold, alpha)
#endif
// return HC_SUPERCEDE // block flash (aka noteamflash)
}

return HC_CONTINUE
}

public CBasePlayer_SetUserInfoName(const pPlayer, infobuffer[], szNewName[])
{
if(!equal(g_szPlayerName[pPlayer], szNewName))
copy(g_szPlayerName[pPlayer], MAX_NAME_LEN -1, szNewName)
}

///
#if defined RESTRICT_FLASHBANG
public CBasePlayer_AddPlayerItem(const pPlayer, const pItem)
{
if(g_iFails[pPlayer] < PUNISH_BEGIN || get_member(pItem, m_iId) != WEAPON_FLASHBANG)
return HC_CONTINUE

if(g_flLastBlind[pPlayer] <= get_gametime())
return HC_CONTINUE

SetHookChainReturn(ATYPE_INTEGER, false)
return HC_SUPERCEDE
}

public CBasePlayer_HasRestrictItem(const pPlayer, const ItemID:item, const ItemRestType:type)
{
if(g_iFails[pPlayer] < PUNISH_BEGIN || item != ITEM_FLASHBANG)
return HC_CONTINUE

static Float:flCurTime; flCurTime = get_gametime()
if(g_flLastBlind[pPlayer] <= flCurTime)
return HC_CONTINUE

if(type == ITEM_TYPE_BUYING)
client_print(pPlayer, print_center, "Вы не можете купить данный предмет ^rв течении %0.f сек", (g_flLastBlind[pPlayer] - flCurTime))

SetHookChainReturn(ATYPE_INTEGER, true)
return HC_SUPERCEDE
}
#endif



stock ScreenFade(const pPlayer, const Float:flFxTime, const Float:flHoldTime, const iAlpha)
{
static iMsgIdScreenFade
if(!iMsgIdScreenFade)
iMsgIdScreenFade = get_user_msgid("ScreenFade")

if(is_user_alive(pPlayer)) // send only alive player
{
message_begin(MSG_ONE, iMsgIdScreenFade, .player = pPlayer)
write_short(sec_to_scrfade_units(flFxTime))
write_short(sec_to_scrfade_units(flHoldTime))
write_short(FFADE_IN)
write_byte(255) // red
write_byte(255) // green
write_byte(255) // blue
write_byte(iAlpha)
message_end()
}
}
Ошибка в логах, как убрать
 
Сообщения
1,698
Реакции
1,510
Помог
26 раз(а)
А где ошибка?
 
Статус
В этой теме нельзя размещать новые ответы.

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

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