Hello, im trying to create a lighting for HE grenade explosion, i think im doing this wrong, could someone help?
PHP Code:
#include < amxmodx >
#include < amxmisc >
#include <fakemeta>
public plugin_init()
{
register_plugin("Dynamic Light Grenade Explosion", "", "");
register_event("Explosion", "OnGrenadeExplosion", "ai");
}
public OnGrenadeExplosion(attacker, entity, weapon)
{
if (weapon == CSW_HEGRENADE)
{
static Float: originF[3]
pev(entity, pev_origin, originF);
message_begin(MSG_BROADCAST, SVC_TEMPENTITY);
write_byte(TE_EXPLOSION);
engfunc(EngFunc_WriteCoord, originF[0]);
engfunc(EngFunc_WriteCoord, originF[1]);
engfunc(EngFunc_WriteCoord, originF[2]);
write_byte(30);
write_byte(15);
write_byte(0);
message_end();
}
}