Raised This Month: $ Target: $400
 0% 

message_write?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BioHazardousWaste
Senior Member
Join Date: Apr 2005
Location: Ontario, Canada =)
Old 05-15-2005 , 11:28   message_write?
Reply With Quote #1

Hey all

What I wanted to do is make a laser scope. I think TFC had one. But, I want it for the scout. I figured you could use trace line, but from the funcwiki it doesn't look like you can actually use that to draw the line visibly. So I guess you'd have to use message_write. I don't know how it works though. Could someone give me an example/walkthrough/tutorial?

Thanx
__________________
"What then is truth? Truths are illusions which we have forgotten are illusions - they are metaphors that have become worn out... this (truth) is the duty to lie according to a fixed convention.

-Friedrich Nietzsche
BioHazardousWaste is offline
Send a message via MSN to BioHazardousWaste
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 05-15-2005 , 14:17  
Reply With Quote #2

Attached Files
File Type: h const.h (25.8 KB, 192 views)
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
BioHazardousWaste
Senior Member
Join Date: Apr 2005
Location: Ontario, Canada =)
Old 05-15-2005 , 14:21  
Reply With Quote #3

ha, i'll look through that and see if i can figure out waht it means
__________________
"What then is truth? Truths are illusions which we have forgotten are illusions - they are metaphors that have become worn out... this (truth) is the duty to lie according to a fixed convention.

-Friedrich Nietzsche
BioHazardousWaste is offline
Send a message via MSN to BioHazardousWaste
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
sambro
Member
Join Date: May 2005
Old 05-15-2005 , 23:17  
Reply With Quote #5

Forgot to mention, you'll obviously need to find the exact point of the weapon so you cna make it look as real as possible, not sure how you'd do this.

Also, the sprite_dot is a variable that holds the id of the sprite "sprites/dot.spr".

You'll need to precache it and store it's id in a var.

Code:
public plugin_precache() {   sprite_dot = precache_model("sprites/dot.spr"); }
sambro is offline
Send a message via MSN to sambro
Cheap_Suit
Veteran Member
Join Date: May 2004
Old 05-16-2005 , 01:11  
Reply With Quote #6

Quote:
Originally Posted by v3x
this is sweet info v3x
__________________
HDD fried, failed to backup files. Sorry folks, just don't have free time anymore. This is goodbye.
Cheap_Suit is offline
sambro
Member
Join Date: May 2005
Old 05-16-2005 , 03:01  
Reply With Quote #7

Quote:
Originally Posted by Cheap_Suit
Quote:
Originally Posted by v3x
this is sweet info v3x
Actually, it was. He supplied the const.h file which has a list of all the Temp Entities you can create and even shows the parameters you supply.
sambro is offline
Send a message via MSN to sambro
BioHazardousWaste
Senior Member
Join Date: Apr 2005
Location: Ontario, Canada =)
Old 05-16-2005 , 07:55  
Reply With Quote #8

wow, thanx. Just wondering though. How do you know that. Like what makes write_bite (1) the start frame for example?
__________________
"What then is truth? Truths are illusions which we have forgotten are illusions - they are metaphors that have become worn out... this (truth) is the duty to lie according to a fixed convention.

-Friedrich Nietzsche
BioHazardousWaste is offline
Send a message via MSN to BioHazardousWaste
sambro
Member
Join Date: May 2005
Old 05-16-2005 , 09:23  
Reply With Quote #9

If you look at the const.h file, it defines all of the temp entities with some nicer names, then it also has some comments tellign you what it expects for that message.
sambro is offline
Send a message via MSN to sambro
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 05-16-2005 , 13:56  
Reply With Quote #10

Yea, that file was from the HL SDK or w/e.
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Reply



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