Skip to content

TE_PLAYERATTACHMENT

GeckoN edited this page Jan 31, 2017 · 4 revisions

Attaches a sprite or model to the target player.

Parameters

Type Name Description
CBasePlayer@ target Player to attach the sprite/model to
float vOffset Vertical sprite offset relative to the player's origin
string sprite Sprite to display (alpha transparency)
uint16 life Time to display the attachement (seconds * 0.1)

API Function

void CBasePlayer::ShowOverheadSprite(const string& in szSpriteName, const float flZOffset, const float flLifeTime)

NetworkMessage Function

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();
}
Clone this wiki locally