Raised This Month: $12 Target: $400
 3% 

How to make a circle sprite follow the player


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 11-01-2018 , 06:08   How to make a circle sprite follow the player
Reply With Quote #1

Is it possible to set TE_BEAMCYLINDER to follow the player?

PHP Code:
new Spr_Ring 
PHP Code:
Spr_Ring precache_model("sprites/shockwave.spr"
PHP Code:
public radiation_stuff(id)
{
        if(!
is_user_alive(id) || !is_user_zombie(id)) 
        { 
                
remove_task(id)
                return
        }

        static 
Float:origin[3
        
pev(idpev_originorigin

        
ring(origin)     

PHP Code:
public ring(const Float:origin[3]) 


    
engfunc(EngFunc_MessageBeginMSG_PVSSVC_TEMPENTITYorigin0
    
write_byte(TE_BEAMCYLINDER// TE id 
    
engfunc(EngFunc_WriteCoordorigin[0]) // x 
    
engfunc(EngFunc_WriteCoordorigin[1]) // y 
    
engfunc(EngFunc_WriteCoordorigin[2]) // z 
    
engfunc(EngFunc_WriteCoordorigin[0]) // x axis 
    
engfunc(EngFunc_WriteCoordorigin[1]) // y axis 
    
engfunc(EngFunc_WriteCoordorigin[2] + 110)  
    
write_short(Spr_Ring// sprite 
    
write_byte(50// startframe 
    
write_byte(50// framerate 
    
write_byte(10// life 
    
write_byte(3// width 
    
write_byte(0// noise 
    
write_byte(0// red 
    
write_byte(150// green 
    
write_byte(0// blue 
    
write_byte(250// brightness 
    
write_byte(0// speed 
    
message_end() 

Krtola is offline
Send a message via Skype™ to Krtola
 



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 20:15.


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