Raised This Month: $ Target: $400
 0% 

Sprite to one player


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
WaZZeR++
Veteran Member
Join Date: Mar 2005
Location: Sweden
Old 10-26-2005 , 10:39   Sprite to one player
Reply With Quote #1

is it possible to display a sprite to one person?
WaZZeR++ is offline
Send a message via MSN to WaZZeR++
Charr
Senior Member
Join Date: Jul 2005
Location: Long Island, New York, U
Old 10-26-2005 , 14:55  
Reply With Quote #2

Yes. You probably should use a temp-entity message.
Charr is offline
Send a message via AIM to Charr Send a message via MSN to Charr
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 10-26-2005 , 15:19  
Reply With Quote #3

Code:
#define TE_SPRITE           17      // additive sprite, plays 1 cycle // coord, coord, coord (position) // short (sprite index) // byte (scale in 0.1's) // byte (brightness)

Just set send the temp ent message to one player, the annoying part is that this only plays one cycle (though in some cases this is actually ideal).
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Charr
Senior Member
Join Date: Jul 2005
Location: Long Island, New York, U
Old 10-26-2005 , 15:26  
Reply With Quote #4

for one person it would be: (Corrected)
Code:
message_begin(MSG_ONE,SVC_TEMPENTITY,{0,0,0},id) write_byte(17) write_coord(X) write_coord(Y) write_coord(Z) write_short(sprite) write_byte(scale) write_byte(brightness) message_end()
Altough I clueless to what the scale var does, I do know that you sprite has to be a global var that is precached like:
Code:
new sprite public plugin_precache()    sprite = precache_model("dir/sprite.spr")
Charr is offline
Send a message via AIM to Charr Send a message via MSN to Charr
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 10-26-2005 , 17:22  
Reply With Quote #5

TE_SPRITE is 17, so the first byte written in the message has to be 17 so that the game knows which temp entity it is, you can't just start putting coordinates and expect it to know what you are trying to do.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Charr
Senior Member
Join Date: Jul 2005
Location: Long Island, New York, U
Old 10-26-2005 , 21:45  
Reply With Quote #6

Whoops.

Also use this for tempentity messages:
Attached Files
File Type: inc svc_tempentity.inc (15.4 KB, 123 views)
Charr is offline
Send a message via AIM to Charr Send a message via MSN to Charr
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 23:35.


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