1. Hi guys, I'm new to creating plugins and I am trying to make something simple for now that outputs to the console when admin has logged in/ auth level 2. This doesn't seem to work can I have some advice please :)!

    Code:
            void OnPlayerConnected(BasePlayer player)
            {
                   Puts("OnPlayerConnected works!");
                if(UserHasPermission(player, "2"))
                {
                    Puts("Admin Logged In!");
                }
            }
    THE ERROR -

    Code:
    PlayersOnlineGui.cs(125,7): error CS0103: The name `UserHasPermission' does not exist in the current context
     
  2. Wulf

    Wulf Community Admin

    You're trying to mix Oxide functions (although not calling it right) with Rust's auth level, which won't work.

    If you want to check the auth level, you should instead be comparing player.net.connection.authLevel.
     
  3. Thanks Wulf, I have fixed it now.