- Ошибка
-
AMXX Compiler Bot, [28.08.19 23:29]
?ftm_longjump.amxx
AMX Mod X Compiler 1.9.0.5249
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2013 AMX Mod X Team
file_1271.sma(4) : fatal error 100: cannot read from file: "ftmod"
Compilation aborted.
1 Error.
Done.
AMXX Compiler Bot, [28.08.19 23:33]
?ftm_ticket.amxx
AMX Mod X Compiler 1.9.0.5249
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2013 AMX Mod X Team
file_1273.sma(3) : fatal error 100: cannot read from file: "ftmod"
Compilation aborted.
1 Error.
Done.
- Компилятор
- WEB-компилятор
- Amx Mod X
- 1.9.0
- Исходный код
-
Первый плагин ftm_longjump.sma
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <ftmod>
#include <reapi>
#define PLAYER_SUPERJUMP 7
#define ACT_LEAP 8
new bool:g_bHasLJ[MAX_CLIENTS + 1];
new bool:g_bSuperJump[MAX_CLIENTS + 1];
new g_ClientLJ[MAX_CLIENTS + 1];
public plugin_precache()
{
precache_model("models/p_longjump.mdl");
}
public plugin_init()
{
register_plugin("[FTM] LongJump Enabler", "1.0", "ConnorMcLeod/KORD_12.7/serfreeman1337");
RegisterHam(Ham_Player_Jump, "player", "CBasePlayer__Jump");
RegisterHam(Ham_Player_Duck, "player", "CBasePlayer__Duck");
RegisterHam(Ham_Killed, "player", "CBasePlayer__Killed", 1);
register_event("ItemPickup", "CBasePlayerItem__AddToPlayer", "b", "1&item_longjump", 1);
}
public client_disconnected(id)
{
if(is_user_bot(id) || is_user_hltv(id))
return;
new pEnt = g_ClientLJ[id];
if(pev_valid(pEnt))
{
set_pev(pEnt, pev_aiment, id);
set_pev(pEnt, pev_rendermode, kRenderTransAlpha);
}
g_bSuperJump[id] = false;
g_bHasLJ[id] = false;
}
public client_putinserver(id)
{
if(is_user_bot(id) || is_user_hltv(id))
return;
new pEnt = g_ClientLJ[id];
if(pev_valid(pEnt))
set_pev(pEnt, pev_rendermode, kRenderTransAlpha);
g_bSuperJump[id] = false;
g_bHasLJ[id] = false;
}
/*
* for FrozenTag Mod
*/
//public ftm_round_end(RoundControlWin:iTeamWin)
//{
// arrayset(g_bHasLJ, 0, 33);
//}
public ftm_client_unfrozen_post(id, rescued)
{
new pEnt = g_ClientLJ[id];
if (g_bHasLJ[id] && pev_valid(pEnt))
{
set_pev(pEnt, pev_aiment, id);
set_pev(pEnt, pev_rendermode, kRenderNormal);
set_member(id, m_fLongJump, 1);
UTIL__UpdateIconLJ(id, 1, {255, 127, 0});
}
}
public ftm_client_frozen_stuff(id, pCube, pBody, pView)
{
new pEnt = g_ClientLJ[id];
if (g_bHasLJ[id] && pev_valid(pEnt))
{
set_pev(pEnt, pev_rendermode, kRenderTransAlpha);
//set_pev(pEnt, pev_aiment, pBody);
}
}
public CBasePlayer__Killed(const victim, const killer, const shouldgib)
{
if(!is_user_connected(victim))
return;
new pEnt = g_ClientLJ[victim];
if(pev_valid(pEnt))
{
UTIL__UpdateIconLJ(victim);
if (!ftm_get_frozen(victim))
set_pev(pEnt, pev_rendermode, kRenderTransAlpha);
}
}
public CBasePlayerItem__AddToPlayer(const id)
{
if(pev_valid(id) != 2 || !get_member(id, m_fLongJump))
return;
new pEnt = g_ClientLJ[id];
if(pev_valid(pEnt))
set_entvar(pEnt, var_rendermode, kRenderNormal);
else
{
static iszAllocInfoTarget = 0;
if (iszAllocInfoTarget || (iszAllocInfoTarget = engfunc(EngFunc_AllocString, "info_target")))
{
pEnt = engfunc(EngFunc_CreateNamedEntity, iszAllocInfoTarget);
if(pEnt)
{
set_pev(pEnt, pev_classname, "p_longjump");
set_pev(pEnt, pev_movetype, MOVETYPE_FOLLOW);
set_pev(pEnt, pev_aiment, id);
engfunc(EngFunc_SetModel, pEnt, "models/p_longjump.mdl");
}
g_ClientLJ[id] = pEnt;
}
}
g_bHasLJ[id] = true;
UTIL__UpdateIconLJ(id, 1, {255, 127, 0});
}
public CBasePlayer__Duck(const id)
{
if(g_bSuperJump[id])
{
g_bSuperJump[id] = false;
return HAM_SUPERCEDE;
}
return HAM_IGNORED;
}
public CBasePlayer__Jump(const id)
{
if(ftm_get_frozen(id) || !is_user_alive(id))
return HAM_IGNORED;
new iFlags = pev(id, pev_flags);
if((iFlags & FL_WATERJUMP) || pev(id, pev_waterlevel) >= 2)
{
return HAM_IGNORED;
}
new afButtonPressed = get_member(id, m_afButtonPressed);
if(!(afButtonPressed & IN_JUMP) || !(iFlags & FL_ONGROUND))
{
return HAM_IGNORED;
}
new Float:fVecTemp[3];
if((pev(id, pev_bInDuck) || iFlags & FL_DUCKING) && get_member(id, m_fLongJump) && pev(id, pev_button) & IN_DUCK && pev(id, pev_flDuckTime))
{
pev(id, pev_velocity, fVecTemp);
if(vector_length(fVecTemp) > 50.0)
{
pev(id, pev_punchangle, fVecTemp);
fVecTemp[0] = -5.0;
set_pev(id, pev_punchangle, fVecTemp);
global_get(glb_v_forward, fVecTemp);
fVecTemp[0] *= 560.0;
fVecTemp[1] *= 560.0;
fVecTemp[2] = 299.33259094191531084669989858532;
set_pev(id, pev_velocity, fVecTemp);
set_member(id, m_Activity, ACT_LEAP);
set_member(id, m_IdealActivity, ACT_LEAP);
set_pev(id, pev_oldbuttons, pev(id, pev_oldbuttons) | IN_JUMP);
set_pev(id, pev_gaitsequence, PLAYER_SUPERJUMP);
set_pev(id, pev_frame, 0.0);
set_member(id, m_afButtonPressed, afButtonPressed & ~IN_JUMP);
g_bSuperJump[id] = true;
return HAM_SUPERCEDE;
}
}
return HAM_IGNORED;
}
stock UTIL__UpdateIconLJ(const id, const bShow = 0, const iPal[] = {0,0,0})
{
static __msgidStatusIcon = 0;
if (__msgidStatusIcon || (__msgidStatusIcon = get_user_msgid("StatusIcon")))
{
message_begin(MSG_ONE_UNRELIABLE, __msgidStatusIcon, _, id);
write_byte(bShow);
write_string("item_longjump");
write_byte(iPal[0]);
write_byte(iPal[1]);
write_byte(iPal[2]);
message_end();
}
}
Второй плагин ftm_ticket.sma
#include <amxmodx>
#include <engine>
#include <ftmod>
#include <reapi>
#if (AMXX_VERSION_NUM < 183) || defined NO_NATIVE_COLORCHAT
#include <dhudmessage>
#endif
#pragma ctrlchar '\'
#pragma semicolon 1
#define MAX_CLIENTS 32
#define TICKET_NUM 1 // Количество размораживания на команду за раунд
#define NEXT_TIME_MESSAGE 3.0 // Задержка
enum
{
STATUS_ICON_HIDE = 0,
STATUS_ICON_SHOW,
STATUS_ICON_FLASH
};
enum _:Sprite_Last
{
Sprite_None,
Sprite_Over,
Sprite_Num
};
enum _:Sprite_Properity
{
Sprite_Name[ 10 ],
Sprite_Color[ 3 ]
};
new Sprite_Data[][ Sprite_Properity ] =
{
{ "number_0", { 0xC8, 0x32, 0x00 } },
{ "number_1", { 0xFF, 0x64, 0x32 } },
{ "number_2", { 0xFF, 0x8C, 0x00 } },
{ "number_3", { 0xC8, 0xC8, 0x00 } },
{ "number_4", { 0xFF, 0xFF, 0x64 } },
{ "number_5", { 0xFF, 0xFF, 0x96 } },
{ "number_6", { 0xCD, 0xAA, 0x50 } },
{ "number_7", { 0xD2, 0xB4, 0x64 } },
{ "number_8", { 0xB4, 0xD2, 0x69 } },
{ "number_9", { 0xC8, 0xDC, 0x8C } }
};
new const TICKET_SPRITE_OVER[] = "dmg_cold"; // Какую иконку отобразить, заместо количества оставшиеся респаунов больше 9 (По умолчанию: снежок)
new const MODEL_DEATH[] = "models/ftmod/ticket/death1.mdl";
new g_iTeamIndex[ MAX_CLIENTS + 1],
g_iSpriteEnt[ MAX_CLIENTS + 1],
g_iLastIcon[ MAX_CLIENTS + 1];
new g_iTicketNum[ 4 ],
g_iMaxPlayers,
g_iStatusIcon;
public plugin_precache()
{
precache_model(MODEL_DEATH);
}
public plugin_init()
{
register_plugin
(
"[FTMod] Addon: Ticket",
"1.1",
"s1lent"
);
register_event("ResetHUD", "Event_ResetHUD", "be");
g_iMaxPlayers = get_maxplayers();
g_iStatusIcon = get_user_msgid("StatusIcon");
register_dictionary("ftmod_ticket.txt");
}
public client_disconnected(id)
{
if (is_user_bot(id) || is_user_hltv(id))
return;
UTIL__MakingDeath(id);
g_iTeamIndex[ id ] = 0;
g_iLastIcon[ id ] = 0;
if (is_valid_ent(g_iSpriteEnt[ id ]))
{
remove_entity(g_iSpriteEnt[ id ]);
g_iSpriteEnt[ id ] = 0;
}
}
public ftm_client_target(id, target, time)
{
static Float:__flNextMessage[ MAX_CLIENTS + 1] = { 0.0, ... };
new iTicketNum = g_iTicketNum[ g_iTeamIndex[ id ] ];
if (iTicketNum > 0)
{
return PLUGIN_CONTINUE;
}
new Float:flCurrentTime = get_gametime();
if (flCurrentTime > __flNextMessage[ id ])
{
__flNextMessage[ id ] = flCurrentTime + NEXT_TIME_MESSAGE;
set_dhudmessage(25, 255, 25, -1.0, 0.65, 2, 0.25, 2.0, 0.01, 0.5);
show_dhudmessage(id, "%L", LANG_PLAYER, "FTM_TICKET_UNFREEZE");
}
return PLUGIN_HANDLED;
}
public ftm_round_new()
{
arrayset(g_iLastIcon, TICKET_NUM, MAX_CLIENTS + 1);
arrayset(g_iTicketNum, TICKET_NUM, 4);
}
public Event_ResetHUD(const id)
{
new iTicketNum = g_iTicketNum[ g_iTeamIndex[ id ] ];
if (iTicketNum < 0)
iTicketNum = 0;
if (g_iLastIcon[ id ] != iTicketNum && iTicketNum != TICKET_NUM)
{
message_begin(MSG_ONE_UNRELIABLE, g_iStatusIcon, _, id);
write_byte(STATUS_ICON_HIDE);
if (iTicketNum >= sizeof(Sprite_Data) - 1)
write_string(TICKET_SPRITE_OVER);
else
write_string(Sprite_Data[ iTicketNum + 1 ][ Sprite_Name ]);
message_end();
}
g_iLastIcon[ id ] = iTicketNum;
if (iTicketNum > sizeof(Sprite_Data) - 1)
{
message_begin(MSG_ONE_UNRELIABLE, g_iStatusIcon, _, id);
write_byte(STATUS_ICON_SHOW);
write_string(TICKET_SPRITE_OVER);
if (g_iTeamIndex[ id ] == 2)
{
write_byte(50);
write_byte(170);
write_byte(255);
}
else
{
write_byte(255);
write_byte(40);
write_byte(40);
}
message_end();
}
else
{
message_begin(MSG_ONE_UNRELIABLE, g_iStatusIcon, _, id);
write_byte(STATUS_ICON_SHOW);
write_string(Sprite_Data[ iTicketNum ][ Sprite_Name ]);
write_byte(Sprite_Data[ iTicketNum ][ Sprite_Color ][ 0 ]);
write_byte(Sprite_Data[ iTicketNum ][ Sprite_Color ][ 1 ]);
write_byte(Sprite_Data[ iTicketNum ][ Sprite_Color ][ 2 ]);
message_end();
}
}
public ftm_client_frozen_stuff(id, pCube, pBody, pView)
{
if (g_iTicketNum[ g_iTeamIndex[ id ] ] < 1)
{
ftm_set_spawnlock(id, true);//block next spawning
ftm_set_stay(id, true);//block auto defrost
UTIL__MakingDeath(id, pCube, false);
}
}
public ftm_client_spawn(id, iTeam)
{
new iTeamOther;
new iTicketNum = g_iTicketNum[ iTeam ];
g_iTeamIndex[ id ] = iTeam;
if (!ftm_get_frozen(id))
{
UTIL__MakingDeath(id);
}
else if (get_member_game(m_bGameStarted) && ftm_get_play_round(id) == get_member_game(m_iTotalRoundsPlayed))
{
iTicketNum = --g_iTicketNum[ iTeam ];
if (iTicketNum < 0)
iTicketNum = 0;
for (new i = 1; i <= g_iMaxPlayers; i++)
{
if (!is_user_alive(i) || i == id)
continue;
iTeamOther = g_iTeamIndex[ i ];
if (iTeamOther == iTeam)
{
if (g_iLastIcon[ i ] != iTicketNum && iTicketNum != TICKET_NUM && iTicketNum < 10)
{
message_begin(MSG_ONE_UNRELIABLE, g_iStatusIcon, _, i);
write_byte(STATUS_ICON_HIDE);
if (iTicketNum >= sizeof(Sprite_Data) - 1)
write_string(TICKET_SPRITE_OVER);
else
write_string(Sprite_Data[ iTicketNum + 1 ][ Sprite_Name ]);
message_end();
}
g_iLastIcon[ i ] = iTicketNum;
if (iTicketNum < sizeof(Sprite_Data))
{
message_begin(MSG_ONE_UNRELIABLE, g_iStatusIcon, _, i);
write_byte(STATUS_ICON_SHOW);
write_string(Sprite_Data[ iTicketNum ][ Sprite_Name ]);
write_byte(Sprite_Data[ iTicketNum ][ Sprite_Color ][ 0 ]);
write_byte(Sprite_Data[ iTicketNum ][ Sprite_Color ][ 1 ]);
write_byte(Sprite_Data[ iTicketNum ][ Sprite_Color ][ 2 ]);
message_end();
}
}
if (iTicketNum < 1 && ftm_get_frozen(i) && get_member_game(m_bGameStarted))
{
new pEntCube;
ftm_defrost_break(i);
ftm_get_entity_owner(i, pEntCube);
ftm_set_spawnlock(i, true);
ftm_set_stay(i, true);
UTIL__MakingDeath(i, pEntCube, false);
}
}
}
}
stock UTIL__MakingDeath(const id, const dest = 0, bool:bHide = true)
{
new pEnt = g_iSpriteEnt[ id ];
if (!is_valid_ent(pEnt))
{
if (bHide)
return;
pEnt = create_entity("env_sprite");
if (!pEnt)
return;
entity_set_string(pEnt, EV_SZ_classname, "p_death");
entity_set_float(pEnt, EV_FL_renderamt, 175.0);
entity_set_int(pEnt, EV_INT_rendermode, kRenderTransAdd);
entity_set_int(pEnt, EV_INT_movetype, MOVETYPE_FOLLOW);
entity_set_model(pEnt, MODEL_DEATH);
g_iSpriteEnt[ id ] = pEnt;
}
else
{
new iEffect = entity_get_int(pEnt, EV_INT_effects);
if (bHide)
{
if (iEffect & EF_NODRAW)
return;
iEffect |= EF_NODRAW;
}
else
iEffect &= ~EF_NODRAW;
entity_set_int(pEnt, EV_INT_effects, iEffect);
}
entity_set_edict(pEnt, EV_ENT_aiment, dest);
entity_set_int(pEnt, EV_INT_skin, !(g_iTeamIndex[ id ] - 1));
}
Здравствуйте! Помогите скомпилировать эти два плагина! Постоянно выдает ошибку! Все inc и sma файлы прикрепляю ниже. В заранее спасибо!
В этой теме было размещено решение! Перейти к решению.
Download all Attachments
-
6.5 KB Просмотры: 501
-
3.3 KB Просмотры: 508
-
7.1 KB Просмотры: 520
-
4.6 KB Просмотры: 535
-
6.9 KB Просмотры: 504