SA-MP Forums Archive
Dialog Login/Register Help. - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Dialog Login/Register Help. (/showthread.php?tid=111342)



Dialog Login/Register Help. - JustinSton - 01.12.2009

Hey,

I'm really stuck with the dialog login and register box. Can someone guide me a little on how to do it.

My /login:
Quote:

if (strcmp(cmd, "/logar", true) ==0 )
{
if(IsPlayerConnected(playerid))
{
new tmppass[64];
if(gPlayerLogged[playerid] == 1)
{
SendClientMessage(playerid, COLOR_DBLUE, "[CLB]: Voce ja esta logado.");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "USE: /logar [Senha]");
return 1;
}
strmid(tmppass, tmp, 0, strlen(cmdtext), 255);
Encrypt(tmppass);
OnPlayerLogin(playerid,tmppass);
}
return 1;
}
if (strcmp(cmd, "/registrar", true) ==0 )
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 1)
{
SendClientMessage(playerid, COLOR_DBLUE, "[CLB]: Voce ja estб logado.");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s.ini", sendername);
new File: hFile = fopen(string, io_read);
if (hFile)
{
SendClientMessage(playerid, COLOR_YELLOW, "Desculpe, mais esse nick estб registrado, tente outro.");
fclose(hFile);
return 1;
}
new tmppass[64];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "USE: /registrar [senha]");
SendClientMessage(playerid, COLOR_GRAD6, "Use uma senha que vocк irб se lembrar!");
return 1;
}
strmid(tmppass, tmp, 0, strlen(cmdtext), 255);
Encrypt(tmppass);
OnPlayerRegister(playerid,tmppass);
}
return 1;
}

I'm trying to make a LOGINBOX, I tried to put the LOGINBOX:
http://forum.sa-mp.com/index.php?topic=122308.0
just not going to geito no, the password is not saved and anyone can log on.


Re: Dialog Login/Register Help. - JustinSton - 01.12.2009

nothing?


Re: Dialog Login/Register Help. - JustinSton - 03.12.2009

nothing?-q