Bro thanks for the stock i have tried to implement in my code but it never works (the sprite doesn't appear when the last ct / t is killed)
How to add your stock in this code thanks in advance
PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <engine>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
new Snow; //g_iLastId;
new const SpriteSnow[ ] = "sprites/sprt.spr"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event( "DeathMsg", "event_DeathMsg", "a" );
}
public plugin_precache()
{
Snow = precache_model( SpriteSnow );
}
public event_DeathMsg( ) {
new iVictim = read_data( 2 );
new Origin[ 3 ];
get_user_origin( iVictim, Origin );
message_begin( MSG_BROADCAST,SVC_TEMPENTITY );
write_byte( TE_SPRITETRAIL );
write_coord( Origin[ 0 ] ); // start position (X)
write_coord( Origin[ 1 ] ); // start position (Y)
write_coord( Origin[ 2 ] ); // start position (Z)
write_coord( Origin[ 0 ] ); // end position (X)
write_coord( Origin[ 1 ] ); // end position (Y)
write_coord( Origin[ 2 ] + random_num( 40, 60 ) ); // end position (Z)
write_short( Snow ); // sprite index
write_byte( 5); // number of snow
write_byte( 1 ); // life in 0.1's
write_byte( 2 ); // scale in 0.1's
write_byte( 20 ); // velocity along vector in 10's
write_byte(10 ); // randomness of velocity in 10's
message_end( );
}