28.02.2014, 20:55
Quote:
strcmp returns 1 if both strings are not equal, and even not speaking your language I can notice you're passing that to the success part of the login. Check if it's false if you want to check if two strings are equal.
|
I do like this :
Код:
if(!strcmp(hashpass,JoueurInfo[playerid][jMDP])) { INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid); ShowPlayerDialog(playerid,DIALOG_SUCCESS_2,0,"Connection rйussi !","Vous avez йtй correctement connectй au serveur.\nVous pouvez maintenant jouer. Bonne chance !","Jouer !",""); } else { ShowPlayerDialog(playerid,DIALOG_LOGIN,3,"Une erreur est survenue","Vous avez taper un mauvais mot de passe.\nTaper votre mot de passe ci-dessous pour vous connecter.","Se connecter","Quitter"); return 1; }
EDIT: I didn't see your response Konstantinos, i'll go test it !
EDIT2: That work but now there are other problems ! If I write a different password of mine, that login me but this is not my password ! Also, my .ini file is doesn't create in scriptfiles but I'm sure my #define path is good !
Here :
Код:
#define PATH "LSGW/Comptes/%s.ini"