Author Topic: Packaging commandtoclient('bottomprint' ..  (Read 2389 times)

Hey, anyone know a decent way of doing this as I would rather not package the commandtoclient
Have tried gcn::bottomprint and traceing doesn't reveal any calls to any functions

You can't package the commandToClient directly. Your best bet is function GameConnection::bottomPrint(%client, %message, %time, %hideBar), since most add-ons use that instead of calling the command directly, but for the ones that don't, you'll probably just have to fix them manually.

You can't package the commandToClient directly. Your best bet is function GameConnection::bottomPrint(%client, %message, %time, %hideBar), since most add-ons use that instead of calling the command directly, but for the ones that don't, you'll probably just have to fix them manually.

As mentioned I had already attempted GameConnection::bottomPrint as a method. Righty, guess lie take a different approach then.

gcn::bottomprint
As mentioned I had already attempted GameConnection::bottomPrint as a method. Righty, guess lie take a different approach then.
Your mobile phone is showing

on topic:
Code: [Select]
package blah
{
    function GameConnection::bottomPrint(%client, %message, %time, %hideBar)
    {
        // Code before or after parent depending on when you want original code to run.
        parent::bottomPrint(%client, %message, %time, %hideBar);
    }
};
« Last Edit: April 08, 2015, 03:04:53 PM by Honorabl3 »

Your mobile phone is showing

on topic:
Code: [Select]
package blah
{
    function GameConnection::bottomPrint(%client, %message, %time, %hideBar)
    {
        // Code before or after parent depending on when you want original code to run.
        parent::bottomPrint(%client, %message, %time, %hideBar);
    }
};
Well noted about the mobile haha. Although as I've stated in the statement you yourself bolded, this method was the first thing I did, but the function is not called from command to client and thus ill effective.

It appears ile have to use annother workaround to sort it out. But thanks for the response anyway :)
« Last Edit: April 08, 2015, 08:20:11 PM by Gambsy »

Well noted about the mobile haha. Although as I've stated in the statement you yourself bolded, this method was the first thing I did, but the function is not called from command to client and thus ill effective.

It appears ile have to use annother workaround to sort it out. But thanks for the response anyway :)
Ahh my bad, wasn't paying attention.

Bottom print is a client command that can be parented (only on client side) like so:
Code: [Select]
package blah
{
    function clientCmdbottomPrint(%client, %message, %time, %hideBar) // Make sure args are correct.
    {
        // Code before or after parent depending on when you want original code to run.
        parent::clientCmdbottomPrint(%client, %message, %time, %hideBar);
    }
};

Alternatively you can use this instead of commandtoclient (this one works for server):
%client.bottomPrint(args);
To parent that, ^^^ check my last post.

The issue is that a lot of server-sided add-ons just use commandToClient(client, 'BottomPrint', ...) instead of bottomPrint(client, ...) or client.bottomPrint(...). Just packaging the last two usually does not suffice.

The issue is that a lot of server-sided add-ons just use commandToClient(client, 'BottomPrint', ...) instead of bottomPrint(client, ...) or client.bottomPrint(...). Just packaging the last two usually does not suffice.
This pritty much sums up the issue. I managed a workaround via other packages of the add-ons needed