Author Topic: Can someone disable the "observer" warning?  (Read 1529 times)

Sometimes I spy on people to make sure they aren't doing anything they are suppose to then they get warned with the observer warning.

How can I get it removed?

package disableObserverWarning {
   function SimObject::onCameraEnterOrbit(%obj) {
      //removes the bottomprint counter
      return;
   }

   function SimObject::onCameraLeaveOrbit(%obj) {
      //removes the bottomprint counter
      return;
   }
};
activatePackage(disableObserverWarning);

Source code of the observer: Maybe it's better to just rewrite it without a package in case another add-on uses it for whatever reason
Code: [Select]
function SimObject::onCameraEnterOrbit(%obj, %camera)
{
%client = %obj.client;
if(!isObject(%client))
return;

%observerName = "<OBSERVER>";
if(%camera.getControllingClient())
%observerName = %camera.getControllingClient().getPlayerName();

%playerName = "<PLAYERNAME>";
if(%obj.getControllingClient())
%playerName = %obj.getControllingClient().getPlayerName();
else if(isObject(%obj.client))
%playerName = %obj.client.getPlayerName();

%obj.observerCount = %obj.observerCount + 1;
if(%obj.observerCount == 1)
commandToClient(%client, 'BottomPrint', "\c4" @ %obj.observerCount @ " observer", 2, 1);
else
commandToClient(%client, 'BottomPrint', "\c4" @ %obj.observerCount @ " observers", 2, 1);
}

function SimObject::onCameraLeaveOrbit(%obj, %camera)
{
%client = %obj.client;
if(!isObject(%client))
return;

%observerName = "<OBSERVER>";
if(%camera.getControllingClient())
%observerName = %camera.getControllingClient().getPlayerName();

%playerName = "<PLAYERNAME>";
if(%obj.getControllingClient())
%playerName = %obj.getControllingClient().getPlayerName();
else if(isObject(%obj.client))
%playerName = %obj.client.getPlayerName();

%obj.observerCount = %obj.observerCount - 1;
%mg = %client.miniGame;
if(isObject(%mg) && %mg.RespawnTime <= 0)
{
if (%obj.observerCount == 1)
commandToClient(%client, 'BottomPrint', "\c4" @ %obj.observerCount @ " observer", 2, 1);
else
commandToClient(%client, 'BottomPrint', "\c4" @ %obj.observerCount @ " observers", 2, 1);
}
}

no other addons use it, its basically useless code

There isn't anything useful you can even do with it. In any case you'd be making a camera orbit a player, you'd probably want do do something within the function that did it.

I'm not sure why the function was even used by default instead of putting it in the spectating code. I don't think any admin wants someone to know they're watching.

is that default to the game or something?
I don't remember it ever having an observer count

is that default to the game or something?
I don't remember it ever having an observer count
Yes, it is straight from the source. It's always had an observer count, try having multiple people spy on you

It hasn't always had it.
It had it since the gamemode system came out, which was also the same update where you could use a 1 life system in default minigames.

It hasn't always had it.
It had it since the gamemode system came out, which was also the same update where you could use a 1 life system in default minigames.
I guess that kind of makes sense, thought it might've been a slayer thing instead

It was made for the race cart gamemode.

Blockland has not only had it.

Besides it's basically broken outside of that gamemode. it flashes "observer" for like 2 seconds but that's still enough time for someone to know they are being watched


Took my entire afternoon but I found a way. Here you go.