Dialog 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)
+--- Thread: Dialog help (
/showthread.php?tid=336963)
Dialog help -
Visio - 24.04.2012
if is look like that when i press second button of dialog_style_msgbox i will be kicked
pawn Код:
if(dialogid == 334)
{
if(response)
{
if(strval(inputtext) || strlen(inputtext))
{
new adminsecurity = strval(inputtext);
if(PlayerInfo[playerid][pSec] == adminsecurity)
{
SendClientMessage(playerid, 0xFFFFFFAA, " Acum poti folosi toate comenzile, ai grija sa nu abuzezi");
AdminSecurity[playerid] = 1;
}
else
{
GetPlayerName(playerid, sendername, sizeof(sendername));
gPlayerLogTries[playerid] += 1;
if(gPlayerLogTries[playerid] == 4) { PlayerInfo[playerid][pLocked] = 1; }
format(string, 128, "AdmWarning: %s a gresit parola", sendername);
ABroadCast(COLOR_YELLOW,string,1);
SendClientMessage(playerid, COLOR_GREY,"* Wrong Password!");
}
}
}
}
}
else
{
Kick(playerid);
}
return 1;
}
if is look like that when i press second button of dialog_style_msgbox nothing happens
pawn Код:
if(dialogid == 334)
{
if(response)
{
if(strval(inputtext) || strlen(inputtext))
{
new adminsecurity = strval(inputtext);
if(PlayerInfo[playerid][pSec] == adminsecurity)
{
SendClientMessage(playerid, 0xFFFFFFAA, " Acum poti folosi toate comenzile, ai grija sa nu abuzezi");
AdminSecurity[playerid] = 1;
}
else
{
GetPlayerName(playerid, sendername, sizeof(sendername));
gPlayerLogTries[playerid] += 1;
if(gPlayerLogTries[playerid] == 4) { PlayerInfo[playerid][pLocked] = 1; }
format(string, 128, "AdmWarning: %s a gresit parola", sendername);
ABroadCast(COLOR_YELLOW,string,1);
SendClientMessage(playerid, COLOR_GREY,"* Wrong Password!");
}
}
}
}
}
return 1;
}
Re: Dialog help -
doreto - 24.04.2012
i cant undrestand what you are saying,you are tryking when player click on right button to be kicked?
Re: Dialog help -
Visio - 24.04.2012
in the first code, if press the second button will be kicked
in the second code if click on second button nothing happens
Re: Dialog help -
2KY - 24.04.2012
Would you like us to tell you what's wrong with the second case?
Re: Dialog help -
Visio - 24.04.2012
i want to say that is only code but in first if i click second button of dialog i will be kicked
in second cod(it's first code but i delete kick(playerid))and if click the second button of dialog nothing happens
Re: Dialog help -
jueix - 24.04.2012
pawn Код:
if(dialogid == 334)
{
if(response == 1)
{
if(strval(inputtext) || strlen(inputtext))
{
new adminsecurity = strval(inputtext);
if(PlayerInfo[playerid][pSec] == adminsecurity)
{
SendClientMessage(playerid, 0xFFFFFFAA, " Acum poti folosi toate comenzile, ai grija sa nu abuzezi");
AdminSecurity[playerid] = 1;
}
else
{
GetPlayerName(playerid, sendername, sizeof(sendername));
gPlayerLogTries[playerid] += 1;
if(gPlayerLogTries[playerid] == 4) { PlayerInfo[playerid][pLocked] = 1; }
format(string, 128, "AdmWarning: %s a gresit parola", sendername);
ABroadCast(COLOR_YELLOW,string,1);
SendClientMessage(playerid, COLOR_GREY,"* Wrong Password!");
}
}
}
}
}
if(response == 0)
{
Kick(playerid);
}
return 1;
}
Well hope this helped
Re: Dialog help -
Visio - 24.04.2012
thx,now respond but is kicked me