Dialog LOGIN - 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 (
/showthread.php?tid=129206)
Dialog LOGIN -
GaGlets(R) - 21.02.2010
Ok i have problem with my dialog login/register script.
When i try to login using password that i used to register: shows that password is incorrect.
SLOVED.
Now other problem - DIALOG ID`s
I have 2 FS with dialogs
1st- this
2nd - cmd list with dialogs
Now problem
Register/Login dialogs working Perfect - BUT cmd`s dialog wont work
how to fix id problems?
- Id`s are different !
Re: Dialog LOGIN -
MadeMan - 21.02.2010
pawn Код:
if(dialogid == 1)
{
TogglePlayerControllable(playerid, 0);
new pName[24], str[128];
GetPlayerName(playerid,pName,sizeof(pName));
format(str,sizeof(str),PlayerFile,pName);
if(response == 1)
{
dini_Create(str);
dini_IntSet(str, "Password", udb_hash(inputtext));
dini_IntSet(str,"AdminLevel", 0);
dini_IntSet(str,"Cash", 0);
SendClientMessage(playerid, COLOR_GREEN, "[System]: Account Created!");
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
TogglePlayerControllable(playerid, 1);
}
if(response == 0)
{
SendClientMessage(playerid, 0xFFFF0000, "You must log in or register to use this server");
Kick(playerid);
}
return 1;
}
if(dialogid ==2)
{
TogglePlayerControllable(playerid, 0);
new pName[24], str[128];
GetPlayerName(playerid, pName, sizeof(pName));
format(str, sizeof(str),PlayerFile,pName);
if(response == 1)
{
if(dini_Int(str, "Password") == udb_hash(inputtext))
{
IsLogged[playerid] = 1;
SetPlayerMoney(playerid, dini_Int(str, "Cash"));
PlayerInfo[playerid][AdminLevel] = dini_Int(str, "AdminLevel");
SendClientMessage(playerid, COLOR_GREEN, "[System]: Succeed!");
}
else
{
ShowPlayerDialog(playerid, 2, 1,"Wrong Password", "That Password is incorrect. Please try again.","login", "cancel");
}
return 1;
}
}
Re: Dialog LOGIN -
GaGlets(R) - 21.02.2010
:* :* :* :* :*
Thank You so MUCH
And One other thing.
How its done: if he pushes "Cancel" then he will be kicked?
Sorry i have scripted long long time ago and its hard to reremember all
Re: Dialog LOGIN -
GaGlets(R) - 21.02.2010
Srooy fo` DP
/\
|| - look upper post
Re: Dialog LOGIN -
VonLeeuwen - 21.02.2010
That was already in the post Mademan made:
Код:
if(response == 0)
{
SendClientMessage(playerid, 0xFFFF0000, "You must log in or register to use this server");
Kick(playerid);
}
Re: Dialog LOGIN -
GaGlets(R) - 21.02.2010
Shame on me.. didnt saw
Now other problem - DIALOG ID`s
I have 2 FS with dialogs
1st- this
2nd - cmd list with dialogs
Now problem
Register/Login dialogs working Perfect - BUT cmd`s dialog wont work
how to fix id problems?
- Id`s are different !