Author Topic: ByeBye  (Read 1617 times)

« Last Edit: October 26, 2012, 12:34:31 AM by NAT3 »

If it only should work for you, there's no need to use newChatHud_addLine or clientCmdChatMessage. Here's a template of what you should do.

Code: [Select]
package foobar
{
    function NMH_Type::send( %this )
    {
        %value = %this.getValue();
       
        if ( yourProcessingFunction( %value ) )
        {
            %this.setValue( "" );
        }
       
        parent::send( %this );
    }
};

activatePackage( "foobar" );

function yourProcessingFunction( %msg )
{
    if ( %msg $= "-myping" )
    {
        newChatSO.addLine( "\c6Your ping is \c3" @ serverConnection.getPing() @ "\c6." );
    }
    else if ( %msg $= "-disconnect" )
    {
        disconnect();
    }
    else
    {
        return false;
    }
   
    return true;
}

What why you steals avatar

What why you steals avatar

Veggie was banned from his computer and hasn't been online in quite some time, So uhh i don't think it matters.

« Last Edit: October 26, 2012, 12:34:53 AM by NAT3 »

« Last Edit: October 26, 2012, 12:35:05 AM by NAT3 »


goddamnit

use Bauklotz/Port's bot command system PLEASE

no, don't; it's terrible
do something like this

If it only should work for you, there's no need to use newChatHud_addLine or clientCmdChatMessage. Here's a template of what you should do.

Code: [Select]
package foobar
{
    function NMH_Type::send( %this )
    {
        %value = %this.getValue();
       
        if ( yourProcessingFunction( %value ) )
        {
            %this.setValue( "" );
        }
       
        parent::send( %this );
    }
};

activatePackage( "foobar" );

function yourProcessingFunction( %msg )
{
    if ( %msg $= "-myping" )
    {
        newChatSO.addLine( "\c6Your ping is \c3" @ serverConnection.getPing() @ "\c6." );
    }
    else if ( %msg $= "-disconnect" )
    {
        disconnect();
    }
    else
    {
        return false;
    }
   
    return true;
}