More like that:
PHP Code:
stock UTIL_BeamFollow( iEntity, iSprite, iLife, iWidth, iColor, iBrightness )
{
message_begin( MSG_BROADCAST, SVC_TEMPENTITY );
write_byte( TE_BEAMFOLLOW );
write_short( iEntity );
write_short( iSprite );
write_byte( iLife );
write_byte( iWidth );
write_byte(( iColor >> 16 ) & 0xFF );
write_byte(( iColor >> 8) & 0xFF );
write_byte( iColor & 0xFF );
write_byte( iBrightness );
message_end( );
}
Example :
PHP Code:
UTIL_BeamFollow( player, my_sprite, 15 /* = 1,5 seconds */, 10, 0xFF0000 /* = RED */, 255 );
For colors, see for instance :
http://www.javascripter.net/faq/rgbtohex.htm
__________________