Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(!strcmp(cmd, "/mudarsenha", true))
- {
- if(AccountInfo[playerid][Logado] == 1)
- {
- new antigasenha[256], novasenha[256], string[256];
- antigasenha = MD5_Hash(strtok(cmdtext, idx)); //temos que encriptar a
- novasenha = strtok(cmdtext, idx); //senha com antecedencia e segurança
- if(!strlen(novasenha))
- {
- SendClientMessage(playerid, Laranja, "Use: /mudarsenha [senha atual] [senha nova]");
- return 1;
- }
- if(strcmp(antigasenha, AccountInfo[playerid][Senha], true))
- {
- format(string, 128, "Você mudou sua senha para '%s', por favor não esquece-la!", novasenha);
- SendClientMessage(playerid, VerdeMedio, string);
- strmid(AccountInfo[playerid][Senha], MD5_Hash(novasenha), 0, strlen(MD5_Hash(novasenha)));
- }
- else
- {
- SendClientMessage(playerid, Cor_Conta, "Senha invalida!");
- }
- }
- else
- {
- SendClientMessage(playerid, Cor_Conta, "Você não esta logado.");
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement