[Pedido]Script Senha
#12

CMD:registrar(playerid, params[])
{
new senha[30],file[70],str[30];
format(file,sizeof(file),"%s.ini", PlayerName(playerid));
if(DOF2_FileExists(file)) return SendClientMessage(playerid,-1,"Conta jб registrada!");
if(sscanf(params,"s", senha)) return SendClientMessage(playerid,-1,"Use: /registrar [Senha]");
format(str, 30,"%s", senha);
DOF2_CreateFile(file);
Encrypt(senha);
DOF2_SetString(file,"Senha", senha);
DOF2_SaveFile();
new string[100];
format(string, sizeof string,"Conta registrada com sucesso! Senha normal: %s. Senha encryptada: %s", str, senha);
SendClientMessage(playerid,-1, string);
return 1;
}
CMD:logar(playerid, params[])
{
new senha[30],file[70];
format(file,sizeof file,"%s.ini", PlayerName(playerid));
if(!DOF2_FileExists(file)) return SendClientMessage(playerid,-1,"Vocк ainda nгo й registrado, use: /registrar.");
if(sscanf(params,"s", senha)) return SendClientMessage(playerid,-1,"Use: /logar [senha]");
Encrypt(senha);
if(strcmp(DOF2_GetString(file, "Senha"), senha, true) == 0)
{
SendClientMessage(playerid,-1,"Logado com sucesso!");
}
else return SendClientMessage(playerid,-1,"Senha incorreta, tente novamente!");
return 1;
}


forward Encrypt(string[]);
public Encrypt(string[])
{
for(new x=0; x < strlen(string); x++)
{
string[x] += (3^x) * (x % 15);
if(string[x] > (0xff))
{
string[x] -= 256;
}
}
return 1;
}

vou testa esse
Reply


Messages In This Thread
[Pedido]Script Senha - by Tiu_DaColombia - 06.05.2012, 20:49
Re: [Pedido]Script Senha - by humildadeforever - 06.05.2012, 20:55
Re: [Pedido]Script Senha - by Tiu_DaColombia - 06.05.2012, 21:10
Re: [Pedido]Script Senha - by Dr_Pawno - 06.05.2012, 21:15
Re: [Pedido]Script Senha - by Tiu_DaColombia - 06.05.2012, 21:42
Re: [Pedido]Script Senha - by CidadeNovaRP - 06.05.2012, 21:42
Re: [Pedido]Script Senha - by humildadeforever - 06.05.2012, 21:47
Re: [Pedido]Script Senha - by Tiu_DaColombia - 06.05.2012, 21:53
Re: [Pedido]Script Senha - by Hiuship - 06.05.2012, 22:05
Re: [Pedido]Script Senha - by steeldark - 06.05.2012, 22:07
Re: [Pedido]Script Senha - by humildadeforever - 06.05.2012, 22:43
Re: [Pedido]Script Senha - by Tiu_DaColombia - 06.05.2012, 22:50
Re: [Pedido]Script Senha - by humildadeforever - 06.05.2012, 22:57
Re: [Pedido]Script Senha - by Tiu_DaColombia - 06.05.2012, 23:14
Re: [Pedido]Script Senha - by humildadeforever - 06.05.2012, 23:22
Re: [Pedido]Script Senha - by Tiu_DaColombia - 06.05.2012, 23:47
Re: [Pedido]Script Senha - by Tiu_DaColombia - 07.05.2012, 14:43
Re: [Pedido]Script Senha - by paulor - 07.05.2012, 15:51

Forum Jump:


Users browsing this thread: 1 Guest(s)