Serious problem - 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: Serious problem (
/showthread.php?tid=213544)
Serious problem -
Swiftz - 19.01.2011
Everytime i type a command which brings dialog it says you are already logged in, I have many dialogs in my script none of the dialogs work (they used to work before) only a text appears "you are already logged in "
I have this dialog how can i solve this problem
Quote:
if(dialogid == 1) //LOGIN
{
if(gPlayerLogged[playerid] == 1)
{
SendClientMessage(playerid, COLOR_WHITE, "SERVER: You are already logged in.");
return 1;
}
if(response)
{
if(!strlen(inputtext))
{
DisplayDialogForPlayer(playerid, 1); //Login
SendClientMessage(playerid, COLOR_WHITE, "SERVER: You must enter a password.");
return 1;
}
if(strlen(inputtext) >= 50)
{
DisplayDialogForPlayer(playerid, 1); //Login
SendClientMessage(playerid, COLOR_WHITE, "SERVER: Password is too long.");
return 0;
}
|
Please help
Re: Serious problem -
Haydz - 19.01.2011
Do you have more then 1 if(dialogid == 1), each dialog needs to have a separate dialogid so the script knows which one to use when the command is called.
if so change them to different numbers like below
if(dialogid == 1)
if(dialogid == 2)
if(dialogid == 3)
etc etc.
Re: Serious problem -
Swiftz - 19.01.2011
Each of dialogs are different even though they dont work
Re: Serious problem -
Haydz - 19.01.2011
That is strange, could you post another example of another dialog you have?
Re: Serious problem -
armyoftwo - 19.01.2011
pawn Код:
if(dialogid == 1) //LOGIN
{
if(response)
{
if(!strlen(inputtext))
{
DisplayDialogForPlayer(playerid, 1); //Login
SendClientMessage(playerid, COLOR_WHITE, "SERVER: You must enter a password.");
return 1;
}
if(strlen(inputtext) >= 50)
{
DisplayDialogForPlayer(playerid, 1); //Login
SendClientMessage(playerid, COLOR_WHITE, "SERVER: Password is too long.");
return 0;
}
if(gPlayerLogged[playerid] == 1)
{
SendClientMessage(playerid, COLOR_WHITE, "SERVER: You are already logged in.");
return 1;
}
Try this