Raised This Month: $ Target: $400
 0% 

Repeat sprite and follow player


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
wicho
Veteran Member
Join Date: Feb 2012
Location: GuateAmala
Old 04-19-2018 , 18:59   Re: Repeat sprite and follow player
Reply With Quote #1

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(idattacker)
{
    
remove_task(id+TASK_SPRITE)
}

public 
zp_fw_core_infect_post(idattacker)
{
    
set_task(2.0"bomb_led"id+TASK_SPRITE__"b")    
}

public 
bomb_led(taskid
{         
    static 
origin[3]
    
get_user_origin(ID_SPRITEorigin)    
    
    
message_begin(MSG_PVSSVC_TEMPENTITYorigin)
    
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.

Last edited by wicho; 04-19-2018 at 19:13.
wicho is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:43.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode