Пользователь
- Сообщения
- 3
- Реакции
- 0
- Ошибка
-
не работает запоминание (плагин запускается но не делает свою функцию)
- ОС
- Linux
- Amx Mod X
-
1.8.3-Re
- Билд
-
ReHLDS version: 3.7.0.692-dev
- ReGamedll
-
ReGameDLL version: 5.13.0.434-dev
- Версия Metamod
-
Metamod-r v1.3.0.128, API (5:13)
- Список метамодулей
-
[ 1] Reunion RUN - reunion_mm_i386.so v0.1.0.92 ini Start Never
[ 2] ReAuthCheck RUN - reauthcheck_mm_i386.so v0.1.6 ini Start Never
[ 3] VoiceTranscoder RUN - VoiceTranscoder.so v2017RC4 ini ANY ANY
[ 4] AMX Mod X RUN - amxmodx_mm_i386.so v1.8.3-Re ini Start ANY
[ 5] Rechecker RUN - rechecker_mm_i386.so v2.5 ini Chlvl ANY
[ 6] CStrike RUN - cstrike_amxx_i386.so v1.8.3-Re pl4 ANY ANY
[ 7] CSX RUN - csx_amxx_i386.so v1.8.3-Re pl4 ANY ANY
[ 8] Fun RUN - fun_amxx_i386.so v1.8.3-Re pl4 ANY ANY
[ 9] FakeMeta RUN - fakemeta_amxx_i386.so v1.8.3-Re pl4 ANY ANY
[10] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.8.3-Re pl4 ANY ANY
[11] GeoIP RUN - geoip_amxx_i386.so v1.8.3-Re pl4 ANY ANY
[12] MySQL RUN - mysql_amxx_i386.so v1.8.3-Re pl4 ANY ANY
[13] SQLite RUN - sqlite_amxx_i386.so v1.8.3-Re pl4 ANY ANY
[14] Engine RUN - engine_amxx_i386.so v1.8.3-Re pl4 ANY ANY
[15] ReAPI RUN - reapi_amxx_i386.so v5.12.0.192-dev pl4 ANY Never
[16] ReAimDetector RUN - reaimdetector_amxx_i386.so v0.2.2 pl4 ANY Never
[17] ReCSDM RUN - csdm_amxx_i386.so v3.6 pl4 ANY ANY
- Список плагинов
-
[ 1] FreshBans 1.4.0b kanagava fresh_bans_1.4. running
[ 2] ReAimDetector API 0.2.2 ReHLDS Team reaimdetector.a running
[ 3] Advanced Gag 1.9.0 neygomon amx_gag.amxx running
[ 4] Advanced MapChooser 1.4 neygomon map_chooser.amx running
[ 5] Admin Base 1.9.0.5249 AMXX Dev Team admin.amxx running
[ 6] Admin Commands 1.8.3-Re AMXX Dev Team admincmd.amxx running
[ 7] Players Menu 1.7 neugomon players_menu.am running
[ 8] Admin Chat 1.8.3-Re AMXX Dev Team adminchat.amxx running
[ 9] Anti Flood 1.8.3-Re AMXX Dev Team antiflood.amxx running
[ 10] Maps Menu 1.8.3-Re AMXX Dev Team mapsmenu.amxx running
[ 11] Restrict Weapons 1.8.3-Re AMXX Dev Team restmenu.amxx running
[ 12] Admin Votes 1.8.3-Re AMXX Dev Team adminvote.amxx running
[ 13] Stats Configuration 1.8.3-Re AMXX Dev Team statscfg.amxx running
[ 14] Say Me & Hp 1.0 Hypa_[KZ] say_me_and_hp.a running
[ 15] Auto Restart 1.0.3 neygomon auto_rr.amxx running
[ 16] Menus Front-End 1.5 neugomon menufront_end.a running
[ 17] ScreenMaker 1.1 neygomon screen_maker.am running
[ 18] AFK Control 1.4.1 [Rnd neygomon afk_control.amx running
[ 19] Ping Control 0.3 neygomon ping_control.am running
[ 20] ResetScore and GameNam 1.0 Phantom rs_and_game_nam running
[ 21] Advert Messages 1.2.2 neygomon adverts.amxx running
[ 22] Anti Reklama 1.1 MarcaD anti_reklama.am running
[ 23] Chat Manager 1.1.1-11 Mistrick chatmanager.amx running
[ 24] RC BaseChanger 1.0 AMXX rc_basechanger. running
[ 25] ReChecker Logging 1.0 AMXX rc_logging.amxx running
[ 26] WalkGuard 1.3.2 mogel walkguard.amxx running
[ 27] [ReAPI] Hint blocker 0.1.0 F@tn0M reapi_hint_bloc running
[ 28] Show timeleft for CSDM 1.0 neygomon timer.amxx running
[ 29] Screen Fade 0.1 neygomon screen_fade.amx running
[ 30] Accuracy Fix 3.0 Numb accuracy_fix.am running
[ 31] WeaponState Remember 0.0.4 Vaqtincha weaponstate_rem running
[ 32] Advanced Experience Sy 0.5.9 [REA serfreeman1337/s aes_main.amxx running
[ 33] AES: CStrike Addon 0.5.9 [REA serfreeman1337/s aes_exp_cstrike running
[ 34] AES: Informer 0.5.9 [REA serfreeman1337/s aes_informer.am running
[ 35] AES: Admin Tools 0.5.9 [REA serfreeman1337/s aes_exp_editor. running
[ 36] AES: StatsX 0.5.9 [REA serfreeman1337/s aes_statsx_cstr running
[ 37] AES: Bonus System 0.5.9 Vega serfreeman1337/s aes_bonus_syste running
[ 38] AES: Bonus CSTRIKE 0.5.9.1 [R serfreeman1337/s aes_bonus_cstri running
[ 39] ReCSDM Main 3.6 ReCSDM Team csdm_main.amxx running
[ 40] ReCSDM Equip 3.6 ReCSDM Team csdm_equip.amxx running
[ 41] ReCSDM Spawns 3.6 ReCSDM Team csdm_spawn_pres running
[ 42] ReCSDM Misc 3.6 ReCSDM Team csdm_misc.amxx running
[ 43] ReCSDM Stripper 3.6 KWo csdm_stripper.a running
[ 44] ReCSDM Protection 3.6 BAILOPAN csdm_protection running
- Автор плагина
- Vaqtincha
- Версия плагина
- 0.0.4
- Исходный код
-
// Copyright © 2016 Vaqtincha
//============================ CONFIG START ===========================//
// #define ONLY_GIVEN
// #define NOTIFICATION // glock & famas
//============================= CONFIG END ============================//
#define VERSION "0.0.4"
// offsets
const m_iId = 43
const m_pPlayer = 41
const m_fWeaponState = 74
// linux extraoffset
const XO_WEAPON = 4
const PDATA_SAFE = 2
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#define MAX_PLAYERS 32
#define IsOnGround(%1) (pev(pev(%1, pev_owner), pev_flags) & FL_ONGROUND)
#define IsPlayer(%1) (1 <= (%1) <= g_iMaxPlayers)
#define get_weapon_owner(%1) get_pdata_cbase(%1, m_pPlayer, XO_WEAPON)
#define get_weapon_state(%1) any:get_pdata_int(%1, m_fWeaponState, XO_WEAPON)
#define set_weapon_state(%1,%2) set_pdata_int(%1, m_fWeaponState, any:%2, XO_WEAPON)
// #define get_weapon_id(%1) get_pdata_int(%1, m_iId, XO_WEAPON)
stock get_weapon_id(pWeapon) { // safe
new iId = get_pdata_int(pWeapon, m_iId, XO_WEAPON)
return (CSW_P228 <= iId <= CSW_P90) ? iId : 0
}
enum WeaponState
{
WPNSTATE_NULL = 0,
WPNSTATE_USP_SILENCED = (1<<0),
WPNSTATE_GLOCK18_BURST_MODE = (1<<1),
WPNSTATE_M4A1_SILENCED = (1<<2),
// WPNSTATE_ELITE_LEFT = (1<<3),
WPNSTATE_FAMAS_BURST_MODE = (1<<4),
// WPNSTATE_SHIELD_DRAWN = (1<<5)
}
new g_iMaxPlayers
new WeaponState:g_bWeaponState[MAX_PLAYERS +1][CSW_P90 + 1]
public plugin_init()
{
register_plugin("WeaponState Remember", VERSION, "Vaqtincha")
static const szWeaponList[][] = {
"weapon_m4a1", "weapon_usp",
"weapon_famas", "weapon_glock18"
}
for(new i = 0; i < sizeof(szWeaponList); ++i)
{
RegisterHam(Ham_Item_AddToPlayer, szWeaponList[i], "Item_AddToPlayer_Post", .Post = true)
RegisterHam(Ham_Weapon_SecondaryAttack, szWeaponList[i], "Weapon_SecondaryAttack_Post", .Post = true)
}
g_iMaxPlayers = get_maxplayers()
}
public client_putinserver(id)
{
g_bWeaponState[id][CSW_M4A1]
= g_bWeaponState[id][CSW_USP]
= g_bWeaponState[id][CSW_FAMAS]
= g_bWeaponState[id][CSW_GLOCK18]
= WPNSTATE_NULL;
}
public Weapon_SecondaryAttack_Post(pWeapon)
{
if(pWeapon <= 0)
return HAM_IGNORED
new id = get_weapon_owner(pWeapon)
if(IsPlayer(id))
{
// client_print(id, print_center, "current %i my %i", get_weapon_state(pWeapon), g_bWeaponState[id][get_weapon_id(wEnt)])
g_bWeaponState[id][get_weapon_id(pWeapon)] = get_weapon_state(pWeapon)
}
return HAM_IGNORED
}
public Item_AddToPlayer_Post(pWeapon, id)
{
if(pWeapon <= 0 || pev_valid(pWeapon) != PDATA_SAFE /* || !is_user_alive(id) */)
return HAM_IGNORED
#if defined ONLY_GIVEN
if(IsOnGround(pWeapon))
return HAM_IGNORED
#endif
new iId = get_weapon_id(pWeapon)
set_weapon_state(pWeapon, g_bWeaponState[id][iId])
#if defined NOTIFICATION
if((g_bWeaponState[id][iId] & WPNSTATE_FAMAS_BURST_MODE) || (g_bWeaponState[id][iId] & WPNSTATE_GLOCK18_BURST_MODE))
{
client_print(id, print_center, "#Cstrike_TitlesTXT_Switch_To_BurstFire")
}
#endif
return HAM_IGNORED
}
Не происходить абсолютно ничего, никакого эффекта запоминания. Плагин не запоминает состояние m4a1/usp (или famas/glock) и не переключает режим при получении оружия