Raised This Month: $ Target: $400
 0% 

Explain how


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
RPRaiden
Member
Join Date: Apr 2004
Location: UK
Old 05-27-2004 , 10:07   Explain how
Reply With Quote #1

Could someone please explain how to use these and show an example please?

native message_begin( dest, msg_type, origin[3]={0,0,0},player=0);
native message_end();
native write_byte( x );
native write_char( x );
native write_short( x );
native write_long( x );
native write_entity( x );
native write_angle( x );
native write_coord( x );
native write_string( x[] )
__________________
RPRaiden is offline
Send a message via ICQ to RPRaiden Send a message via AIM to RPRaiden Send a message via MSN to RPRaiden Send a message via Yahoo to RPRaiden
RPRaiden
Member
Join Date: Apr 2004
Location: UK
Old 05-27-2004 , 12:36  
Reply With Quote #2

hmm maybe if you could just explain byte_short because I want to know how to make a sprite play longer than 1 second.
__________________
RPRaiden is offline
Send a message via ICQ to RPRaiden Send a message via AIM to RPRaiden Send a message via MSN to RPRaiden Send a message via Yahoo to RPRaiden
xeroblood
BANNED
Join Date: Mar 2004
Location: Toronto, Canada
Old 05-28-2004 , 00:11  
Reply With Quote #3

loop the call... (ie: set_task( 1.0, "draw_sprite")... )
xeroblood is offline
Send a message via MSN to xeroblood
ThantiK
Senior Member
Join Date: Mar 2004
Location: Orlando, FL
Old 05-28-2004 , 04:55  
Reply With Quote #4

Code:
blastcir(vec1[3]) {     // blast circles     message_begin( MSG_BROADCAST,SVC_TEMPENTITY,vec1 )     write_byte( 21 )     write_coord(vec1[0])     write_coord(vec1[1])     write_coord(vec1[2] + 16)     write_coord(vec1[0])     write_coord(vec1[1])     write_coord(vec1[2] + 200)     write_short( white )     write_byte( 0 ) // startframe     write_byte( 0 ) // framerate     write_byte( 4 ) // life     write_byte( 16 ) // width     write_byte( 0 ) // noise     write_byte( 188 ) // r     write_byte( 220 ) // g     write_byte( 255 ) // b     write_byte( 255 ) //brightness     write_byte( 0 ) // speed     message_end() }

There is a function you can put into a plugin...do something like

Code:
new origin[3]          get_user_origin(player,origin)

To get your users origin, and pass it to the function....usually like...

Code:
blastcir(origin)

Also, heres a link to some stuff so you can tell what your doing...
http://0x00.org/random/Halflife/SDK/...engine/const.h

The first write_byte is the number of the effect...you'll see numbers beside some constants in the link I gave you...those match up.
__________________
AMXX -- You want control? You got it.
tkwired.com cs 1.6 -- tkwired.com:27016
ThantiK is offline
Send a message via AIM to ThantiK Send a message via MSN to ThantiK
RPRaiden
Member
Join Date: Apr 2004
Location: UK
Old 05-28-2004 , 09:01  
Reply With Quote #5

This Really Helped!. Thanks I was missing the byte Life. I will keep that info as future Reference.

Also I considered looping it but I thought it would loop forever and I dont want that :S
__________________
RPRaiden is offline
Send a message via ICQ to RPRaiden Send a message via AIM to RPRaiden Send a message via MSN to RPRaiden Send a message via Yahoo to RPRaiden
RPRaiden
Member
Join Date: Apr 2004
Location: UK
Old 05-28-2004 , 10:13  
Reply With Quote #6

Code:
        write_byte( 5 ) 
        write_coord(vec[0]+a1) 
        write_coord(vec[1]+b1) 
        write_coord(vec[2]+30) 
        write_short( smoke ) 
        write_byte( 30 )  
        write_byte( 10 )  
       write_byte( 100 )
        message_end()
I added the last byte to set time 100 x 1.0s (10 Seconds) And I got a error when I use the command now
__________________
RPRaiden is offline
Send a message via ICQ to RPRaiden Send a message via AIM to RPRaiden Send a message via MSN to RPRaiden Send a message via Yahoo to RPRaiden
xeroblood
BANNED
Join Date: Mar 2004
Location: Toronto, Canada
Old 05-28-2004 , 11:30  
Reply With Quote #7

As far as I know, a sprite can only last 1 second on screen, that's why I said loop it.. if you're worried about it looping forever, then set a global variable or something to tell it when to stop..
xeroblood is offline
Send a message via MSN to xeroblood
RPRaiden
Member
Join Date: Apr 2004
Location: UK
Old 05-28-2004 , 13:48  
Reply With Quote #8

I will look into that. Cheers
__________________
RPRaiden is offline
Send a message via ICQ to RPRaiden Send a message via AIM to RPRaiden Send a message via MSN to RPRaiden Send a message via Yahoo to RPRaiden
ThantiK
Senior Member
Join Date: Mar 2004
Location: Orlando, FL
Old 05-28-2004 , 22:25  
Reply With Quote #9

Yea, some of those properties start getting really finniky.

If they aren't right, etc then they start crashing the server, or all sorts of things.

I had one, where I had the values incorrect, and it actually kicked every player on the server without any kind of notice, any messages, any crashes or anything...it was like....play play play play play...WTF...I'm back @ cs startup screen? -- and it was literally that instant...and I dont know how. haha...
__________________
AMXX -- You want control? You got it.
tkwired.com cs 1.6 -- tkwired.com:27016
ThantiK is offline
Send a message via AIM to ThantiK Send a message via MSN to ThantiK
Reply


Thread Tools
Display Modes

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 07:02.


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