AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Sprite to one player (https://forums.alliedmods.net/showthread.php?t=19833)

WaZZeR++ 10-26-2005 10:39

Sprite to one player
 
is it possible to display a sprite to one person?

Charr 10-26-2005 14:55

Yes. You probably should use a temp-entity message.

XxAvalanchexX 10-26-2005 15:19

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).

Charr 10-26-2005 15:26

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")

XxAvalanchexX 10-26-2005 17:22

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.

Charr 10-26-2005 21:45

1 Attachment(s)
Whoops.

Also use this for tempentity messages:


All times are GMT -4. The time now is 23:35.

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