Simplify it first so it runs for only one guy in spectate.
Try:
cP->customTag.Format(L"Sniping");
Send_Object_Update(obj, PlayerID);
cP->customTag.Format(L"");
Or:
cP->customTag.Format(L"Sniping");
cP->Set_Object_Dirty_Bits(PlayerID, NetworkObjectClass::BIT_CREATION);
Send_Object_Update(obj, PlayerID);
cP->customTag.Format(L"");
Otherwise you can attach an object or float an object above sniping players for one second and only have these shown for spectating players. I recommend you add a simple check at the start of OnThink() to make the code only run every second or so. Use GetTickCount64().
[Updated on: Sat, 08 September 2012 09:12]
Report message to a moderator