1. zombishe

    zombishe Naked Wanderer

    1) How to run commands in the console on the client?
    2) How get automatically admin right on login to game?
     
  2. Wulf

    Wulf Community Admin Community Admin Oxide Developer

  3. zombishe

    zombishe Naked Wanderer

  4. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    I don't know off hand, you may need to dig around in the DLL.
     
  5. zombishe

    zombishe Naked Wanderer

    Its work
    Code (Text):

    private void OnPlayerConnected(PlayerInfos player)
    {
                if (player != null && player.connected)
                {

                     if(player.NetPlayer.ipAddress.ToString() == "#admin_ip#" && player.Nickname == "#admin_nick#" && player.account_id.ToString() == "#admin_STEAM_ID#") {
                     Puts("ADMIN LOGIN!");
                     player.isADMIN = true;
                }
        }
    }
    But i want run console command on the client side "mode 1", "mode 2", "mode 3" after give admin rights...
     
  6. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    Why do they need to be ran on the client? Couldn't you use them on the server itself?
     
  7. zombishe

    zombishe Naked Wanderer

    What is the equivalent of the server instruction of client console command "mode 1"?
     
  8. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    If you are talking about the modes like fly, invincible, etc., you can just set them on the player directly.

    playerInfos.mode_FLY= true;
    playerInfos.mode_INVINCIBLE = true;
    playerInfos.mode_INVISIBLE = true;

    ...
     
    zombishe likes this.
  9. zombishe

    zombishe Naked Wanderer

    Worked! TNX!