I can't register
#1

I type my password and press enter but nothing happend
it not show DIALOG_SEX
Код:
if(dialogid == DIALOG_REGISTER)
	{
		if(!response) {
			Kick(playerid);
		}
		else {
			if(strlen(inputtext) < 5) 
            { 
                SendClientMessage(playerid, COLOR_RED, "Mat Khau Phai Hon 5 Ki Tu.");
                ShowMainMenuDialog(playerid, 2);
                //return ShowPlayerDialog(playerid, RegisterDialog, DIALOG_STYLE_INPUT, "Register", "Welcome player!\nYour account has not been registered yet. Please fill in your desired password:", "Register", "Quit"); 
            } 
	        else 
	        {
	            new query[512], playername[MAX_PLAYER_NAME], playerip[16];                 
	            GetPlayerName(playerid, playername, sizeof(playername)); 
	            GetPlayerIp(playerid, playerip, sizeof(playerip)); 
	            WP_Hash(Player[playerid][Password], 129, inputtext); 
	            mysql_format(mysql, query, sizeof(query), "INSERT INTO `accounts` (`Name`, `Password`, `IP`, `Level`, `Admin`, `Vip`, `Money`, `Token`, `PosX`, `PosY`, `PosZ`, `PosA`) VALUES ('%e', '%e', '%e', 1, 0, 0, 500, 0, 1.00000, 1.00000, 1.00000, 1.00000)", playername, Player[playerid][Password], playerip); 
	            mysql_tquery(mysql, query, "OnAccountRegister", "i", playerid);
	        }
		}
	}
Код:
forward OnAccountRegister(playerid); 
public OnAccountRegister(playerid) 
{ 
    Player[playerid][ID] = cache_insert_id(); 
    printf("[Dang Ky Moi] Tai Khoan Moi. Database ID: [%d]", Player[playerid][ID]); 

    TogglePlayerSpectating(playerid, 1); 
    ShowPlayerDialog(playerid, DIALOG_SEX, DIALOG_STYLE_LIST, "{COLOR_RED}Gioi Tinh Cua Ban La Gi ?", "Nam\nNu", "Dong Y", "Huy");
    //SetSpawnInfo(playerid, 0, 23, 1.00000, 1.00000, 1.00000, 1.00000, 0, 0, 0, 0, 0, 0); 
    //SpawnPlayer(playerid); 
    return true; 
}
Код:
stock ShowMainMenuDialog(playerid, frame)
{
	new titlestring[64];
	new string[512];

	switch(frame)
	{
		case 1:
		{
			format(titlestring, sizeof(titlestring), "{3399FF}Dang Nhap - %s", GetPlayerNameEx(playerid));
			format(string, sizeof(string), "Nhap Mat Khau De Dang Nhap : %s", GetPlayerNameEx(playerid));
			ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,titlestring,string,"Dang Nhap","Thoat");
		}
		case 2:
		{
			format(titlestring, sizeof(titlestring), "{3399FF}Dang Ky - %s", GetPlayerNameEx(playerid));
			format(string, sizeof(string), "Nhap Mat Khau De Dang KY : %s", GetPlayerNameEx(playerid));
			ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_PASSWORD,titlestring,string,"Dang Ky","Thoat");
		}
		case 3:
		{
			format(titlestring, sizeof(titlestring), "{3399FF}Dang nhap - %s", GetPlayerNameEx(playerid));
			format(string, sizeof(string), "Mat Khau Khong Hop Le!\nNhap Mat Khau De Dang Nhap : %s",GetPlayerNameEx(playerid));
			ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,titlestring,string,"Dang nhap","Thoat");
		}
	}
}
Reply
#2

Hello!

Do you get this print in your server.log?
PHP код:
printf("[Dang Ky Moi] Tai Khoan Moi. Database ID: [%d]"Player[playerid][ID]); 
Reply
#3

Quote:
Originally Posted by Mencent
Посмотреть сообщение
Hello!

Do you get this print in your server.log?
PHP код:
printf("[Dang Ky Moi] Tai Khoan Moi. Database ID: [%d]"Player[playerid][ID]); 
it not show too
Reply
#4

Can you show us your mysql log, please? Maybe you have some errors / warnings there.
Reply
#5

Quote:
Originally Posted by Mencent
Посмотреть сообщение
Can you show us your mysql log, please? Maybe you have some errors / warnings there.
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3.7-R2, ©2005-2015 SA-MP Team

[22:24:39] filterscripts = "" (string)
[22:24:39]
[22:24:39] Server Plugins
[22:24:39] --------------
[22:24:39] Loading plugin: mysql
[22:24:40] >> plugin.mysql: R39-6 successfully loaded.
[22:24:40] Loaded.
[22:24:40] Loading plugin: whirlpool
[22:24:40]
[22:24:40] ==================
[22:24:40]
[22:24:40] Whirlpool loaded
[22:24:40]
[22:24:40] ==================
[22:24:40]
[22:24:40] Loaded.
[22:24:40] Loading plugin: streamer
[22:24:40]

*** Streamer Plugin v2.6.1 by Incognito loaded ***

[22:24:40] Loaded.
[22:24:40] Loading plugin: sscanf
[22:24:40]

[22:24:40] ===============================

[22:24:40] sscanf plugin loaded.

[22:24:40] © 2009 Alex "******" Cole

[22:24:40] 0.3d-R2 500 Players "dnee"

[22:24:40] ===============================

[22:24:40] Loaded.
[22:24:40] Loaded 4 plugins.

[22:24:40]
[22:24:40] Filterscripts
[22:24:40] ---------------
[22:24:40] Loaded 0 filterscripts.

[22:24:40] [MySQL] Ket Noi Thanh Cong!
[22:24:40] TextDraw Loaded!
[22:24:40] Number of vehicle models: 0
[22:25:02] [connection] 127.0.0.1:57468 requests connection cookie.
[22:25:03] [connection] incoming connection: 127.0.0.1:57468 id: 0
[22:25:04] [join] Hoang_Thien has joined the server (0:127.0.0.1)
[22:25:31] [part] Hoang_Thien has left the server (0:1)
Reply
#6

That's the server.log but I need the mysql.log.
It should be in the main folder or don't you have this log?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)