- Ошибка
-
ошибок нет
- ОС
- Linux
- Билд
-
ReHLDS version: 3.4.0.633-dev
- ReGamedll
-
ReGameDLL version: 5.5.0.290-dev
- Список метамодулей
-
[ 1] SafeNameAndChat RUN - SafeNameAndChat. v1.1 ini ANY ANY
[ 2] Reunion RUN - reunion_mm_i386. v0.1.0.8 ini Start Never
[ 3] AMX Mod X RUN - amxmodx_mm_i386. v1.8.3-d ini Start ANY
[ 4] Rechecker RUN - rechecker_mm_i38 v2.5 ini Chlvl ANY
[ 5] WHBlocker RUN - whblocker_mm_i38 v1.5.695 ini Chlvl ANY
[ 6] VoiceTranscoder RUN - VoiceTranscoder. v2017RC3 ini ANY ANY
[ 7] ReAuthCheck RUN - reauthcheck_mm_i v0.1.6 ini Start Never
[ 8] MySQL RUN - mysql_amxx_i386. v1.8.3-d pl3 ANY ANY
[ 9] SQLite RUN - sqlite_amxx_i386 v1.8.3-d pl3 ANY ANY
[10] Fun RUN - fun_amxx_i386.so v1.8.3-d pl3 ANY ANY
[11] Engine RUN - engine_amxx_i386 v1.8.3-d pl3 ANY ANY
[12] FakeMeta RUN - fakemeta_amxx_i3 v1.8.3-d pl3 ANY ANY
[13] CStrike RUN - cstrike_amxx_i38 v1.8.2 pl3 ANY ANY
[14] CSX RUN - csx_amxx_i386.so v1.8.2 pl3 ANY ANY
[15] Ham Sandwich RUN - hamsandwich_amxx v1.8.3-d pl3 ANY ANY
[16] ReAPI RUN - reapi_amxx_i386. v5.5.0.1 pl3 ANY Never
[17] ReAimDetector RUN - reaimdetector_am v0.2.1 pl3 ANY Never
- Список плагинов
-
[ 1] DopBan 3.0.3b kanagava dop_ban.amxx running
[ 2] FreshBans 1.3.8b kanagava fresh_bans.amxx running
[ 3] Admin Base 1.8.3-dev+ AMXX Dev Team admin.amxx running
[ 4] Admin Commands 1.8.3-dev+ AMXX Dev Team admincmd.amxx running
[ 5] Anti Flood 1.8.3-dev+ AMXX Dev Team antiflood.amxx running
[ 6] Admin Chat 1.8.3-dev+ AMXX Dev Team adminchat.amxx running
[ 7] Commands Menu 1.8.3-dev+ AMXX Dev Team cmdmenu.amxx running
[ 8] Maps Menu 1.4.1 neugomon mapsmenu.amxx running
[ 9] Menus Front-End 1.5 neugomon menufront.amxx running
[ 10] Players Menu 1.7 neugomon plmenu.amxx running
[ 11] ReAimDetector API 0.2.1 ReHLDS Team reaimdetector.a running
[ 12] Map Manager 2.5.61 Mistrick mapmanager.amxx running
[ 13] Map Manager: Sub Plugi 0.1 Mistrick mapmanager_subp running
[ 14] RC BaseChanger freesrv custom rc_basechanger. stopped
[ 15] ReChecker Logging freesrv custom rc_logging.amxx running
[ 16] Chat Manager 1.1.1-11 Mistrick chatmanager.amx running
[ 17] Chat Manager: Addon 0.0.4-70 Mistrick chatmanager_add running
[ 18] Ultimate Chats Control 3.7 neygomon ucc.amxx running
[ 19] Flying Armourys 0.0.2 Vaqtincha FlyingArmourys. running
[ 20] CSSB War3FT MOD Privat 6.7 SMaster cssbWar3ftMod.a running
- Исходный код
-
// Copyright © 2017 Vaqtincha
/**■■■■■■■■■■■■■■■■■■■■■■■■■■■■ CONFIG START ■■■■■■■■■■■■■■■■■■■■■■■■■■■■*/
#define RANDOM_GLOW_SHELL
#define ROTATE_SPEED 10
#define FLY_UP 4
#define UPDATE_DELAY 2.0
#define ADD_Z_POS 30
/**■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ CONFIG END ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■*/
enum coord_e { Float:X, Float:Y, Float:Z }
new const Float:g_vecColors[][3] =
{
{0.0, 127.0, 255.0}, // blue
{0.0, 255.0, 127.0}, // green
{255.0, 0.0, 0.0}, // red
{255.0, 127.0, 0.0}, // orange
{127.0, 0.0, 255.0}, // purple
{255.0, 100.0, 150.0}, // pink
{255.0, 255.0, 255.0}, // white
{255.0, 155.0, 55.0}, //
{0.0, 255.0, 255.0}, //
{0.0, 255.0, 0.0}, //
{0.0, 0.0, 100.0} //
}
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#if ROTATE_SPEED < 1
#error the minimum value of "ROTATE_SPEED" shall not be less than 1
#endif
#if ROTATE_SPEED > 100
#error the maximum value of the "ROTATE_SPEED" can not be more than 100
#endif
#define SET_ORIGIN(%1,%2) engfunc(EngFunc_SetOrigin, %1, %2)
public plugin_init()
{
register_plugin("Flying Armourys", "0.0.2", "Vaqtincha")
RegisterHam(Ham_CS_Restart, "armoury_entity", "CArmoury_Restart", .Post = true)
RegisterHam(Ham_Think, "armoury_entity", "CArmoury_Think", .Post = true)
new pArmoury = FM_NULLENT
while((pArmoury = engfunc(EngFunc_FindEntityByString, pArmoury, "classname", "armoury_entity")))
{
set_pev(pArmoury, pev_movetype, MOVETYPE_NOCLIP)
ExecuteHamB(Ham_CS_Restart, pArmoury)
}
}
public CArmoury_Think(const pArmoury)
{
if(pArmoury <= 0)
return
if(pev(pArmoury, pev_effects) & EF_NODRAW)
return
// from https://github.com/s1lentq/ReGameDLL_CS/blob/major-patch/regamedll/dlls/addons/item_airbox.cpp
static Float:vecVelocity[coord_e], Float:fFlyUp
pev(pArmoury, pev_maxspeed, fFlyUp)
vecVelocity[Z] = fFlyUp
set_pev(pArmoury, pev_velocity, vecVelocity)
set_pev(pArmoury, pev_maxspeed, -fFlyUp)
set_pev(pArmoury, pev_nextthink, get_gametime() + UPDATE_DELAY)
}
public CArmoury_Restart(const pArmoury)
{
if(pArmoury <= 0)
return
new Float:vecOrigin[coord_e], Float:vecAngles[coord_e], Float:vecAvelocity[coord_e]
pev(pArmoury, pev_origin, vecOrigin)
vecOrigin[Z] += ADD_Z_POS.0
SET_ORIGIN(pArmoury, vecOrigin)
vecAngles[X] -= 90.0
vecAngles[Y] += random_float(-180.0, 180.0)
set_pev(pArmoury, pev_angles, vecAngles)
vecAvelocity[Z] = ROTATE_SPEED.0 * 10.0
set_pev(pArmoury, pev_avelocity, vecAvelocity)
set_pev(pArmoury, pev_maxspeed, FLY_UP.0)
#if defined RANDOM_GLOW_SHELL
// new Float:vecColor[3]
// vecColor[0] = random_float(10.0, 200.0) + 55.0
// vecColor[1] = random_float(10.0, 200.0) + 55.0
// vecColor[2] = random_float(10.0, 200.0) + 55.0
// set_rendering(pArmoury, kRenderFxGlowShell, vecColor, 20.0)
set_rendering(pArmoury, kRenderFxGlowShell, g_vecColors[random(sizeof(g_vecColors))], 15.0)
#endif
set_pev(pArmoury, pev_nextthink, get_gametime() + UPDATE_DELAY)
}
stock set_rendering(index, fx = kRenderFxNone, Float:color[3] = {255.0, 255.0, 255.0}, Float:amount = 16.0)
{
set_pev(index, pev_renderfx, fx)
set_pev(index, pev_rendercolor, color)
set_pev(index, pev_renderamt, amount)
}
Не работает плагин Flying Armourys 0.0.2, ошибок нет.
В этой теме было размещено решение! Перейти к решению.