Raised This Month: $ Target: $400
 0% 

Explode an entity


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
DWIGHTpN
Senior Member
Join Date: Jan 2013
Location: Romania.
Old 08-08-2013 , 11:09   Re: Explode an entity
Reply With Quote #2

From message_const.inc , use:
PHP Code:
#define    TE_EXPLOSION                3        // Additive sprite, 2 dynamic lights, flickering particles, explosion sound, move vertically 8 pps
// write_byte(TE_EXPLOSION)
// write_coord(position.x)
// write_coord(position.y)
// write_coord(position.z)
// write_short(sprite index)
// write_byte(scale in 0.1's)
// write_byte(framerate)
// write_byte(flags) 
Flags:
PHP Code:
#define TE_EXPLFLAG_NONE            0        // All flags clear makes default Half-Life explosion
#define TE_EXPLFLAG_NOADDITIVE      1        // Sprite will be drawn opaque (ensure that the sprite you send is a non-additive sprite)
#define TE_EXPLFLAG_NODLIGHTS       2        // Do not render dynamic lights
#define TE_EXPLFLAG_NOSOUND         4        // Do not play client explosion sound
#define TE_EXPLFLAG_NOPARTICLES     8        // Do not draw particles 
sprite index:
PHP Code:
new g_sprite// This is sprite index
public plugin_precache() {
      
g_sprite precache_model("sptrite directory");

After explosion, use remove_entity( entity ).
You want to kill/slap(with damage) players, when this entity explode?

Last edited by DWIGHTpN; 08-08-2013 at 11:10.
DWIGHTpN is offline
 



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


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