UnityEngine.NeworkView.RPC is obsolate ?!?!

Sup guys after a long time i decided to update my game … i got new version and all this line makes me crazy

hit.transform.root.GetComponent<NetworkView>().RPC("ApplyDamage", RPCMode.AllBuffered, Random.Range(damageMin, damageMax), 2);

and got some networking problems server’s wont show to my friends
i am trying to make it non LAN
if anyone up to help me thanks

   void OnGUI()
    {
        if (!Network.isServer && !Network.isClient)
        {
            GUI.Box(new Rect(20 * dif, 20 * dif, 200 * dif, 200 * dif), "");
            GUILayout.BeginArea(new Rect(25 * dif, 25 * dif, 190 * dif, 190 * dif));
            gameName = GUILayout.TextField(gameName);
            if (GUILayout.Button("Start Server"))
            {
                Network.InitializeSecurity();
                Network.InitializeServer(17, 25001, /*!Network.HavePublicAddress()*/ true);
                MasterServer.RegisterHost(uniqueGameName, gameName);
            }
            if (GUILayout.Button("Quit"))
            {
                Application.Quit();
            }
            if (GUILayout.Button("Direct Connect"))
            {
                Network.Connect("127.0.0.1", 25001);
            }
            GUILayout.EndArea();
            GUI.Box(new Rect(Screen.width - 400 * dif, 0, 400 * dif, Screen.height), "");
            GUILayout.BeginArea(new Rect(Screen.width - 400 * dif, 0, 400 * dif, Screen.height));
            GUILayout.Label("Avaiable Servers: " + datas.Length);
            scroll = GUILayout.BeginScrollView(scroll);
            foreach (HostData data in datas)
            {
                GUILayout.BeginHorizontal();
                GUILayout.Label(data.gameName + " Players: " + data.connectedPlayers + " / " + data.playerLimit);
                if (GUILayout.Button("Connect"))
                {
                    Network.Connect(data);
                }
                GUILayout.EndHorizontal();
            }
            GUILayout.EndScrollView();
            GUILayout.EndArea();
        }
    }
}

NetworkView is part of the old networking system. It’s been replaced by UNet.

You can either upgrade the whole project to the new network system. Or you can stay with an older version of Unity.

can you help me replace just the first one … RPC i will do other myself