я поставил себе на сервер GleekoMultiplayer ,там только регистрация ,а ников нет .помогите вот скрипт -ConnectMS(javascript)
//script to connect master server //var choicePerson : int; public var pass: String = "Password"; public var user : String = "Username"; public var Gname : String = "Game Name"; //set game Name public var Com : String = "comment"; //set comment public var Numplayer : int; public var numpl = "30"; //set number of player private var ix = 0; public var level : int;
var IPServer = "127.0.0.1"; var IPServ = ""; var url = "http://localhost/scripts/get.php";
function OnLevelWasLoaded (level : int) {
if (level == 1) ix = 2;
}
//menu function OnGUI() { if (ix != 1 && ix != 2){ //first screen
if (GUI.Button(Rect(Screen.width-125, Screen.height-50, 100, 30),"Next")) { //go on the second screen var go = GameObject.Find("NameRecive"); go.SendMessage ("Namesend", user);
HandleLogin(user, pass); ix = 1;
} }
//second screen if (ix==1){
if (ix != 2){ if (GUI.Button(Rect(Screen.width-125, Screen.height-50, 100, 30),"Back")) {
ix = 0; } }
GUI.Box(Rect(Screen.width - 500,40,460,400),"List of servers");
//-------------------------------- Master Server -------------------------------------------
var data: HostData[] = MasterServer.PollHostList(); //register if (Network.peerType == NetworkPeerType.Disconnected){
Gname = GUI.TextField (Rect (Screen.width - 490,60,150,20), Gname, 25); //set game Name Com = GUI.TextField (Rect (Screen.width - 330,60,150,20), Com, 25); //set comment numpl = GUI.TextField (Rect (Screen.width - 175,60,20,20), numpl, 2500); //set max number of player
var Numplayer: int = System.Int32.Parse(numpl); //var myInt : int = System.Convert.ToInt32(levelToLoad);
if (GUI.Button (Rect (Screen.width - 150,50,100,30), "Start Server")){ // Use NAT punchthrough if no public IP present var useNat = !Network.HavePublicAddress(); Network.InitializeServer(Numplayer, 25002, useNat); MasterServer.RegisterHost("GleekoMultiplayer", //change the name of the game on your own Gname, Com);
if (GUI.Button(Rect (Screen.width - 150,50+h,100,30),"Connect")) { // Connect to HostData struct, internally the correct method is used (GUID when using NAT). Network.Connect(element); LoadLevels(); }
GUILayout.EndHorizontal(); }
}
if (Network.peerType == NetworkPeerType.Disconnected) GUILayout.Label("Not Connected"); else if (Network.peerType == NetworkPeerType.Connecting) GUILayout.Label("Connecting"); else GUILayout.Label("Network started");
} }
function Awake() { // Make sure list is empty and request a new list MasterServer.ClearHostList(); MasterServer.RequestHostList("GleekoMultiplayer"); //also change name one more }
//----------------------------------end of master server--------------------------------------------------------------------
//this may be begin of You function for conect to MySQL base on the site, with login and pass function HandleLogin(username: String, password: String) {
var form = new WWWForm(); form.AddField("Username", username); form.AddField("Password", password); var login = new WWW(url, form); yield login;
// React to login, check for errors, etc. }
//set delay for load level function LoadLevels() { yield WaitForSeconds (3); Application.LoadLevel(1); }
А в самой теме глико что нельзя спросить. Там наверное сам автор быстрее ответит. Воще по нормальному там вопросы задавай. А что такое я поставуил себе на сервер - там только регистрация - я воше не понимаю. В глико никакой регистрации нет. И тут я отвечать не буду. Нет Бога кроме Аллаха и Ларс фон Триер пророк Его. И он также участник клуба GCC