Dialog dosn't respond !! - 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 dosn't respond !! (
/showthread.php?tid=181449)
Dialog dosn't respond !! -
sbulletin - 05.10.2010
This is my code:
pawn Код:
{
if(dialogid == 1 && response)
{
if(response == 1)
{
new sss[256];
format(sss,sizeof(sss),"T-register/User/%s.ini",GetName(playerid));
if(dini_Exists(sss))
{
if(dini_Isset(sss, "password"))
{
if(!strcmp(inputtext,dini_Get(sss,"password"), true))
{
if(strlen(inputtext) < 5 || strlen(inputtext) > 20)return SendClientMessage(playerid, red, "Your password must be between 5-20");
logged[playerid] = 1;
TogglePlayerSpectating(playerid, 0);
dini_Set(sss, "password", inputtext);
return 1;
}
{
if(!strcmp(inputtext,dini_Get(sss,"password"), false))
SendClientMessage(playerid,red,"Password is incorrect");
ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Login","Enter your password below:","Login","Cancel");
Kick(playerid);
}
if(!dini_Exists(sss))
{
if(strlen(inputtext) > 20 || strlen(inputtext) < 5)return SendClientMessage(playerid, white, "Your password must be between 5-20");
logged[playerid] = 1;
TogglePlayerSpectating(playerid, 0);
dini_Create(sss);
dini_Set(sss,"password",inputtext);
dini_IntSet(sss,"AdminLvL",0);
dini_IntSet(sss,"faction",0);
}
if(!response) return Kick(playerid);
}
}
}
}
return 1;
}
It just doens't respond in-game, no errors.
please help!
Re: Dialog dosn't respond !! -
sbulletin - 05.10.2010
not working :S
Re: Dialog dosn't respond !! -
sbulletin - 06.10.2010
Please help :O
Re: Dialog dosn't respond !! -
TheHoodRat - 06.10.2010
You don't need to use response for dialog boxes like these. Try it now.
pawn Код:
{
if(dialogid == 1)
{
new sss[256];
format(sss,sizeof(sss),"T-register/User/%s.ini",GetName(playerid));
if(dini_Exists(sss))
{
if(dini_Isset(sss, "password"))
{
if(!strcmp(inputtext,dini_Get(sss,"password"), true))
{
if(strlen(inputtext) < 5 || strlen(inputtext) > 20)return SendClientMessage(playerid, red, "Your password must be between 5-20");
logged[playerid] = 1;
TogglePlayerSpectating(playerid, 0);
dini_Set(sss, "password", inputtext);
return 1;
}
{
if(!strcmp(inputtext,dini_Get(sss,"password"), false))
SendClientMessage(playerid,red,"Password is incorrect");
ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Login","Enter your password below:","Login","Cancel");
Kick(playerid);
}
if(!dini_Exists(sss))
{
if(strlen(inputtext) > 20 || strlen(inputtext) < 5)return SendClientMessage(playerid, white, "Your password must be between 5-20");
logged[playerid] = 1;
TogglePlayerSpectating(playerid, 0);
dini_Create(sss);
dini_Set(sss,"password",inputtext);
dini_IntSet(sss,"AdminLvL",0);
dini_IntSet(sss,"faction",0);
}
if(!response) return Kick(playerid);
}
}
}
}
return 1;
}