Raised This Month: $ Target: $400
 0% 

message_write?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
sambro
Member
Join Date: May 2005
Old 05-15-2005 , 23:15  
Reply With Quote #4

I'll save you the effort (I'm so generous). Taken straight from my tempentity plugin (not finished yet).

Code:
//Creates a beam TE between two points. createBeamPoints(id) {   message_begin(MSG_BROADCAST, SVC_TEMPENTITY);   //The type of temp entity.   write_byte(TE_BEAMPOINTS);   //Start position.   write_coord(floatround(vector_source[0]));   write_coord(floatround(vector_source[1]));   write_coord(floatround(vector_source[2]));   //End position   write_coord(floatround(vector_destination[0]));   write_coord(floatround(vector_destination[1]));   write_coord(floatround(vector_destination[2]));   //Beam sprite.   write_short(sprite_dot);   //Sprite start frame. Usually fine to just leave this at 1.   write_byte(1);   //Frame rate per 1/10 second.   write_byte(1);   //Lifetime of the TE, in tenths of a second.   write_byte(100);   //Width of the beam.   write_byte(20);   //Noise amplitude. No idea wtf this is. Best to leave it at 0.   write_byte(0);   //Color of the beam. RGB.   write_byte(0);   write_byte(255);   write_byte(255);   //Brightness of the beam.   write_byte(255);   //"scroll-speed". No clue again. Left at 0.   write_byte(0);   //We're done.   message_end(); }
sambro is offline
Send a message via MSN to sambro
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:42.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode