Ошибка при падении: PF_WriteString_I: called with no active message

Статус
В этой теме нельзя размещать новые ответы.
Сообщения
345
Реакции
77
Помог
14 раз(а)
Ошибка
PF_WriteString_I: called with no active message
ОС
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:32:02
Built from: https://github.com/alliedmodders/amxmodx/commit/6cecb34e
Build ID: 5249:6cecb34e
Core mode: JIT+ASM32
Билд
Protocol version 48
Exe version 1.6.3.7/Stdio (cstrike)
ReHLDS version: 3.12.0.782-dev
Build date: 12:19:10 Dec 07 2022 (3161)
Build from: https://github.com/dreamstalker/rehlds/commit/5e8b0ba
ReGamedll
ReGameDLL version: 5.21.0.575-dev
Build date: 21:32:24 Dec 17 2022
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/889edc8
Версия Metamod
Metamod-r v1.3.0.128, API (5:13)
Metamod-r build: 15:47:38 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] AMX Mod X RUN - amxmodx_mm.dll v1.9.0.5249 ini Start ANY
[ 2] Reunion RUN - reunion_mm.dll v0.1.0.92 ini Start Never
[ 3] Revoice RUN - revoice_mm.dll v0.1.0.32 ini Start Never
[ 4] Ultimate Unprecacher RUN - ultimate_unprecacher_mm.dll v0.3 Alpha ini ANY ANY
[ 5] mmtimer RUN - mmtimer.dll v1.6 ini ANY Never
[ 6] ReAPI RUN - reapi_amxx.dll v5.22.0.254-dev pl1 ANY Never
[ 7] CStrike RUN - cstrike_amxx.dll v1.9.0.5294 pl1 ANY ANY
[ 8] FakeMeta RUN - fakemeta_amxx.dll v1.9.0.5249 pl1 ANY ANY
[ 9] Ham Sandwich RUN - hamsandwich_amxx.dll v1.9.0.5249 pl1 ANY ANY
[10] CSX RUN - csx_amxx.dll v1.9.0.5294 pl1 ANY ANY
[11] Engine RUN - engine_amxx.dll v1.9.0.5249 pl1 ANY ANY
[12] Fun RUN - fun_amxx.dll v1.9.0.5249 pl1 ANY ANY
12 plugins, 12 running
Список плагинов
name                    version     author            file             status
[ 1] Admin Base 1.9.0.5249 AMXX Dev Team admin.amxx running
[ 2] Admin Commands 1.9.0.5249 AMXX Dev Team admincmd.amxx running
[ 3] Admin Help 1.9.0.5249 AMXX Dev Team adminhelp.amxx running
[ 4] Slots Reservation 1.9.0.5249 AMXX Dev Team adminslots.amxx running
[ 5] Multi-Lingual System 1.9.0.5249 AMXX Dev Team multilingual.am running
[ 6] Commands Menu 1.9.0.5249 AMXX Dev Team cmdmenu.amxx running
[ 7] Players Menu 1.7 neugomon players_menu.am running
[ 8] Maps Menu 1.9.0.5249 AMXX Dev Team mapsmenu.amxx running
[ 9] Plugin Menu 1.9.0.5249 AMXX Dev Team pluginmenu.amxx running
[ 10] Admin Chat 1.9.0.5249 AMXX Dev Team adminchat.amxx running
[ 11] Anti Flood 1.9.0.5249 AMXX Dev Team antiflood.amxx running
[ 12] Scrolling Message 1.9.0.5249 AMXX Dev Team scrollmsg.amxx running
[ 13] Info. Messages 1.9.0.5249 AMXX Dev Team imessage.amxx running
[ 14] Admin Votes 1.9.0.5249 AMXX Dev Team adminvote.amxx running
[ 15] NextMap 1.9.0.5249 AMXX Dev Team nextmap.amxx running
[ 16] Nextmap Chooser 1.9.0.5249 AMXX Dev Team mapchooser.amxx running
[ 17] TimeLeft 1.9.0.5249 AMXX Dev Team timeleft.amxx running
[ 18] Pause Plugins 1.9.0.5249 AMXX Dev Team pausecfg.amxx running
[ 19] Stats Configuration 1.9.0.5249 AMXX Dev Team statscfg.amxx running
[ 20] Zombie Plague 4.3 Fix6a MeRcyLeZZ zombie_plague40 debug
[ 21] [ZP]Level System 6.0 Dambas zp_level_system running
[ 22] Check Write String 1.0 fl0wer check_writestri running
[ 23] [API] Addon: Smoke Wal 1.1.1 Yoshioka Haruki zp_addon_smoke_ running
[ 24] [API] Addon: MuzzleFla 1.6 Yoshioka Haruki zp_addon_muzzle running
[ 25] unknown unknown unknown zp43_buymenu.am debug
[ 26] [ZP] Grenade: Antidote 1.0 | 2023 R1CHICOREJZ zp_item_shop_an running
[ 27] mkod_steam_pack 1.0 MKOD zp_item_shop_ar running
[ 28] [ZP] Extra Item: No Re 0.1.0 fezh zp_item_shop_no running
[ 29] [ZP] Extra Item: Jump 1.0 Opo4uMapy zp_item_shop_ju running
[ 30] UTS-15 1.0 protatype zp_item_shop_ut running
[ 31] Scar Oz-B 1.0 PeTRoX zp_item_shop_sc running
[ 32] [ZP] Extra: K1A Specia 1.0 Crock / =) (Popr zp_item_shop_k1 running
[ 33] [ZP] Extra: Blaster [S 1.0 Crock / =) (Popr zp_item_shop_sf running
[ 34] [CSO] Ethereal 0.0.1 Shurik07 zp_item_shop_et running
[ 35] [ZP] Extra: CSO Weapon 1.1 KORD_12.7 zp_item_shop_ch running
[ 36] [ZP] Weapon: SG552 Cer 1.0 Yoshioka Haruki zp_item_shop_bu running
[ 37] [ZP] Extra: Chey-Tac M 1.0 Crock / =) (Popr zp_item_shop_m2 running
[ 38] [CSO] Weapon: Crossbow 1.0 Base: Batcon & x zp_item_shop_cr running
[ 39] [CSO Like] Weapon: SVD 1.1 / 03.0 inf (nimroK) / B zp_item_shop_sv running
[ 40] [ZP] ZClass: Hunter 1.0 Undead zp_zombie_class running
[ 41] [ZP] Class Tight 1.0c unknow zp_zombie_class running
[ 42] unknown unknown unknown zp_zombie_class running
[ 43] [ZP] ZClass: Light 1.0 Undead zp_zombie_class running
[ 44] [ZP] ZClass: Smoker 1.0 Undead zp_zombie_class running
[ 45] [ZP] ZClass: Healer 1.0 Undead zp_zombie_class running
[ 46] [ZP] ZClass: Revenant 1.0 | 2023 R1CHICOREJZ zp_zombie_class running
[ 47] [ZP] Zombie Class: Dra 0.1 =), LARS-BLOODLI zp_zombie_class running
[ 48] [ZP Class] Teleport 0.2 ONYX zp_zombie_class running
[ 49] unknown unknown unknown zp_item_survior running
[ 50] [ZP] Vip Menu 1.0.2 Nordic Warrior zp_vipmenu_new. running
[ 51] [ZMO] Weapon: Deagle C 1.0 Chrescoe1 , Plan zp_item_vip_dea running
[ 52] [ZP] Weapon: AK47 Beas 1.0 | 2018 xUnicorn (t3rkec zp_item_vip_ak4 running
[ 53] [ZP] Premium Menu 1.0.2 Nordic Warrior zp_premiummenu_ running
[ 54] [ZP] Extra: CSO Weapon 1.0 Base: Batcon; Re zp_item_premium running
[ 55] [ZP] Weapon: JANUS-5 1.0 xUnicorn (t3rkec zp_item_premium running
[ 56] [ZP] Overlord Menu 1.0.2 Nordic Warrior zp_overlordmenu running
[ 57] [X-CSO] Weapon: Mangum 1.1 xUnicorn (t3rkec zp_item_overlor running
[ 58] [ZMO] Weapon: SF Laser 1.0 Base: Batcon; Re zp_item_overlor running
[ 59] [ZP] Sponsor Menu 1.0.2 Nordic Warrior zp_sponsormenu_ running
[ 60] [ZP] Weapon: Hunter Ki 1.0 Yoshioka Haruki zp_item_sponsor debug
[ 61] [ZP] Weapon: M95 White 1.1 xUnicorn (t3rkec zp_item_sponsor running
[ 62] [ZP] Weapon: Shining H 1.2 xUnicorn (t3rkec zp_item_sponsor running
[ 63] [Customizable] AmxModM 0.0.5 Albertio amxmodmenu.amxx running
[ 64] [ZP] Admin Menu 1.0 emtrA zp_adminmenu.am running
[ 65] [ZP] Knife: Dragon Swo 1.0 xUnicorn (t3rkec zp_item_knife_d running
[ 66] [CSO] Knife: Dual Swor 0.2 Phenix / Finish: zp_item_knife_d running
[ 67] [ZP] Knife: Dread Nova 1.0 | 2019 xUnicorn (t3rkec zp_item_knife_d running
[ 68] [ZP] Addon: Knife Mod 1.0 xUnicorn zp_addon_knifes running
[ 69] Respawn 1.0 suNx\tERoR zp_join_spawn.a running
[ 70] mkod_show_bullet_damag 1.0 MKOD zp_damager.amxx running
[ 71] unknown unknown unknown zp_nemskill.amx bad load
[ 72] Infection bomb for 1st 1.0 Look_End zp_firstzombie_ running
[ 73] ZP off music menu 1.0.0 Nordic Warrior zp_music_menu.a running
[ 74] Simple AP Limit 1.0 gogicaa zp_addon_limit_ running
[ 75] [DLC]: Zp Player Stats 2.2.1 Ragamafona ZM_TOP15_Stats_ running
[ 76] MultiJump 1.1 Solo[59rus] multijump.amxx running
[ 77] Block Radio Commands 1.0 d3m37r4 block_radiocmd. running
[ 78] [ReAPI] Block 'Fire in 0.0.1 sergrib block_fireinthe running
[ 79] [ReAPI] Hint blocker 0.1.0 F@tn0M block_hint.amxx running
[ 80] Camera View 0.0.1 ConnorMcLeod talrasha_camera running
[ 81] Speedometer 1.3 AciD & Fintok! aspeedometer.am running
[ 82] Bots Control 1.0 NEO bn_bots_control running
( 71) Load fails: Plugin file open error (plugin "zp_nemskill.amxx")
82 plugins, 81 running
Автор плагина
Gre4a
Версия плагина
1.0
Исходный код
#include <amxmodx>
#include <fakemeta_util>
#include <hamsandwich>
#include <reapi>
#include <zombieplague>

#define INSTANCE(%0) ((%0 == -1) ? 0 : %0)
#define IsCustomWeapon(%0,%1) bool:(get_entvar(%0, var_impulse) == %1)
#define CheckWeapon(%0,%1) bool:(is_nullent(%0) || !IsCustomWeapon(%0,%1))
#define Vector3(%0) Float:%0[3]

#define TimeAnimIdle 4.7
#define TimeAnimDraw 1.0
#define TimeAnimShoot 0.7
#define TimeAnimReloadStart 0.5
#define TimeAnimReloadInsert 0.5
#define TimeAnimReloadEnd 0.8

new const ExtraName[] = "[CSO] UTS-15"; // Название предмета в магазине
const ExtraCost = 35; // Цена покупки

const Float:WeaponDamage = 40.0; // Урон 1 дробинки
new const Float:WeaponSpread[] = {0.0550, 0.0550, 0.0}; // Разброс дроби
const Float:WeaponRate = 0.7; // Темп стрельбы
const WeaponMaxClip = 15; // Патроны в обойме
const WeaponFraction = 8; // Колличество дроби
const WeaponMaxAmmo = 60; // Патроны в запасе

new g_iExtraItem;
new WeaponUnicalIndex;
new const WeaponReference[] = "weapon_m3";
new const WeaponListDir[] = "weapon_uts";
new const WeaponModelPlayer[] = "models/uts15_shop/p_uts15.mdl";
new const WeaponModelView[] = "models/uts15_shop/v_uts15.mdl";
new const WeaponModelWorld[] = "models/uts15_shop/w_uts15.mdl";
new const WeaponSounds[][] = {
"uts15_shop/uts15-1.wav",
"uts15_shop/uts15_draw.wav",
"uts15_shop/uts15_insert.wav",
"uts15_shop/uts15_reload.wav"
}; enum {SoundShotA};
enum {WeaponAnim_Idle, WeaponAnim_Shoot1, WeaponAnim_Shoot2, WeaponAnim_ReloadInsert, WeaponAnim_ReloadEnd, WeaponAnim_ReloadStart, WeaponAnim_Draw};
const ModelWorldBody = 0;
const WeaponShotPenetration = 2;
const WeaponDamageType = (DMG_BULLET | DMG_NEVERGIB);
const Float:WeaponShotDistance = 8192.0;

public plugin_init()
{
register_plugin("UTS-15", "1.0", "protatype");

register_forward(FM_UpdateClientData, "FM_UpdateClientData_Post", true);

RegisterHookChain(RG_CWeaponBox_SetModel, "RG_CWeaponBox_SetModel_Pre", false);

RegisterHam(Ham_Spawn, WeaponReference, "Ham_Spawn_Post", true);
RegisterHam(Ham_Item_Deploy, WeaponReference, "Ham_Item_Deploy_Post", true);
RegisterHam(Ham_Item_Holster, WeaponReference, "Ham_Item_Holster_Post", true);
RegisterHam(Ham_Item_AddToPlayer, WeaponReference, "Ham_Item_AddToPlayer_Post", true);

RegisterHam(Ham_Weapon_Reload, WeaponReference, "Ham_Weapon_Reload_Pre", false);
RegisterHam(Ham_Weapon_WeaponIdle, WeaponReference, "Ham_Weapon_WeaponIdle_Pre", false);
RegisterHam(Ham_Weapon_PrimaryAttack, WeaponReference, "Ham_Weapon_PrimaryAttack_Pre", false);

WeaponUnicalIndex = engfunc(EngFunc_AllocString, WeaponListDir);
g_iExtraItem = zp_register_extra_item(ExtraName, ExtraCost, ZP_TEAM_HUMAN);

register_clcmd(WeaponListDir, "ForceSelect_NewWeapon");
}

public plugin_precache()
{
engfunc(EngFunc_PrecacheModel, WeaponModelPlayer);
engfunc(EngFunc_PrecacheModel, WeaponModelView);
engfunc(EngFunc_PrecacheModel, WeaponModelWorld);

for (new i; i < sizeof WeaponSounds; i++)
engfunc(EngFunc_PrecacheSound, WeaponSounds[i]);

UTIL_PrecacheWeaponList(WeaponListDir);
}

public ForceSelect_NewWeapon(id)
{
engclient_cmd(id, WeaponReference);
return PLUGIN_HANDLED;
}

public zp_extra_item_selected(id, item)
{
if (item != g_iExtraItem)
return;

CPlayer_GiveWeapon(id);
}

public FM_UpdateClientData_Post(const id, const weapon, const handle)
{
if (!is_user_alive(id))
return;

static item; item = get_member(id, m_pActiveItem);
if (CheckWeapon(item, WeaponUnicalIndex))
return;

set_cd(handle, CD_flNextAttack, 2.0);
}

public RG_CWeaponBox_SetModel_Pre(const weaponBox, const model[])
{
new item = UTIL_GetWeaponBoxItem(weaponBox);
if (CheckWeapon(item, WeaponUnicalIndex))
return HC_CONTINUE;

SetHookChainArg(2, ATYPE_STRING, WeaponModelWorld);
set_entvar(weaponBox, var_body, ModelWorldBody);

return HC_CONTINUE;
}

public RG_IsPenetrableEntity_Post(const Vector3(vecStart), Vector3(vecEnd), const id, const pHit)
{
static iPointContents; iPointContents = engfunc(EngFunc_PointContents, vecEnd);
if (iPointContents == CONTENTS_SKY)
return;

if (pHit && is_nullent(pHit) || (get_entvar(pHit, var_flags) & FL_KILLME) || !ExecuteHam(Ham_IsBSPModel, pHit))
return;

UTIL_GunshotDecalTrace(pHit, vecEnd);

if (iPointContents == CONTENTS_WATER)
return;

static Vector3(vecPlaneNormal); global_get(glb_trace_plane_normal, vecPlaneNormal);
xs_vec_mul_scalar(vecPlaneNormal, random_float(25.0, 30.0), vecPlaneNormal);
UTIL_TE_STREAK_SPLASH(MSG_PAS, vecEnd, vecPlaneNormal, 4, random_num(10, 20), 3, 64);
}

public Ham_Spawn_Post(const item)
{
if (CheckWeapon(item, WeaponUnicalIndex))
return;

set_member(item, m_Weapon_iClip, WeaponMaxClip);
set_member(item, m_Weapon_iDefaultAmmo, WeaponMaxAmmo);

rg_set_iteminfo(item, ItemInfo_pszName, WeaponListDir);
rg_set_iteminfo(item, ItemInfo_iMaxClip, WeaponMaxClip);
rg_set_iteminfo(item, ItemInfo_iMaxAmmo1, WeaponMaxAmmo);
}

public Ham_Item_Deploy_Post(const item)
{
if (CheckWeapon(item, WeaponUnicalIndex))
return;

new id = get_member(item, m_pPlayer);

set_entvar(id, var_viewmodel, WeaponModelView);
set_entvar(id, var_weaponmodel, WeaponModelPlayer);

UTIL_SendWeaponAnim(MSG_ONE, id, item, WeaponAnim_Draw);

set_member(item, m_Weapon_flTimeWeaponIdle, TimeAnimDraw);
set_member(id, m_flNextAttack, TimeAnimDraw);
}

public Ham_Item_Holster_Post(const item)
{
if (CheckWeapon(item, WeaponUnicalIndex))
return;

new id = get_member(item, m_pPlayer);

set_member(item, m_Weapon_flTimeWeaponIdle, 1.0);
set_member(item, m_Weapon_fInSpecialReload, 0);
set_member(id, m_flNextAttack, 1.0);
}

public Ham_Item_AddToPlayer_Post(const item)
{
if (CheckWeapon(item, WeaponUnicalIndex))
return;

new id = get_member(item, m_pPlayer);
UTIL_WeaponList(id, item);
}

public Ham_Weapon_Reload_Pre(const item)
{
if (CheckWeapon(item, WeaponUnicalIndex))
return HAM_IGNORED;

static id; id = get_member(item, m_pPlayer);
UTIL_ShotgunReload(id, item, WeaponAnim_ReloadStart, TimeAnimReloadStart, "", WeaponAnim_ReloadInsert, TimeAnimReloadInsert);

return HAM_SUPERCEDE;
}

public Ham_Weapon_WeaponIdle_Pre(const item)
{
if (CheckWeapon(item, WeaponUnicalIndex))
return HAM_IGNORED;

if (Float:get_member(item, m_Weapon_flTimeWeaponIdle) > 0.0)
return HAM_IGNORED;

static id; id = get_member(item, m_pPlayer);
UTIL_ShotgunIdle(id, item, WeaponAnim_Idle, TimeAnimIdle, WeaponAnim_ReloadEnd, TimeAnimReloadEnd);

return HAM_SUPERCEDE;
}

public Ham_Weapon_PrimaryAttack_Pre(const item)
{
if (CheckWeapon(item, WeaponUnicalIndex))
return HAM_IGNORED;

static clip; clip = get_member(item, m_Weapon_iClip);
if (!clip)
{
ExecuteHam(Ham_Weapon_PlayEmptySound, item);
set_member(item, m_Weapon_flNextPrimaryAttack, 0.2);

return HAM_SUPERCEDE;
}

static id; id = get_member(item, m_pPlayer);
Weapon_Fire(item, id, clip, WeaponRate);

new Float: vecPunchAngle[ 3 ]; get_entvar(id, var_punchangle, vecPunchAngle);
vecPunchAngle[ 0 ] -= (get_entvar(id, var_punchangle) & FL_ONGROUND) ? random_float(1.5, 2.5) : random_float(3.5, 5.0);
set_entvar(id, var_punchangle, vecPunchAngle);

set_member(id, m_flNextAttack, WeaponRate);

return HAM_SUPERCEDE;
}

public Weapon_Fire(const item, const id, clip, const Float:fireRate)
{
rg_set_animation(id, PLAYER_ATTACK1);

UTIL_FireBuckshots(id, item, WeaponFraction, WeaponSpread, WeaponShotDistance, WeaponDamage, WeaponDamageType);
UTIL_SendWeaponAnim(MSG_ONE, id, item, WeaponAnim_Shoot1);
rh_emit_sound2(id, 0, CHAN_WEAPON, WeaponSounds[SoundShotA]);

set_member(item, m_Weapon_iClip, --clip);
set_member(item, m_Weapon_fInSpecialReload, 0);
set_member(item, m_Weapon_flTimeWeaponIdle, TimeAnimShoot);
set_member(item, m_Weapon_flNextPrimaryAttack, fireRate);
}

public bool:CPlayer_GiveWeapon(const pPlayer)
{
if (!is_user_alive(pPlayer))
return false;

new pItem = rg_give_custom_item(pPlayer, WeaponReference, GT_DROP_AND_REPLACE, WeaponUnicalIndex);
if (is_nullent(pItem))
return false;

new iAmmoType = get_member(pItem, m_Weapon_iPrimaryAmmoType);
if (get_member(pPlayer, m_rgAmmo, iAmmoType) < WeaponMaxAmmo)
set_member(pPlayer, m_rgAmmo, WeaponMaxAmmo, iAmmoType);

return true;
}

stock UTIL_FireBuckshots(const pPlayer, const pItem, const iShots, const Float: vecSpread[ 3 ] = NULL_VECTOR, const Float: flDistance, const Float: flBaseDamage, const bitsDamageType)
{
if (!iShots)
return;

new Float: vecOrigin[ 3 ]; get_entvar(pPlayer, var_origin, vecOrigin);
new Float: vecViewOfs[ 3 ]; get_entvar(pPlayer, var_view_ofs, vecViewOfs);
xs_vec_add(vecOrigin, vecViewOfs, vecOrigin);

new Float: vecPunchAngle[ 3 ]; get_entvar(pPlayer, var_punchangle, vecPunchAngle);
new Float: vecViewAngle[ 3 ]; get_entvar(pPlayer, var_v_angle, vecViewAngle);
xs_vec_add(vecViewAngle, vecPunchAngle, vecViewAngle);

new Float: vecForward[ 3 ], Float: vecRight[ 3 ], Float: vecUp[ 3 ];
engfunc(EngFunc_AngleVectors, vecViewAngle, vecForward, vecRight, vecUp);

new Float: flXYZ[ 3 ], Float: vecDirection[ 3 ], Float: vecEndPos[ 3 ], Float: vecPlaneNormal[ 3 ];
new pTrace = create_tr2(), pHit, Float: flFraction, Float: flDamage;

rg_multidmg_clear();
for (new iShot = 1; iShot <= iShots; iShot++)
{
do
{
flXYZ[ 0 ] = random_float(-0.5, 0.5) + random_float(-0.5, 0.5);
flXYZ[ 1 ] = random_float(-0.5, 0.5) + random_float(-0.5, 0.5);
flXYZ[ 2 ] = flXYZ[ 0 ] * flXYZ[ 0 ] + flXYZ[ 1 ] * flXYZ[ 1 ];
}
while (flXYZ[ 2 ] > 1.0);

vecDirection[ 0 ] = vecForward[ 0 ] + flXYZ[ 0 ] * vecSpread[ 0 ] * vecRight[ 0 ] + flXYZ[ 1 ] * vecSpread[ 1 ] * vecUp[ 0 ];
vecDirection[ 1 ] = vecForward[ 1 ] + flXYZ[ 0 ] * vecSpread[ 0 ] * vecRight[ 1 ] + flXYZ[ 1 ] * vecSpread[ 1 ] * vecUp[ 1 ];
vecDirection[ 2 ] = vecForward[ 2 ] + flXYZ[ 0 ] * vecSpread[ 0 ] * vecRight[ 2 ] + flXYZ[ 1 ] * vecSpread[ 1 ] * vecUp[ 2 ];

xs_vec_add_scaled(vecOrigin, vecDirection, flDistance, vecEndPos);

engfunc(EngFunc_TraceLine, vecOrigin, vecEndPos, DONT_IGNORE_MONSTERS, pPlayer, pTrace);
get_tr2(pTrace, TR_flFraction, flFraction);

if (flFraction != 1.0)
{
pHit = INSTANCE(get_tr2(pTrace, TR_pHit));
flDamage = ((1.0 - flFraction) * flBaseDamage);

ExecuteHamB(Ham_TraceAttack, pHit, pPlayer, flDamage, vecDirection, pTrace, bitsDamageType);

get_tr2(pTrace, TR_vecEndPos, vecEndPos);

if (engfunc(EngFunc_PointContents, vecEndPos) != CONTENTS_SKY)
{
get_tr2(pTrace, TR_vecPlaneNormal, vecPlaneNormal);
UTIL_HitWallEffects(pHit, vecEndPos, .vecDirection = vecPlaneNormal);
}
}
}
free_tr2(pTrace);
rg_multidmg_apply(pItem, pPlayer);
}

stock UTIL_HitWallEffects(const pEntity, const Float: vecOrigin[ 3 ], const bool: bSparks = true, Float: vecDirection[ 3 ], const iColor = 4)
{
if (pEntity && is_nullent(pEntity) || (get_entvar(pEntity, var_flags) & FL_KILLME) || !ExecuteHam(Ham_IsBSPModel, pEntity))
return;

new iDecalID = UTIL_DamageDecal(pEntity);
if (iDecalID == -1)
return;

UTIL_GunshotDecalTrace(pEntity, vecOrigin);

if (bSparks)
{
xs_vec_mul_scalar(vecDirection, random_float(25.0, 30.0), vecDirection);
UTIL_TE_STREAK_SPLASH(pEntity, vecOrigin, vecDirection, iColor, random_num(10, 20), 3, 64);
}
}

stock UTIL_ShotgunIdle(const pPlayer, const pItem, const iAnimIdle, const Float: flAnimIdleTime, const iAnimReloadEnd, const Float: flAnimReloadEndTime, const szSoundReloadEnd[ ] = "")
{
new iClip = get_member(pItem, m_Weapon_iClip);
new iAmmoType = get_member(pItem, m_Weapon_iPrimaryAmmoType);
new iAmmo = get_member(pPlayer, m_rgAmmo, iAmmoType);
new iSpecialReload = get_member(pItem, m_Weapon_fInSpecialReload);

if (iClip == 0 && iSpecialReload == 0 && iAmmo) ExecuteHamB(Ham_Weapon_Reload, pItem);
else if (iSpecialReload)
{
if (iClip != rg_get_iteminfo(pItem, ItemInfo_iMaxClip) && iAmmo) ExecuteHamB(Ham_Weapon_Reload, pItem);
else
{
UTIL_SendWeaponAnim(MSG_ONE, pPlayer, pItem, iAnimReloadEnd);
if (szSoundReloadEnd[ 0 ]) rh_emit_sound2(pPlayer, 0, CHAN_ITEM, szSoundReloadEnd, .pitch = 85 + random_num(0, 31));

set_member(pItem, m_Weapon_fInSpecialReload, 0);
set_member(pItem, m_Weapon_flTimeWeaponIdle, flAnimReloadEndTime);
}
}
else
{
UTIL_SendWeaponAnim(MSG_ONE, pPlayer, pItem, iAnimIdle);
set_member(pItem, m_Weapon_flTimeWeaponIdle, flAnimIdleTime);
}
}

stock bool:UTIL_ShotgunReload(const pPlayer, const pItem, const iAnimReloadStart, const Float: flReloadStartDelay, const szSoundReloadStart[ ] = "", const iAnimReload, const Float: flReloadDelay, const szSoundReload[ ] = "")
{
new iClip = get_member(pItem, m_Weapon_iClip);
new iAmmoType = get_member(pItem, m_Weapon_iPrimaryAmmoType);
new iAmmo = get_member(pPlayer, m_rgAmmo, iAmmoType);
new iSpecialReload = get_member(pItem, m_Weapon_fInSpecialReload);

if (iAmmo <= 0 || iClip == rg_get_iteminfo(pItem, ItemInfo_iMaxClip) || get_member(pItem, m_Weapon_flNextPrimaryAttack) > 0.0)
return false;

switch (iSpecialReload)
{
case 0:
{
rg_set_animation(pPlayer, PLAYER_RELOAD);
UTIL_SendWeaponAnim(MSG_ONE, pPlayer, pItem, iAnimReloadStart);
if (szSoundReloadStart[ 0 ]) rh_emit_sound2(pPlayer, 0, CHAN_ITEM, szSoundReloadStart, .pitch = 85 + random_num(0, 31));

iSpecialReload = 1;
set_member(pItem, m_Weapon_flNextPrimaryAttack, flReloadStartDelay);
set_member(pItem, m_Weapon_flTimeWeaponIdle, flReloadStartDelay);
set_member(pPlayer, m_flNextAttack, flReloadStartDelay);
}
case 1:
{
if (get_member(pItem, m_Weapon_flTimeWeaponIdle) > 0.0)
return false;

UTIL_SendWeaponAnim(MSG_ONE, pPlayer, pItem, iAnimReload);
if (szSoundReload[ 0 ]) rh_emit_sound2(pPlayer, 0, CHAN_ITEM, szSoundReload, .pitch = 85 + random_num(0, 31));

iSpecialReload = 2;
set_member(pItem, m_Weapon_flTimeWeaponIdle, flReloadDelay);
}
case 2:
{
if (get_member(pItem, m_Weapon_flTimeWeaponIdle) > 0.0)
return false;

iSpecialReload = 1;
set_member(pItem, m_Weapon_iClip, ++iClip);
set_member(pPlayer, m_rgAmmo, --iAmmo, iAmmoType);
}
}
set_member(pItem, m_Weapon_fInSpecialReload, iSpecialReload);

return true;
}

stock UTIL_WeaponList(const pPlayer, const pItem)
{
static iMsgID_Weaponlist; if (!iMsgID_Weaponlist) iMsgID_Weaponlist = get_user_msgid("WeaponList");
new szWeaponName[32]; rg_get_iteminfo(pItem, ItemInfo_pszName, szWeaponName, charsmax(szWeaponName));

message_begin(MSG_ONE, iMsgID_Weaponlist, _, pPlayer);
write_string(szWeaponName);
write_byte(get_member(pItem, m_Weapon_iPrimaryAmmoType));
write_byte(rg_get_iteminfo(pItem, ItemInfo_iMaxAmmo1));
write_byte(get_member(pItem, m_Weapon_iSecondaryAmmoType));
write_byte(rg_get_iteminfo(pItem, ItemInfo_iMaxAmmo2));
write_byte(rg_get_iteminfo(pItem, ItemInfo_iSlot));
write_byte(rg_get_iteminfo(pItem, ItemInfo_iPosition));
write_byte(rg_get_iteminfo(pItem, ItemInfo_iId));
write_byte(rg_get_iteminfo(pItem, ItemInfo_iFlags));
message_end();
}

stock UTIL_SendWeaponAnim(const iDest, const pReceiver, const item, const iAnim)
{
static iBody; iBody = get_entvar(item, var_body);
set_entvar(pReceiver, var_weaponanim, iAnim);

message_begin(iDest, SVC_WEAPONANIM, .player = pReceiver);
write_byte(iAnim);
write_byte(iBody);
message_end();

if (get_entvar(pReceiver, var_iuser1))
return;

static i, iCount, pSpectator, aSpectators[MAX_PLAYERS];
get_players(aSpectators, iCount, "bch");

for (i = 0; i < iCount; i++)
{
pSpectator = aSpectators[i];

if (get_entvar(pSpectator, var_iuser1) != OBS_IN_EYE)
continue;

if (get_entvar(pSpectator, var_iuser2) != pReceiver)
continue;

set_entvar(pSpectator, var_weaponanim, iAnim);

message_begin(iDest, SVC_WEAPONANIM, .player = pSpectator);
write_byte(iAnim);
write_byte(iBody);
message_end();
}
}

stock UTIL_GunshotDecalTrace(const ent, const Vector3(vecOrigin))
{
new iDecalId = UTIL_DamageDecal(ent);
if (iDecalId == -1)
return;

UTIL_TE_GUNSHOTDECAL(MSG_PAS, vecOrigin, ent, iDecalId);
}

stock UTIL_DamageDecal(const ent)
{
new iRenderMode = get_entvar(ent, var_rendermode);
if (iRenderMode == kRenderTransAlpha)
return -1;

static iGlassDecalId; if (!iGlassDecalId) iGlassDecalId = engfunc(EngFunc_DecalIndex, "{bproof1");
if (iRenderMode != kRenderNormal)
return iGlassDecalId;

static iShotDecalId; if (!iShotDecalId) iShotDecalId = engfunc(EngFunc_DecalIndex, "{shot1");
return (iShotDecalId - random_num(0, 4));
}

stock UTIL_TE_GUNSHOTDECAL(const iDest, const Vector3(vecOrigin), const ent, const iDecalId)
{
message_begin_f(iDest, SVC_TEMPENTITY, vecOrigin);
write_byte(TE_GUNSHOTDECAL);
write_coord_f(vecOrigin[0]);
write_coord_f(vecOrigin[1]);
write_coord_f(vecOrigin[2]);
write_short(ent);
write_byte(iDecalId);
message_end();
}

stock UTIL_PrecacheWeaponList(const szWeaponList[])
{
new szBuffer[128], pFile;

format(szBuffer, charsmax(szBuffer), "sprites/%s.txt", szWeaponList);
engfunc(EngFunc_PrecacheGeneric, szBuffer);

if (!(pFile = fopen(szBuffer, "rb")))
return;

new szSprName[64], iPos;
while (!feof(pFile))
{
fgets(pFile, szBuffer, charsmax(szBuffer));
trim(szBuffer);

if (!strlen(szBuffer))
continue;

if ((iPos = containi(szBuffer, "640")) == -1)
continue;

format(szBuffer, charsmax(szBuffer), "%s", szBuffer[iPos + 3]);
trim(szBuffer);

strtok(szBuffer, szSprName, charsmax(szSprName), szBuffer, charsmax(szBuffer), ' ', 1);
trim(szSprName);

engfunc(EngFunc_PrecacheGeneric, fmt("sprites/%s.spr", szSprName));
}

fclose(pFile);
}

stock UTIL_TE_STREAK_SPLASH(const iDest, const Vector3(vecOrigin), const Vector3(vecDirection), const iColor, const iCount, const iSpeed, const iNoise)
{
message_begin_f(iDest, SVC_TEMPENTITY, vecOrigin);
write_byte(TE_STREAK_SPLASH);
write_coord_f(vecOrigin[0]);
write_coord_f(vecOrigin[1]);
write_coord_f(vecOrigin[2]);
write_coord_f(vecDirection[0]);
write_coord_f(vecDirection[1]);
write_coord_f(vecDirection[2]);
write_byte(iColor);
write_short(iCount);
write_short(iSpeed);
write_short(iNoise);
message_end();
}

stock UTIL_GetWeaponBoxItem(const pWeaponBox)
{
for (new iSlot, item; iSlot < MAX_ITEM_TYPES; iSlot++)
{
if (!is_nullent((item = get_member(pWeaponBox, m_WeaponBox_rgpPlayerItems, iSlot))))
return item;
}
return NULLENT;
}
Всем привет. Ситуация такая. В любой момент использовав UTS-15 сервер может крашнутся с ошибкой
Код:
PF_WriteString_I: called with no active message
В моем случае, получилось вызвать падение в 3 случаях. Когда я просто взял в руки оружие (приложил видео), когда по такому же сценарию как и на видео начал стрелять в зомби и когда стреляю в стекло (моментальный краш, на скрине о каком стекле идет речь)



1693089844317.png

Просьба знающим людям пофиксить данную проблему, если там все более глобально, готов оплатить за работу. Спасибо!


UPD: На видео оказывается тоже проблема со стеклом и получается скорее всего проблема только со стеклом и есть, стреляв по зомби я мог также задеть стекло прицелом
 
В этой теме было размещено решение! Перейти к решению.
Последнее редактирование:
Сообщения
345
Реакции
77
Помог
14 раз(а)
Так же краш вызывается при стрельбе в эту текстуру

1693113346066.png

1693113385150.png
 
Сообщения
458
Реакции
263
Помог
9 раз(а)
KOLOKOLb4UK, я не эксперт конешно, но попробую закомментировать везде использование UTIL_GunshotDecalTrace
Либо
UTIL_DamageDecal
 
Сообщения
3,582
Реакции
1,569
Помог
137 раз(а)
Попробуй так:
Код:
    if (bSparks)
    {
        xs_vec_mul_scalar(vecDirection, random_float(25.0, 30.0), vecDirection);
-       UTIL_TE_STREAK_SPLASH(pEntity, vecOrigin, vecDirection, iColor, random_num(10, 20), 3, 64);
+       UTIL_TE_STREAK_SPLASH(MSG_ALL, vecOrigin, vecDirection, iColor, random_num(10, 20), 3, 64);
    }
 
Статус
В этой теме нельзя размещать новые ответы.

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

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