TE PLAYERATTACHMENT
Revision as of 17:23, 31 May 2025 by Outerbeast (talk | contribs)
Attaches a sprite or model to the target player.
A CBasePlayer method exists: void ShowOverheadSprite(const string& in szSpriteName, const float flZOffset, const float flLifeTime)
void te_playerattachment(CBasePlayer@ target, float vOffset=51.0f, string sprite="sprites/bubble.spr", uint16 life=16, NetworkMessageDest msgType=MSG_BROADCAST, edict_t@ dest=null) { NetworkMessage m(msgType, NetworkMessages::SVC_TEMPENTITY, dest); m.WriteByte(TE_PLAYERATTACHMENT); m.WriteByte(target.entindex()); m.WriteCoord(vOffset); m.WriteShort(g_EngineFuncs.ModelIndex(sprite)); m.WriteShort(life); m.End(); }
CBasePlayer@ target
Player to attach the sprite/model tofloat vOffset
Vertical sprite offset relative to the player's originstring sprite
Sprite to display (alpha transparency)uint16 life
Time to display the attachement (seconds * 0.1)