Why is this not working?
#1

Код:
script CheckingAccount(playerid)
{
	CC(playerid, 10);
	InterpolateCameraPos(playerid, 1804.1313,-1732.0179,21.7294, 1037.3715,-1732.7358,25.2859, GetSeconds(60), CAMERA_MOVE);
	InterpolateCameraLookAt(playerid,1441.6654,-1732.0317,18.0373,1037.3715,-1732.7358,25.2859, GetSeconds(60), CAMERA_MOVE);
	new rows, fields;
	cache_get_data(rows, fields, mysql);
	if(rows)
	{
		LoginSeconds[playerid] = 60;
	    LoginTimer[playerid] = SetTimerEx("LoginRemains", 1000, true, "i", playerid);
	    //INT
		PlayerInfo[playerid][pID] = cache_get_field_content_int(0, "ID");
		PlayerInfo[playerid][pLevel] =	cache_get_field_content_int(0, "Level");
		//STRING
		cache_get_field_content(0, "Password", PlayerInfo[playerid][pPassword], mysql, 150);

		format(str,sizeof(str), "{FFFFFF}Welcome to the MySQL Server,\nPlease enter your password below!\nYou have {cc2a36}60{FFFFFF} seconds left to login. ");
		ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"SERVER: {FFFFFF}LOGIN",str,"Proceed","Quit");
	}
	else
	{
		format(str,sizeof(str), "{FFFFFF}Welcome to the MySQL Server,\n\nYou can register this account.\nPlease enter a password below!");
		ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"SERVER: {FFFFFF}REGISTER",str,"Proceed","Quit");
	}

}

public OnPlayerConnect(playerid)
{
	PlayerInfo[playerid][pLogged] = 0;
	SetPlayerColor(playerid, COLOR_GREY);
	new query[256], name[MAX_PLAYER_NAME];
	TogglePlayerSpectating(playerid, 1);
	GetPlayerName(playerid, name, MAX_PLAYER_NAME);
	GetPlayerName(playerid, Nickname[playerid], MAX_PLAYER_NAME);
	mysql_format(mysql, query, sizeof(query),"SELECT * FROM `Accounts` WHERE `Username` = '%e'", name);
	mysql_tquery(mysql, query, "CheckingAccount", "i", playerid);
	return 1;
}
Reply
#2

i dont see anything wrong in this code could u make a debug report using crash detector ?
Reply
#3

Give more info, what is even wrong?
Reply
#4

Nothing shows up, but I don't need that anymore, I changed it. thanks anyway, if you can solve my wampserver problem from other topic would be great
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)