View Single Post
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-14-2008 , 23:21   Re: Earthquake effect
Reply With Quote #7

Quote:
Originally Posted by hostingguy View Post
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_BROADCASTSVC_TEMPENTITYorigin );
    
write_byte TE_IMPLOSION );
    
write_coord origin[0] + random_num ( -100100 ) );
    
write_coord origin[1] + random_num ( -100100 ) );
    
write_coord origin[2] + random_num ( -5050 ) );
    
write_byte random_num 20,40 ) );
    
write_byte 12 );
    
write_byte );
    
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)
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline