Blockland Forums > Suggestions & Requests

ChatMsgAll outside of minigames

Pages: << < (2/6) > >>

Yola²:

Pecon, you have the BottomPrint register set to your ChatMessageServer function.

until pecon fixes his


--- Code: ---registerOutputEvent(fxDtsBrick, "ChatMessageServer", "STRING 200 150", 1);
registerOutputEvent(fxDtsBrick, "CenterPrintServer", "STRING 200 150 INTEGER 0 10", 1);
registerOutputEvent(fxDtsBrick, "BottomPrintServer", "STRING 200 150 INTEGER 0 10 BOOL", 1);

function fxDtsBrick::ChatMessageServer(%this, %msg, %oClient)
{
%numClients = ClientGroup.getCount();
for(%i; %i<numClients; %i++)
{
%client = ClientGroup.get(%i);
messageClient(%client,'', %msg);
}
}

function fxDtsBrick::CenterPrintServer(%this, %msg, %time, %oClient)
{
%numClients = ClientGroup.getCount();
for(%i; %i<numClients; %i++)
{
%client = ClientGroup.get(%i);
%client.centerPrint(%msg,%time);
}
}

function fxDtsBrick::BottomPrintServer(%this, %msg, %time, %bar, %oClient)
{
%numClients = ClientGroup.getCount();
for(%i; %i<numClients; %i++)
{
%client = ClientGroup.get(%i);
%client.centerPrint(%msg,%time,%bar);
}
}
--- End code ---


WALDO:

You have two of the functions on CenterPrint.

--- Code: ---registerOutputEvent(fxDtsBrick, "ChatMessageServer", "STRING 200 150", 1);
registerOutputEvent(fxDtsBrick, "CenterPrintServer", "STRING 200 150 INTEGER 0 10", 1);
registerOutputEvent(fxDtsBrick, "BottomPrintServer", "STRING 200 150 INTEGER 0 10 BOOL", 1);

function fxDtsBrick::ChatMessageServer(%this, %msg, %oClient)
{
%numClients = ClientGroup.getCount();
for(%i; %i<numClients; %i++)
{
%client = ClientGroup.get(%i);
                messageClient(%client,'', %msg);
}
}

function fxDtsBrick::CenterPrintServer(%this, %msg, %time, %oClient)
{
%numClients = ClientGroup.getCount();
for(%i; %i<numClients; %i++)
{
%client = ClientGroup.get(%i);
%client.centerPrint(%msg,%time);

}
}

function fxDtsBrick::BottomPrintServer(%this, %msg, %time, %bar, %oClient)
{
%numClients = ClientGroup.getCount();
for(%i; %i<numClients; %i++)
{
%client = ClientGroup.get(%i);
%client.bottomPrint(%msg,%time,%bar);
}
}
--- End code ---
Isn't this the right code for it?

Yola²:


--- Quote from: WALDO on February 15, 2013, 04:51:20 PM ---You have two of the functions on CenterPrint.

Isn't this the right code for it?

--- End quote ---

That's my exact code.

WALDO:


--- Quote from: Yola² on February 15, 2013, 04:53:54 PM ---That's my exact code.

--- End quote ---

--- Code: ---function fxDtsBrick::BottomPrintServer(%this, %msg, %time, %bar, %oClient)
{
%numClients = ClientGroup.getCount();
for(%i; %i<numClients; %i++)
{
%client = ClientGroup.get(%i);
%client.centerPrint(%msg,%time,%bar);
}
}

--- End code ---
This is your version.


--- Code: ---function fxDtsBrick::BottomPrintServer(%this, %msg, %time, %bar, %oClient)
{
%numClients = ClientGroup.getCount();
for(%i; %i<numClients; %i++)
{
%client = ClientGroup.get(%i);
%client.bottomPrint(%msg,%time,%bar);
}
}

--- End code ---
This is my version. Read the print commands, they are different between our versions.

Yola²:


--- Quote from: WALDO on February 15, 2013, 05:00:10 PM ---
This is my version.

I put the differences in bold.

--- End quote ---

ahh.

Didn't read through the actual functions, sorry.

Pages: << < (2/6) > >>

Go to full version