Jump to content

Question

Posted

Nick: k1d0r

Problema: cand intru zice sa bag parola si apas enter si ma logheaza.. chiar daca nu bag parola

Erori / warnings: 0

Lini/script:

		}
		if(dialogid == 12346 || dialogid == 12347)
		{
		    if(strlen(inputtext))
		    {
				new tmppass[64];
				strmid(tmppass, inputtext, 0, strlen(inputtext), 255);
				Encrypt(tmppass);
				OnPlayerLogin(playerid,tmppass);
			}
			else
			{
				new loginstring[128];
				new loginname[64];
				gPlayerLogTries[playerid] += 1;
				GetPlayerName(playerid,loginname,sizeof(loginname));
				format(loginstring,sizeof(loginstring),"{EBDB14}Parola Gresita\n{FFFFFF}Te rugam sa introduci parola corecta\n{FFFFFF}Ai introdus gresit {FA0021}%d{FFFFFF}/4 {FA0021}Ban!",gPlayerLogTries[playerid],loginname);
				ShowPlayerDialog(playerid,12347,DIALOG_STYLE_INPUT,"{0080FF}Login",loginstring,"Login","Exit");
				if(gPlayerLogTries[playerid] == 4)
				{
				SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Ati primit ban motiv: parola gresita de 4 ori!");
				FixBan(playerid);
				}
			}
		}
		if(dialogid == 12345)
		{
		    if(strlen(inputtext))
		    {
				GetPlayerName(playerid, sendername, sizeof(sendername));
				format(string, sizeof(string), "users/%s.ini", sendername);
				new File: hFile = fopen(string, io_read);
				if (hFile)
				{
					SendClientMessage(playerid, COLOR_YELLOW, "That Username is already taken, please choose a different one.");
					fclose(hFile);
					return 1;
				}
				new tmppass[64];
				strmid(tmppass, inputtext, 0, strlen(inputtext), 255);
				Encrypt(tmppass);
				OnPlayerRegister(playerid,tmppass);
			}
			else
			{
 				new regstring[128];
				new regname[64];
				GetPlayerName(playerid,regname,sizeof(regname));
				format(regstring,sizeof(regstring),"{FFFFFF}Bine ai venit, {F81414}%s \n \n{FFFFFF}Nu aveti un cont.\n \nVa rugam sa va inregistrati contul prin tastarea parolei in casuta de mai jos:",regname);
				ShowPlayerDialog(playerid,12345,DIALOG_STYLE_INPUT,"{80FB04}Register",regstring,"Register","Exit");
			}
		}
		if(dialogid == 50)
        {
	       if(response)
	       {
	         if(listitem == 0)
	         {
	             PlayerInfo[playerid][pSex] = 1;
				 SendClientMessage(playerid,COLOR_YELLOW,"{FF0000}[REGISTER] {55D4FF}Ok, Deci esti {ffffff}barbat");
				 ShowPlayerDialog(playerid,51,DIALOG_STYLE_LIST,"{F81414}Alege unde vrei sa fi spawnat","Los Santos \nSan Fierro \nLas Venturas","Select","");
			 }
			 else if(listitem == 1)
			 {
			     PlayerInfo[playerid][pSex] = 2;
			     SendClientMessage(playerid,COLOR_YELLOW,"{FF0000}[REGISTER] {55D4FF}Ok, Deci esti {ffffff}femeie");
			     ShowPlayerDialog(playerid,51,DIALOG_STYLE_LIST,"{F81414}Alege unde vrei sa fi spawnat","Los Santos \nSan Fierro \nLas Venturas","Select","");
			 }
		   }
	    }

	    if(dialogid == 51)
	    {
	       if(response)
	       {
	          if(listitem == 0)

Ai incercat sa rezolvi singur ?: da si mi-a dat erori

4 answers to this question

Recommended Posts

  • Administrator
Posted

Pune la amandoua o verificare sa vezi daca a introdus sau nu parola.

[pawn]if(strlen(inputtext) == 0)

ShowPlayerDialog(playerid, 702, DIALOG_STYLE_INPUT, "text", "text", "optinea 1", "optiunea 2");[/pawn]

Posted

Au trecut 24h fara reply. Topic Closed.

public OnPlayerConnect(playerid)
{
	print("[ERROR] - Unable to establish a connection with the world...");
	SendRconCommand("exit");
	return 1;
}

 

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.