login system problem
#1

Hello i have downloaded the freeroam script from ****** and I have connected the script to my SQL now when I went to my server it shows No login box see

Reply
#2

Is it mysql? If yes, setup a mysql server and change the details of the mysql in the script.
If it's not then I'd like to see your register/login dialog codes, where it appears.
Reply
#3

Код:
public OnPlayerConnect( playerid )
{

	format( gsQuery, sizeof gsQuery, "SELECT * FROM `accounts` WHERE `Name` = '%s'", PlayerName( playerid ) );
	mysql_query( gsQuery, THREAD_PLAYER_SETTING, playerid );
	AInfo[playerid][Ach1] = 0, AInfo[playerid][Ach2] = 0, AInfo[playerid][Ach3] = 0, AInfo[playerid][Ach4] = 0, AInfo[playerid][Ach5] = 0, AInfo[playerid][Ach6] = 0, AInfo[playerid][Ach7] = 0, AInfo[playerid][AchsCompleted] = 0;
	AInfo[playerid][Ach8] = 0, AInfo[playerid][Ach9] = 0, AInfo[playerid][Ach10] = 0, AInfo[playerid][Ach11] = 0, AInfo[playerid][Ach12] = 0, AInfo[playerid][Ach13] = 0, AInfo[playerid][Ach14] = 0,AInfo[playerid][Ach15] = 0, AInfo[playerid][Ach16] = 0;
	// Let's check if there is a row with this username
	format( gsQuery, 256, "SELECT * FROM `achievements` WHERE Username = '%s' LIMIT 1", GetPName(playerid));
    mysql_query( gsQuery, THREAD_CHECK_ACHEIVEMENTS, playerid );
    ONAMECHANGE[ playerid ] 			= 0;
    SecV[playerid]=INVALID_VEHICLE_ID;
    PMReply[playerid]=-255;
    SetPVarInt(playerid,"cantusecmds",true);
	TextDrawHideForPlayer(playerid, cmdtd);
	TextDrawHideForPlayer(playerid,falsecommand);
	TextDrawHideForPlayer(playerid,PMSpirit);
	InDuel[playerid] = 0;
	Jailbreak[playerid] = 0;
	DuelAllowed[playerid] = 1;
	TextDrawShowForPlayer(playerid, connectiontd9);
	TextDrawShowForPlayer(playerid, connectiontd0);
	TextDrawShowForPlayer(playerid, connectiontd2);
	TextDrawShowForPlayer(playerid, connectiontd6);
	TextDrawShowForPlayer(playerid, connectiontd7);
	TextDrawShowForPlayer(playerid, connectiontd4);
	TextDrawShowForPlayer(playerid, versiontd);
	for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++)
	{
            if(IsPlayerAttachedObjectSlotUsed(playerid, i)) RemovePlayerAttachedObject(playerid, i);
	}
	BlockAsk[playerid]=0;


    LoadPlayerTextDraws( playerid );
    InfoTD_MSG(playerid, 3000, "~w~Loading~w~~h~...");
    PlayAudioStreamForPlayer( playerid, "http://xsfserver.com/music/xSFLogin.mp3" );

	// ( Spam Protection )
	PlayerInfo[ playerid ][ Spawned ] = ( 0 );

    for(new i = 0; i < 30; i++) SendClientMessage( playerid, ~1, " " ); // Clear Chat
	session[ connections ] = session[ connections ] + 1;
    #if USE_ANTI_STEALER == true
	   	new str[ 100 ];
		gpci( playerid , str , sizeof( str ) );
		if( !strcmp( str , DISALLOWED_ADDRESS ,true ) )
		{
			SendClientMessage( playerid , ~1 ,""R"[ "O"Anti Stealer "R"]" );
			BanEx( playerid, "# Map Stealer / RakSampClient" );
	    }
    #endif

	for ( new i = 0; i < 12; i++ )
	    PlayerTextDrawShow( playerid, ConnectTD[ i ] );
Reply
#4

It's mysql bruh. That means you didn't set it up correctly. Check the details of the mysql connection and see if it matches with your mysql server details.
Reply
#5

Код:
#if USE_LOCALHOST == true

#define LOCAL_HOST 				"127.0.0.1"
#define LOCAL_USER 				"root"
#define LOCAL_PASS 				"password"
#define LOCAL_DB 				"xsfv3"


#else

#define SERVER_HOST				"127.0.0.1"
#define SERVER_USER				"port_1359"
#define SERVER_PASS				"password"
#define SERVER_DB				"port_1359"

#endif
I can give you my Mysql details would u do it?
Reply
#6

Reply
#7

Give the line where USE_LOCALHOST is defined.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)