That temp entity what it does is that the sprite looks like a tail and it's not what I want, what I want is to simulate the glow led on the player (like the c4) and I want it to come out in a certain event then I want it to be removed, Does anyone know how I can do that?
PHP Code:
#include <amxmodx>
#include <zp50_core>
#define TASK_SPRITE 300
#define ID_SPRITE (taskid - TASK_SPRITE)
new spr_bomb
public plugin_precache()
{
spr_bomb = precache_model("sprites/ledglow.spr")
}
public zp_fw_core_cure(id, attacker)
{
remove_task(id+TASK_SPRITE)
}
public zp_fw_core_infect_post(id, attacker)
{
set_task(2.0, "bomb_led", id+TASK_SPRITE, _, _, "b")
}
public bomb_led(taskid)
{
static origin[3]
get_user_origin(ID_SPRITE, origin)
message_begin(MSG_PVS, SVC_TEMPENTITY, origin)
write_byte(TE_GLOWSPRITE)
write_coord(origin[0])
write_coord(origin[1])
write_coord(origin[2])
write_short(spr_bomb)
write_byte(1)
write_byte(6)
write_byte(255)
message_end()
}
I did it like this works but the sprite does not follow the player.