Quote:
Originally Posted by DarkSkif
When I kill the enemy, server crashes ...
|
Try this.
PHP Code:
#include < amxmodx >
#include < hamsandwich >
new g_iMaxplayers;
public plugin_init( ) {
register_plugin( "Killing Particles", "1.0", "metallicawOw" );
RegisterHam( Ham_Killed, "player", "FwdHamPlayerKilled", 1 );
g_iMaxplayers = get_maxplayers( );
}
public FwdHamPlayerKilled( id, iAttacker, iShouldGib ) {
if( 1 <= iAttacker <= g_iMaxplayers ) {
new iOrigin[ 3 ];
get_user_origin( id, iOrigin );
message_begin( MSG_PVS, SVC_TEMPENTITY, iOrigin );
write_byte( TE_IMPLOSION );
write_coord( iOrigin[ 0 ] );
write_coord( iOrigin[ 1 ] );
write_coord( iOrigin[ 2 ] );
write_byte( 200 );
write_byte( 100 );
write_byte( 5 );
message_end( );
message_begin( MSG_PVS, SVC_TEMPENTITY, iOrigin );
write_byte( TE_PARTICLEBURST );
write_coord( iOrigin[ 0 ] );
write_coord( iOrigin[ 1 ] );
write_coord( iOrigin[ 2 ] );
write_byte( 50 );
write_byte( 72 );
write_byte( 6 );
message_end( );
}
}
__________________