Проблема с SOLID_BSP

Статус
В этой теме нельзя размещать новые ответы.
Сообщения
19
Реакции
-3
Помог
3 раз(а)
Ошибка
Ошибок нету
ОС
Linux
Amx Mod X
AMX Mod X 1.8.3-dev+5175
Билд
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.4.0.654-dev
Build date: 12:09:21 May 22 2018 (1501)
Build from: https://github.com/dreamstalker/rehlds/commit/65c6ce5
ReGamedll
ReGameDLL version: 5.7.0.312-dev
Build date: 07:53:34 May 31 2018
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/26db32e
Версия 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)
Список метамодулей
[ 1] Reunion          RUN   -    reunion_mm_i386.  v0.1.0.9  ini   Start Never
[ 2] Rechecker RUN - rechecker_mm_i38 v2.5 ini Chlvl ANY
[ 3] AMX Mod X RUN - amxmodx_mm_i386. v1.8.3-d ini Start ANY
[ 4] ReAuthCheck RUN - reauthcheck_mm_i v0.1.6 ini Start Never
[ 5] VoiceTranscoder RUN - VoiceTranscoder. v2017RC3 ini ANY ANY
[ 6] ReSRDetector RUN - resrdetector_mm_ v0.1.0 ini Chlvl ANY
[ 7] SafeNameAndChat RUN - SafeNameAndChat. v1.1 ini ANY ANY
[ 8] ReAPI RUN - reapi_amxx_i386. v5.6.0.1 pl3 ANY Never
[ 9] MySQL RUN - mysql_amxx_i386. v1.8.3-d pl3 ANY ANY
[10] CStrike RUN - cstrike_amxx_i38 v1.8.3-d pl3 ANY ANY
[11] Fun RUN - fun_amxx_i386.so v1.8.3-d pl3 ANY ANY
[12] Ham Sandwich RUN - hamsandwich_amxx v1.8.3-d pl3 ANY ANY
[13] FakeMeta RUN - fakemeta_amxx_i3 v1.8.3-d pl3 ANY ANY
[14] Engine RUN - engine_amxx_i386 v1.8.3-d pl3 ANY ANY
[15] CSX RUN - csx_amxx_i386.so v1.8.3-R pl3 ANY ANY
15 plugins, 15 running
Список плагинов
[  1] Admin Loader            3.5         neygomon          admin_loader.am  running  
[ 2] AdminMod 1.0 AMXX Dev Team & admincmd.amxx running
[ 3] Base Builder 6.5 Tirant basebuilder65.a running
[ 4] Block Menu 1.0 Lonkura bb_admin_menu.a running
[ 5] [BB] Default Zombie Cl 6.5 Tirant bb_classes65.am running
[ 6] Chat Manager 1.1.1-11 Mistrick chatmanager.amx running
[ 7] CSX Easy Stats 1.5 neugomon csx_easy_stats. running
[ 8] Napalm Nades 1.1 MeRcyLeZZ fire_gr.amxx running
[ 9] Hook 1.0 Lonkura Hook.amxx running
[ 10] FrostNades 2.14 Avalanche ice_gr.amxx running
[ 11] [ZP] LaserMine 2.8.2 SandStriker / Sh lasermine.amxx running
[ 12] Lite Bans 2.2 neygomon lite_bans_off.a running
[ 13] Lotery 0.1 Forze Lotery.amxx running
[ 14] Map Manager 2.5.61 Mistrick mapmanager.amxx running
[ 15] Maps Menu 1.8.3-Re AMXX Dev Team mapsmenu.amxx running
[ 16] Menu 1.0 Lonkura Menu.amxx running
[ 17] Menus Front-End 1.8.3-Re AMXX Dev Team menufront.amxx running
[ 18] [AMXX] Money System 1.0 t3rkecorejz MoneySys.amxx running
[ 19] Parachute 1.3 KRoT@L/JTP10181 Parachute.amxx running
[ 20] Tutor API Alpha [WPMG]PRoSToTeM@ TutorAPI.amxx running
[ 21] Tutor 1.0 Lonkura Tutor.amxx running
21 plugins, 21 running
Автор плагина
Tirant
Версия плагина
6.5
Исходный код
public cmdGrabEnt(id)
{
if (g_fBuildDelay[id] + BUILD_DELAY > get_gametime())
{
g_fBuildDelay[id] = get_gametime()
client_print (id, print_center, "%L", LANG_SERVER, "BUILD_SPAM")
return PLUGIN_HANDLED
}
else
g_fBuildDelay[id] = get_gametime()

if (g_isBuildBan[id])
{
client_print (id, print_center, "%L", LANG_SERVER, "BUILD_BANNED")
client_cmd(id, "spk %s", LOCK_FAIL);
return PLUGIN_HANDLED;
}

if (g_isZombie[id] && !access(id, FLAGS_OVERRIDE))
return PLUGIN_HANDLED

if (!g_boolCanBuild && !access(id, FLAGS_BUILD) && !access(id, FLAGS_OVERRIDE))
{
client_print (id, print_center, "%L", LANG_SERVER, "BUILD_NOTIME")
return PLUGIN_HANDLED
}

if (g_iOwnedEnt[id] && is_valid_ent(g_iOwnedEnt[id]))
cmdStopEnt(id)

new ent, bodypart
get_user_aiming (id,ent,bodypart)

if (!is_valid_ent(ent) || ent == g_iEntBarrier || is_user_alive(ent) || IsMovingEnt(ent))
return PLUGIN_HANDLED;

if ((BlockLocker(ent) && BlockLocker(ent) != id) || (BlockLocker(ent) && !access(id, FLAGS_OVERRIDE)))
return PLUGIN_HANDLED;

new szClass[10], szTarget[7];
entity_get_string(ent, EV_SZ_classname, szClass, 9);
entity_get_string(ent, EV_SZ_targetname, szTarget, 6);
if (!equal(szClass, "func_wall") || equal(szTarget, "ignore"))
return PLUGIN_HANDLED;


ExecuteForward(g_fwGrabEnt_Pre, g_fwDummyResult, id, ent);

new Float:fOrigin[3], iAiming[3], Float:fAiming[3]

get_user_origin(id, iAiming, 3);
IVecFVec(iAiming, fAiming);
entity_get_vector(ent, EV_VEC_origin, fOrigin);

g_fOffset1[id] = fOrigin[0] - fAiming[0];
g_fOffset2[id] = fOrigin[1] - fAiming[1];
g_fOffset3[id] = fOrigin[2] - fAiming[2];

g_fEntDist[id] = get_user_aiming(id, ent, bodypart);

if (g_fEntMinDist)
{
if (g_fEntDist[id] < g_fEntMinDist)
g_fEntDist[id] = g_fEntSetDist;
}
else if (g_fEntMaxDist)
{
if (g_fEntDist[id] > g_fEntMaxDist)
return PLUGIN_HANDLED
}

set_pev(ent, pev_solid, SOLID_NOT)
set_pev(ent,pev_rendermode,kRenderTransColor)
set_pev(ent,pev_rendercolor, g_fColor[g_iColor[id]] )
set_pev(ent,pev_renderamt, g_fRenderAmt[g_iColor[id]] )

MovingEnt(ent);
SetEntMover(ent, id);
g_iOwnedEnt[id] = ent

//Checked after object is successfully grabbed
if (!g_boolCanBuild && (access(id, FLAGS_BUILD) || access(id, FLAGS_OVERRIDE)))
{
new adminauthid[32],adminname[32]
get_user_authid (id,adminauthid,31)
get_user_name(id,adminname,31)
Log("[MOVE] Admin: %s || SteamID: %s moved an entity", adminname, adminauthid)
}

client_cmd(id, "spk %s", GRAB_START);

ExecuteForward(g_fwGrabEnt_Post, g_fwDummyResult, id, ent);

return PLUGIN_HANDLED
}

public cmdStopEnt(id)
{
if (!g_iOwnedEnt[id])
return PLUGIN_HANDLED;

new ent = g_iOwnedEnt[id]

ExecuteForward(g_fwDropEnt_Pre, g_fwDummyResult, id, ent);

set_pev(ent, pev_solid, SOLID_BSP)

if (BlockLocker(ent))
{
switch(g_iLockBlocks)
{
case 0:
{
set_pev(ent,pev_rendermode,kRenderTransColor)
set_pev(ent,pev_rendercolor, Float:{ LOCKED_COLOR })
set_pev(ent,pev_renderamt,Float:{ LOCKED_RENDERAMT })
}
case 1:
{
set_pev(ent,pev_rendermode,kRenderTransColor)
set_pev(ent,pev_rendercolor, g_fColor[g_iColor[id]])
set_pev(ent,pev_renderamt,Float:{ LOCKED_RENDERAMT })
}
}
}
else
set_pev(ent,pev_rendermode,kRenderNormal)

UnsetEntMover(ent);
SetLastMover(ent,id);
g_iOwnedEnt[id] = 0;
UnmovingEnt(ent);

client_cmd(id, "spk %s", GRAB_STOP);

ExecuteForward(g_fwDropEnt_Post, g_fwDummyResult, id, ent);

return PLUGIN_HANDLED;
}
Блок берется отлично, но когда вызывается cmdGrabStop, то блок не стает материальным
 
В этой теме было размещено решение! Перейти к решению.
Сообщения
2,752
Реакции
3,017
Помог
61 раз(а)
Не вижу полного кода. Гадать - нет и времени.
 
Сообщения
19
Реакции
-3
Помог
3 раз(а)
Излишнее форматирование
wopox1337,
Код:
#include <amxmodx>
#include <basebuilder>
#include <fakemeta>

public plugin_init()
{
register_plugin("SolidBlocks", "1.0", "Lonkura")
}
public bb_grab_post(id, ent)
{
set_pev(ent, pev_solid, SOLID_NOT)
}

public bb_drop_post(id, ent)
{
set_pev(ent, pev_solid, SOLID_BSP)
}
Пробовал так, результат такой же
21 Авг 2018
Решение:
Код:
set_pev(ent, pev_solid, SOLID_BSP)
Заменить на:
Код:
new Float:origin[3];
pev(ent, pev_origin, origin);
set_pev(ent, pev_solid, SOLID_BSP)
engfunc(EngFunc_SetOrigin, ent, origin);
 
Статус
В этой теме нельзя размещать новые ответы.

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

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