Quote:
Originally Posted by hostingguy
PHP Code:
//These are global
new gmsgShake = get_user_msgid ( "ScreenShake" );
new eq_Sprite = precache_model ( "sprites/shockwave.spr" );
|
This is not how you are supposed to do...
PHP Code:
new gmsgShake;
new eq_Sprite;
public plugin_precache() {
eq_Sprite = precache_model ( "sprites/shockwave.spr" );
}
public plugin_cfg() {
gmsgShake = get_user_msgid ( "ScreenShake" );
}
For the message, try :
PHP Code:
//Do a ground shockwave
message_begin ( MSG_BROADCAST, SVC_TEMPENTITY, origin );
write_byte ( TE_IMPLOSION );
write_coord ( origin[0] + random_num ( -100, 100 ) );
write_coord ( origin[1] + random_num ( -100, 100 ) );
write_coord ( origin[2] + random_num ( -50, 50 ) );
write_byte ( random_num ( 20,40 ) );
write_byte ( 12 );
write_byte ( 0 );
message_end ( );
Quote:
Originally Posted by message_const.inc
#define TE_IMPLOSION 14 // Tracers moving toward a point
// write_byte(TE_IMPLOSION)
// write_coord(position.x)
// write_coord(position.y)
// write_coord(position.z)
// write_byte(radius)
// write_byte(count)
// write_byte(life in 0.1's)
|
__________________