Skip to content

TE_PLAYERSPRITES

wootguy edited this page Nov 29, 2025 · 4 revisions

Fills the player's collision box with sprites. A single sprite floats up and away from the player, disappearing shortly after.

Parameters

Type Name Description
CBasePlayer@ target Player to surround with sprites
const char* sprite Sprite to display (alpha transparency)
uint8_t count Number of sprites to spawn

Example Usage

void te_playersprites(CBasePlayer@ target, 
    const char* sprite="sprites/bubble.spr", uint8_t count=16,
    int msgType=MSG_BROADCAST, edict_t* dest=NULL)
{
    MESSAGE_BEGIN(msgType, SVC_TEMPENTITY, dest);
    WRITE_BYTE(TE_PLAYERSPRITES);
    WRITE_SHORT(target->entindex());
    WRITE_SHORT(MODEL_INDEX(sprite));
    WRITE_BYTE(count);
    WRITE_BYTE(0); // "size variation" - has no effect
    MESSAGE_END();
}

Clone this wiki locally