Jump to content
  • 0

Problema Last Login


Gabriel19

Question

  Nu imi apare ultima logare 78617026561596095259.png

public OnPlayerRequestClass(playerid, classid)
{
	if (RegistrationStep[playerid] == 0 && gPlayerLogged[playerid] != 1)
	{
		if (gPlayerAccount[playerid] != 0)
		{
			gPlayerAccount[playerid] = 1;
			new loginstring[500];
			new loginname[64];
			GetPlayerName(playerid,loginname,sizeof(loginname));
			new lastlogin[64];
			lastlogin = PlayerInfo[playerid][pLastLogin];
			format(loginstring,sizeof(loginstring),"{BECBFC}Welcome back, {95A3FF}%s{BECBFC}!\n\nPlease enter your password below to login to your account. \n\n{FFFFFF}* Last Login: %s *",loginname,lastlogin);
			ShowPlayerDialog(playerid,12346,DIALOG_STYLE_INPUT,"Login",loginstring,"Login","Exit");
		}
		else
		{
			gPlayerAccount[playerid] = 0;
			new regstring[256];
			new regname[64];
			GetPlayerName(playerid,regname,sizeof(regname));
			format(regstring,sizeof(regstring),"{BECBFC}Welcome, {95A3FF}%s{BECBFC}! \n\nThis name is not registered so please register with entering a password below.\n\n{C11B17}You should choose a strong password, between 6 and 32 characters.",regname);
			ShowPlayerDialog(playerid,12345,DIALOG_STYLE_INPUT,"Register",regstring,"Register","Exit");
		}

   		SetPlayerCameraPos(playerid, 1230.90, -1287.72, 254.17);
  		
	}
	return 1;
}

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

Ai mod GF?

Modul GF foloseste cam acelasi( asemanator ) system de admin ca, cum ii ladmin.

Incearca sa pui:

new LastLogin[ 256 ];
if ( dUserINT( PlayerName2( playerid ) ).( "LastOn" ) == 0 ) LastOnline = "Never"; else LastOnline = dini_Get( file, "LastOn" );
Cam unde vrei tu dupa gPlayerAccount... Si dupa aia schimbi:
format(loginstring,sizeof(loginstring),"{BECBFC}Welcome back, {95A3FF}%s{BECBFC}!\n\nPlease enter your password below to login to your account. \n\n{FFFFFF}* Last Login: %s *",loginname,LastLogin);

PS. - Last login ii ca si un string:P Nu-l poti extrage printr-o variabila:P

Fara reclama in semnatura!

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.