forked from baso88/SC_AngelScript
-
Notifications
You must be signed in to change notification settings - Fork 0
TE_PLAYERATTACHMENT
wootguy edited this page Nov 29, 2025
·
4 revisions
Attaches a sprite or model to the target player.
| Type | Name | Description |
|---|---|---|
| CBasePlayer@ | target | Player to attach the sprite/model to |
| float | vOffset | Vertical sprite offset relative to the player's origin |
| const char* | sprite | Sprite to display (alpha transparency) |
| uint16_t | life | Time to display the attachement (seconds * 0.1) |
void te_playerattachment(CBasePlayer@ target, float vOffset=51.0f,
const char* sprite="sprites/bubble.spr", uint16_t life=16,
int msgType=MSG_BROADCAST, edict_t* dest=NULL)
{
MESSAGE_BEGIN(msgType, SVC_TEMPENTITY, dest);
WRITE_BYTE(TE_PLAYERATTACHMENT);
WRITE_BYTE(target->entindex());
WRITE_COORD(vOffset);
WRITE_SHORT(MODEL_INDEX(sprite));
WRITE_SHORT(life);
MESSAGE_END();
}