It doesn't work to calling custom classes
I can't compile it.
Code:
Error: Invalid expression, assumed zero on line 19
PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <fakemeta>
#define PLUGIN "g"
#define VERSION "1.0"
#define AUTHOR "g"
#define RIC "debris/metal6.wav"
#define BLOCK "BMd_Block"
public plugin_precache()
precache_sound(RIC)
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHamFromEntity(Ham_TraceAttack,, BLOCK, "shoot_item")
}
public shoot_item(ent, attacker, Float:damage, Float:direction[3], trace, damagebits)
{
static Float:endpoint[3]
get_tr2(trace, TR_vecEndPos, endpoint)
draw_spark(endpoint)
engfunc(EngFunc_EmitSound, ent, CHAN_ITEM, RIC, 0.5, ATTN_STATIC, 0, PITCH_NORM)
return HAM_IGNORED
}
stock draw_spark(const Float:origin[3])
{
message_begin(MSG_ALL, SVC_TEMPENTITY)
write_byte(TE_SPARKS)
engfunc(EngFunc_WriteCoord, origin[0])
engfunc(EngFunc_WriteCoord, origin[1])
engfunc(EngFunc_WriteCoord, origin[2])
message_end()
}
Class from main plugin:
PHP Code:
new const g_block_classname[] = "BMd_Block";