clientCmdSetAdminLevel takes one argument, and sets the value of $IAmAdmin to that argument. Client-side scripts can then use this variable to check if your an admin,for example, if you try to load bricks, and it $IAmAdmin is 0, it will it will open the gui for putting in the admin password, otherwise it will open the load gui.
Don't know about the rest.