Multiple multiplayer controllers

I am trying to make an online multiplayer game, but have hit a block. It appears that I don’t have a way of differentiating between players online, causing very buggy control of both players from once computer. I use two codes. A connection one

var remoteIP = "127.0.0.1";
var remotePort = 25000;
var listenPort = 25000;
var useNAT = false;
var yourIP = "";
var yourPort = "";
function OnGUI () 
{
    // Checking if you are connected to the server or not
    if (Network.peerType == NetworkPeerType.Disconnected)
        {
            // If not connected

            if (GUI.Button (new Rect(10,10,100,30),"Connect"))
            {
                ConnectToServer();
            }
            if (GUI.Button (new Rect(10,50,100,30),"Start Server"))
            {

                LaunchServer();
            }

        // Fields to insert ip address and port 
        remoteIP = GUI.TextField(new Rect(120,10,100,20),remoteIP);
        remotePort = parseInt(GUI.TextField(new 
        Rect(230,10,40,20),remotePort.ToString()));
        }
    else
    {
        // Getting your ip address and port
        ipaddress = Network.player.ipAddress;
        port = Network.player.port.ToString();

        GUI.Label(new Rect(140,20,250,40),"IP Adress: "+ipaddress+":"+port);
        if (GUI.Button (new Rect(10,10,100,50),"Disconnect"))
        {
            // Disconnect from the server
            Network.Disconnect(200);
        }
    }
}

function OnConnectedToServer () 
{
    // Notify our objects that the level and the network are ready
    for (var go : GameObject in FindObjectsOfType(GameObject))
    go.SendMessage("OnNetworkLoadedLevel", 
    SendMessageOptions.DontRequireReceiver);  
}
function LaunchServer () 
{
    var useNat = !Network.HavePublicAddress();
    Network.InitializeServer(32, 25000, useNat);
}

function ConnectToServer () 
{
    Network.Connect(remoteIP, 25000);
}

And a spawning one

var Player : Transform;
var camera1 : Camera;
function OnNetworkLoadedLevel () 
{
    camera1.enabled = false;
    // Instantiating Player when Network is loaded
    Network.Instantiate (Player, Vector3 (Random.Range (5, 995), 500, Random.Range (5, 995)), transform.rotation, 0);
}

function OnPlayerDisconnected (player : NetworkPlayer) 
{
    Network.RemoveRPCs(player, 0);
    Network.DestroyPlayerObjects(player);
    camera1.enabled = true;
}

Now, there’s a lot of stuff, so I don’t expect an answer that perfectly solves it, but I would appreciate any help you can offer.

those scripts don’t matter much, the problem is in the controller script. you have to check if the networkview belongs to the player and enable/disable the controller scripts

The networkview belongs to the player. So what do I do?

no, not all networkviews belong to the same player, for each player in the scene you need to check if the networkview belongs to himself or not and only enable the movement script when it does. Disable all the others that don’t belong to the player.
when i talk about player, i talk about a player instance in the scene and not you.

Well, the characters themselves are spawned when logging in. How do I change it then? I am simply spawning a prefab.

if you don’t understand what i explained you, you need to read the docs or hire someone to help you.

Ok, I’ll go do that.