1. My code looks like this right now ( yeah I just started with writing C# :D ):

    Code:
    void OnPlayerInit(BasePlayer player)
            {
                button.onClick.AddListener(() => DoSomething(player, 1));            CommunityEntity.ServerInstance.ClientRPCEx( new Network.SendInfo() { connection = player.net.connection }, null, "AddUI", json.Replace("{something}", "Hi") );
            }
           
            public void DoSomething(BasePlayer player, int number)
            {
               // follow <.<
            }
    at the error message is:
    Code:
    [Oxide] 2:27 PM [Debug]   at Oxide.Plugins.DoSomething.OnPlayerInit  (.BasePlayer player, System.String cmd, System.String[] args) [0x00000] in <filename unknown>:0
      at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
      at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
    I just figured out I could be with the player object. I really don't know how to check which player clicked which button to give this info to another function to set it then in the storedData ( < that's not the problem ).
     
  2. Can you show me how "button" is declared, please?

    I've not looked at the Community UI in too much detail yet, but the impression I got was client side buttons just ran console commands - therefore there'll be no "onClick" on the server.