I'm trying to make it so my add-on can constantly display something in a player's bottom print without clearing the previous bottom print sent to the player. One way I was thinking about would be using something like this:
package examplePackage {
function commandToClient(%this,%function,%a,%b,%c,%d,%e,%f,%g,%h,%i,%j,%k,%l,%m,%n,%o) {
Parent::commandToClient(%this,%function,%a,%b,%c,%d,%e,%f,%g,%h,%i,%j,%k,%l,%m,%n,%o);
if(%function $= "BottomPrint") {
%this.currentBottomPrint = %a;
%this.currentBottomPrintTime = %b;
%this.currentBottomPrintBar = %c;
}
if(%function $= "ClearBottomPrint") {
%this.currentBottomPrint = "";
%this.currentBottomPrintTime = "";
%this.currentBottomPrintBar = "";
}
}
function exampleFunction(%client) {
if(%client.currentBottomPrint !$= "")
commandToClient(%client,'BottomPrint',%client.currentBottomPrint @ "\nExample",-1)
}
};
Note: I haven't actually tested the code and it clearly isn't perfected to what it should be.
Would this be the best (or a possible) way to do that? If not, is there a better (or possible) way to do it?