Error 017: undefined symbol for gp_incendiary_ammo

Сообщения
20
Реакции
1
Ошибка
// C:\Users\VERT\Desktop\addons\amxmodx\scripting\zpnm_extra_gp_incendiary_ammo.sma(150) : error 017: undefined symbol "zp_get_user_nodamage"
// C:\Users\VERT\Desktop\addons\amxmodx\scripting\zpnm_extra_gp_incendiary_ammo.sma(152) : error 017: undefined symbol "zp_set_user_burning"
//
Компилятор
Локальный
Amx Mod X
1.9.0
Исходный код
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

// Plug-in APIs
#include <zombie_plague_special>

new g_pCvarTraceEnabled, g_pCvarColor, g_iMaxPlayers
new g_item_incendiary, g_incendiary[33]

new const g_sprite[] = "sprites/lgtning.spr"

new m_spriteTexture, Trie:g_tClassNames

new g_bRoundEnded;

public plugin_init()
{
register_plugin("[ZPNM] Item Incendiary Ammo", "1.3.0", "D i 5 7 i n c T, ConnorMcLeod")
register_event("HLTV", "event_round_start", "a", "1=0", "2=0")

RegisterHam(Ham_TraceAttack, "worldspawn", "fwHamTraceAttack", 1)
RegisterHam(Ham_TraceAttack, "player", "fwHamTraceAttack", 1)
RegisterHam(Ham_Killed, "player", "fwHamKilledPlayer", 1)

g_pCvarTraceEnabled = register_cvar("zpnm_incendiary_tracers", "1")
g_pCvarColor = register_cvar("zpnm_incendiary_tracers_color", "255000000")

g_iMaxPlayers = get_maxplayers()

g_item_incendiary = zp_register_extra_item("Incendiary ammo", 7, ZP_TEAM_HUMAN | ZP_TEAM_SURVIVOR | ZP_TEAM_SNIPER)
}

new w_item[] = "models/w_357ammobox.mdl"

public plugin_precache()
{
m_spriteTexture = precache_model(g_sprite)

g_tClassNames = TrieCreate()

TrieSetCell(g_tClassNames, "worldspawn", 1)
TrieSetCell(g_tClassNames, "player", 1)

register_forward(FM_Spawn, "fwFmSpawn", 1)

precache_model(w_item)

new tmodel[64]
formatex(tmodel, 63, w_item)
copy(tmodel[strlen(tmodel)-4], charsmax(tmodel) - (strlen(tmodel)-4), "T.mdl")
if (file_exists(tmodel)) engfunc(EngFunc_PrecacheModel, tmodel)
}

public plugin_cfg()
set_task(1.57, "cache_settings")

public cache_settings()
{
g_pCvarTraceEnabled = get_pcvar_num(g_pCvarTraceEnabled)
g_pCvarColor = get_pcvar_num(g_pCvarColor)
}

public fwFmSpawn(const iEnt)
if(pev_valid(iEnt))
{
new szClassName[32]
pev(iEnt, pev_classname, szClassName, 31)
if(!TrieKeyExists(g_tClassNames, szClassName))
{
RegisterHam(Ham_TraceAttack, szClassName, "fwHamTraceAttack", 1)
TrieSetCell(g_tClassNames, szClassName, 1)
}
}

public client_disconnected(iID)
drop_item(iID)

public zp_extra_item_selected(iID, item)
{
if (item != g_item_incendiary)
return PLUGIN_CONTINUE;

if (g_incendiary[iID])
{
ftClientPrintChatColor(iID, iID, "^3You already have incendiary ammo^1!")

return ZP_PLUGIN_HANDLED;
}

g_incendiary[iID] = true
ftClientPrintChatColor(iID, iID, "^4You now have incendiary ammo^1.")

return PLUGIN_CONTINUE;
}

public zp_round_started()
g_bRoundEnded = false;

public zp_round_ended()
g_bRoundEnded = true;

/*
public fwHamTakeDamagePlayer(const iIDVictim, const iIDInflictor, const iIDAttacker)
{
if (iAttacker < 1 || iAttacker > g_iMaxPlayers || !g_incendiary[iAttacker] || GetHamReturnStatus() == HAM_SUPERCEDE)
return;


}*/

