Buna la toti , am editat pentru un prieten care este incepator in scripting , un server dar nici eu nu pot sa inteleg dece cand scrie orice parola ii da login succes , am incercat cu if(strcmp(IPass, inputtext, true) != 0) , if(strcmp(IPass, inputtext, true) == 1) ,
if(strcmp(IPass, inputtext, false) == 0) dar acelasi rezultat ce pot face ?
Question
Mihaela
Buna la toti , am editat pentru un prieten care este incepator in scripting , un server dar nici eu nu pot sa inteleg dece cand scrie orice parola ii da login succes , am incercat cu if(strcmp(IPass, inputtext, true) != 0) , if(strcmp(IPass, inputtext, true) == 1) ,
if(strcmp(IPass, inputtext, false) == 0) dar acelasi rezultat ce pot face ?
if(dialogid == DIALOGID+67) { new IPass[128], userid, lstring[256], string[256]; //---------------------------------------------------------------------- userid = BUD::GetNameUID(PlayerName2(playerid)); BUD::GetStringEntry(userid, "APass", DB_Escape(IPass), 128); //---------------------------------------------------------------------- if(response == 0) Kick(playerid); else if(response) { if(strlen(inputtext) > 3) { if(strcmp(IPass, inputtext, true) != 0) { AccInfo[playerid][FailLogin]++; printf("LOGIN: Failed Login: %s. Wrong password (%s) (%d)", PlayerName2(playerid), inputtext, AccInfo[playerid][FailLogin]); if(AccInfo[playerid][FailLogin] == MAX_FAIL_LOGINS) { format(string, sizeof(string), "Player %s has been automatically kicked (Reason: Incorrect Passwords)", PlayerName2(playerid) ); SendClientMessageToAll(red, string); print(string); Kick(playerid); } format(lstring,256,"{FF9900}Sorry {FF0000}'%s'\n{FF9900}but you've entered the wrong password!\n\nPlease, re-enter your correct password below:",pName(playerid)); return ShowPlayerDialog(playerid,DIALOGID+67,DIALOG_STYLE_PASSWORD,"Login Error",lstring,"Login","Quit"); } else if(strcmp(IPass, inputtext, true) == 0) { SendClientMessage(playerid,-1,"Ai fost logat cu succes!"); } } else { AccInfo[playerid][FailLogin]++; //-------------------------------------------------------------- if(AccInfo[playerid][FailLogin] == MAX_FAIL_LOGINS) { format(string, sizeof(string), "Player %s has been automatically kicked (Reason: Incorrect Passwords)", PlayerName2(playerid) ); SendClientMessageToAll(red, string); print(string); Kick(playerid); } //-------------------------------------------------------------- format(lstring,256,"{FF9900}Sorry {FF0000}'%s'\n{FF9900}but you've entered the wrong password!\n\nPlease, re-enter your correct password below:",pName(playerid)); return ShowPlayerDialog(playerid,DIALOGID+67,DIALOG_STYLE_PASSWORD,"Login Error",lstring,"Login","Quit"); } } }EDIT: nu mai este nevoie , puteti sa imi spuneti cum sa fac sa verifice daca este scris sau nu acesta de la "APass" ?
0 answers to this question
Recommended Posts