Add action to inventory onchanged

Due to human (non-bot) spam the first contribution of a user has to be reviewed and activated manually, all further contributions do not require this.
As long as a user does not have at least one reviewed and activated contribution, the user is unable to edit his profile, set a avatar, title picture or a signature.
  • Hi,

    I'm trying to call a method when someone adds an item to the inventory or removes it.
    Can someone give me a hint what I'm doing wrong?

    Thanks in advance.

    [ICODE]Inventory.OnChanged.Add( new Action<User>( test ) );
    ...
    public void test( User user )
    {
    user.Player.SendTemporaryMessage( FormattableStringFactory.Create( "tttttttttttttttttttt" ), Eco.Shared.Services.ChatCategory.Default );
    }
    [/ICODE]

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!