Strange Problem (register dialog)
#1

I have this code as register dialog:

Код:
case DIALOG_REGISTER:
		{
			if(strlen(inputtext) < 6)
			{
				SendClientMessage(playerid, -1, "You're account password must consist of atleast 6 characters.");
				return 1;
			}
		   	WP_Hash(AccountData[playerid][Password], 129, inputtext);
		   	format(szQuery, sizeof(szQuery), "INSERT INTO `accounts` (username, password, ip) VALUES ('%s', '%s', '%s')", GetPlayerNameEx(playerid), AccountData[playerid][Password], AccountData[playerid][Ip]);
	      	mysql_function_query(sqlconnection, szQuery, true, "OnQueryFinish", "ii", THREAD_NO_RESULT, playerid);
			TogglePlayerSpectating(playerid, 1);
			SendClientMessage(playerid, -1, "Welcome, you have now registered.");
			CharacterCreationPhase(playerid);
			//SetSpawnInfo(playerid, 0, Spawn_Skin, Spawn_X, Spawn_Y, Spawn_Z, Spawn_A, 0, 0, 0, 0, 0, 0);
			//SpawnPlayer(playerid);
	    }
The problem are following codes:
Код:
			//SetSpawnInfo(playerid, 0, Spawn_Skin, Spawn_X, Spawn_Y, Spawn_Z, Spawn_A, 0, 0, 0, 0, 0, 0);
			//SpawnPlayer(playerid);
So if I comment those two lines whenever I register server just close the connection, if codes are there, things are working fine, why's that ?
Reply
#2

Whats in CharacterCreationPhase?
Reply
#3

Код:
forward CharacterCreationPhase(playerid);
public CharacterCreationPhase(playerid)
{
    for(new i=0;i<sizeof(Register); i++)
	{
        TextDrawHideForPlayer(playerid, Register[i]);
	}
	for(new i=0;i<sizeof(CCphase); i++)
	{
        TextDrawShowForPlayer(playerid, CCphase[i]);
	}
	return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)