Jump to content
  • 0

Login & Intrebare


Deejaybwg

Question

Cand intru pe server, ma inregistrez, imi cere o parola. Pun parola, apoi imi zice sa scriu o intrebare de ex: mavezi. Apoi scriu intrebarea, si trebuie si raspuns.

Cand un player intra cu numele meu, acolo la "intrebarea: mavezi" ii cere raspunsul, dar intrebarea O ARATA.

Cum fac sa-mi ceara doar parola, nu si intrebarea si raspunsul ? Ca daca nu mai stiu parola, daca zic raspunsul la intrebare ma logheaza.. (pe playerul care intra cu numele meu)

:undecided:

Si as vrea sa scot intrebarea si raspunsul, sa-mi ceara doar PAROLA !

www.youtube.com/thebwgg

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

Era pus:

#define MAX_FAIL_LOGINS
Si am pus:
#define MAX_FAIL_LOGINS 2
Dar eu vreau sa nu imi trebuiasca intrebarea si raspunsul pentru login sau pentru register. Cand ma loghez/inregistrez sa-mi ceara o parola si atat. Fara sa trebuiasca sa pun o intrebare si raspunsul.. Cred ca de aici este chestia cu intrebarea si reaspunsul:
if (dialogid == DIALOGID+68)
	{
 		if(response == 0 && ServerInfo[MustRegister] == 1)
		{
			Kick(playerid);
		}
 		if(response)
	    {
			if (strlen(inputtext) < 4 || strlen(inputtext) > 20)
			{
				new rstring[256];
				format(rstring,256,"Sorry %s\n\nThe length of your password should contain more \nthan 3 characters and less than 20 characters! \n\n Please, re-enter the Password:",pName(playerid));
				return ShowPlayerDialog(playerid,DIALOGID+68,DIALOG_STYLE_INPUT,"Register Error!",rstring,"Register","Quit");
			}
   			if (udb_Create(PlayerName2(playerid)))
			{
			    ShowPlayerDialog(playerid,DIALOG_TYPE_QUESTION,DIALOG_STYLE_INPUT,"LuxAdmin - Account Safety Question","Type a security question, for when you forget\n your password, you just answer this Question.","Next","End");
	     		new file[256],name[MAX_PLAYER_NAME], buf[145],tmp3[100];
	    		new strdate[20], year,month,day;
				getdate(year, month, day);
	        	WP_Hash(buf, sizeof(buf), inputtext);
				GetPlayerName(playerid,name,sizeof(name));

				format(file,sizeof(file),"/LuxAdmin/Accounts/%s.sav",udb_encode(name));
	     		GetPlayerIp(playerid,tmp3,100);
	     		dini_Set(file,"Password",buf);
		    	dini_Set(file,"Ip",tmp3);
			    dUserSetINT(PlayerName2(playerid)).("Registered",1);
		   		format(strdate, sizeof(strdate), "%d/%d/%d",day,month,year);
				dini_Set(file,"RegisteredDate",strdate);
				dUserSetINT(PlayerName2(playerid)).("Loggedin",1);
				dUserSetINT(PlayerName2(playerid)).("Banned",0);
				dUserSetINT(PlayerName2(playerid)).("Level",0);
				dUserSetINT(PlayerName2(playerid)).("AccountType",0);
			    dUserSetINT(PlayerName2(playerid)).("LastOn",0);
		    	dUserSetINT(PlayerName2(playerid)).("Money",0);
		    	dUserSetINT(PlayerName2(playerid)).("Kills",0);
			   	dUserSetINT(PlayerName2(playerid)).("Deaths",0);
	            dUserSetINT(PlayerName2(playerid)).("WantedLevel",0);
	            #if SaveScore == true
	            dUserSetINT(PlayerName2(playerid)).("Score",0);
	            #endif
			   	dUserSetINT(PlayerName2(playerid)).("Hours",0);
			   	dUserSetINT(PlayerName2(playerid)).("Minutes",0);
			   	dUserSetINT(PlayerName2(playerid)).("Seconds",0);
			    AccInfo[playerid][LoggedIn] = 1;
			    AccInfo[playerid][Registered] = 1;
			    SendClientMessage(playerid, green, "|- You are now Registered, and have been automaticaly Logged in! -|");
				PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
				return 1;
			}
		}
    	return 1;
	}

Repet: vreau sa imi ceara o parola, si ATAT. Fara intrebare si raspuns.

www.youtube.com/thebwgg

Link to comment
Share on other sites

da mha si Lux Admin e facut in felul asta daca gresesti parola de 3 ori iti apare chestia aia sa raspunzi la intrebare daca tu pui acolo cum ti'am spus eu

#define MAX_FAIL_LOGINS     2 

cine o sa vrea sa ajunga la parola o sa primeasca kick dupa a 2-a incercare ce e asa greu de priceput :-q

ti'am mai spuso si ti'o mai spun esti praf !( la scripting) 

PS.:nu te gandii in viatza reala pentru ca acolo nu te cunos ;)

<a href=http://devilone.ro>

devilone-banner.png</a>

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.