What's wrong with this? - 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: What's wrong with this? (
/showthread.php?tid=424511)
What's wrong with this? -
Squirrel - 22.03.2013
When you click liste item 1 or 2 it should kick you but it doesnt o.o But the List item 0 works
Код:
if(dialogid == RP_QUIZQ1)
{
if(response)
{
if(listitem == 0)
{
SendClientMessage(playerid, COLOR_YELLOW, "Correct!");
return 1;
}
if(listitem == 1 && (listitem == 2))
{
Kick(playerid);
SendClientMessage(playerid, COLOR_RED, "WRONG!");
return 1;
}
}
}
Re: What's wrong with this? -
dusk - 22.03.2013
if(listitem == 1 && (listitem == 2)) according to this player should press them BOTH at the same time. You need:if(listitem == 1 || (listitem == 2))
Re: What's wrong with this? -
Rock - 22.03.2013
I don't know if it works the way you are trying to do.
Anyway, try this:
if(listitem == 1 || listitem == 2)
EDIT:
Too late.
Re: What's wrong with this? -
Squirrel - 22.03.2013
It worked. Thanks fellas.