It's something wrong here? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: It's something wrong here? (
/showthread.php?tid=652933)
It's something wrong here? -
FaLLenGirL - 22.04.2018
Hello there, someone from my server told me that the
Auto Login it doesn't work anymore.
I left this feature in good shape. Everything worked when i tested or when i made it.
Now, i haven't checked anymore this
Auto Login because there was no problem with it untill now.
I haven't worked at this feature or changed something that contains auto login. I will show you my code and please tell me your opinion about it:
PHP код:
-> This code is on "public OnPlayerRequestClass( playerid, classid )"
because i want that the dialog to appear here.
if( PlayerInfo[ playerid ][ p_first_login ] == 0 )
{
new query[ 2000 ];
format( query, sizeof( query ), "SELECT * FROM `Accounts` WHERE `Name` = '%s'", PlayerName( playerid ) );
mysql_pquery( database, query, "OnAccountCheck", "d", playerid );
PlayerInfo[ playerid ][ p_first_login ] = 1;
}
PHP код:
function OnAccountCheck( playerid )
{
eString[ 0 ] = EOS;
gAccountCheck[ playerid ] = true;
new Rows, pField[ 20 ];
cache_get_row_count( Rows );
if( Rows )
{
cache_get_value_name( 0, "IP", pField, 20 );
cache_get_value_int( 0, "AutoLogin", PlayerInfo[ playerid ][ p_auto_login ] );
if( !strcmp( GetPlayerIPEx( playerid ), pField, true ) && PlayerInfo[ playerid ][ p_auto_login ] == 1 )
{
new query[ 2000 ];
format( query, sizeof( query ), "SELECT * FROM `Accounts` WHERE `Name` = '%s'", PlayerName( playerid ) );
mysql_pquery( database, query, "OnLoginDone", "d", playerid );
}
else
{
// Login Dialog
}
}
else
{
// Register Dialog
}
return 1;
}
Re: It's something wrong here? -
FaLLenGirL - 24.04.2018
This problem has been
solved on
10.05.2018, there was a problem with the update of the Player IP.