public fwHamTraceAttack(const iEnt, const iAttacker, const Float:flDamage, const Float:fDir[3], const ptr, const iDamageType)
{
if (!flDamage || iAttacker < 1 || iAttacker > g_iMaxPlayers || !g_incendiary[iAttacker] || get_user_weapon(iAttacker) == CSW_KNIFE)
return;

if (!g_bRoundEnded && 1 <= iEnt <= g_iMaxPlayers && is_user_alive(iEnt)
&& zp_get_user_zombie(iEnt) && !zp_get_user_nodamage(iEnt)
&& !zp_get_user_burn(iEnt))
zp_set_user_burning(iEnt, 1, iAttacker)

if (!g_pCvarTraceEnabled)
return;

static Float:flEnd[3], iColor, iRed, iGreen, iBlue

get_tr2(ptr, TR_vecEndPos, flEnd)
iColor = g_pCvarColor
iRed = iColor / 1000000
iColor %= 1000000
iGreen = iColor / 1000
iBlue = iColor % 1000

message_begin(MSG_BROADCAST, SVC_TEMPENTITY )
write_byte(TE_BEAMENTPOINT)
write_short(iAttacker | 0x1000)
engfunc(EngFunc_WriteCoord, flEnd[0])
engfunc(EngFunc_WriteCoord, flEnd[1])
engfunc(EngFunc_WriteCoord, flEnd[2])
write_short(m_spriteTexture)
write_byte(0) // framerate
write_byte(0) // framerate
write_byte(1) // life
write_byte(7) // width
write_byte(0) // noise
write_byte(iRed) // r, g, b
write_byte(iGreen) // r, g, b
write_byte(iBlue) // r, g, b
write_byte(255) // brightness
write_byte(10) // speed
message_end()
}

public zp_user_infected_post(iID)
drop_item(iID)

public zp_user_humanized_post(iID, surv, snip)
if (surv || snip)
g_incendiary[iID] = true

public fwHamKilledPlayer(iID)
if (zp_has_round_started())
drop_item(iID)

#include <engine>

public drop_item(iID)
{
if (!g_incendiary[iID])
return;

new Float:origin[3]
entity_get_vector(iID, EV_VEC_origin, origin)

new bazooka = create_entity("info_target")

entity_set_string(bazooka, EV_SZ_classname, "zpnm_incendiary")
entity_set_model(bazooka, w_item)
fm_set_rendering(bazooka)

entity_set_size(bazooka, Float:{ -16.0, -16.0, -16.0 }, Float:{ 16.0, 16.0, 16.0 })
entity_set_int(bazooka, EV_INT_solid, 1)

entity_set_int(bazooka, EV_INT_movetype, 6)

entity_set_vector(bazooka, EV_VEC_origin, origin)

g_incendiary[iID] = false
}

public pfn_touch(ptr, ptd)
{
if (!is_valid_ent(ptr))
return;

static classname[32]
entity_get_string(ptr, EV_SZ_classname, classname, 31)

if (equali(classname, "zpnm_incendiary"))
{
if (!is_user_alive(ptd) || g_incendiary[ptd] || zp_get_user_zombie(ptd))
return;

g_incendiary[ptd] = true

ftClientPrintChatColor(ptd, ptd, "^4You now have incendiary ammo^1.")

engfunc(EngFunc_RemoveEntity, ptr)
}
}

public event_round_start()
{
new nextitem = -1
nextitem = find_ent_by_class(-1, "zpnm_incendiary")

while (nextitem)
{
if (is_valid_ent(nextitem))
engfunc(EngFunc_RemoveEntity, nextitem)

nextitem = find_ent_by_class(-1, "zpnm_incendiary")
}
}


// Set entity's rendering type (from fakemeta_util)
stock fm_set_rendering(entity)
{
/* new Float:fColor = float(g_pCvarColor)

color[0] = fColor / 1000000
fColor %= 1000000
color[1] = fColor / 1000
color[2] = fColor % 1000
*/

set_pev(entity, pev_renderfx, kRenderFxGlowShell)
set_pev(entity, pev_rendercolor, Float:{ 255.0, 0.0, 0.0 })
set_pev(entity, pev_rendermode, kRenderNormal)
set_pev(entity, pev_renderamt, random_float(57.7, 75.7))
}

ftClientPrintChatColor(const iID_Target, const iID_Sender = 0, const szMessage[], any:...)
{
if (iID_Target && !is_user_connected(iID_Target))
return;

static szBuffer[192];
vformat(szBuffer, charsmax(szBuffer), szMessage, 4)

static const D7_CHAT_TAG[] = "^1[^4ZPNM^1] ";
format(szBuffer, charsmax(szBuffer), "%s%s", D7_CHAT_TAG, szBuffer)

static iID_MsgSayText;
if (!iID_MsgSayText)
iID_MsgSayText = get_user_msgid("SayText");

if (iID_Target)
message_begin(MSG_ONE, iID_MsgSayText, _, iID_Target)
else
message_begin(MSG_ALL, iID_MsgSayText)

write_byte(!iID_Sender ? iID_Target : iID_Sender)
write_string(szBuffer)
message_end()
}
I've changed somethings but got stuck here
 

Download all Attachments

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

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