Dialog. Can this even be wrong? - 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. Can this even be wrong? (
/showthread.php?tid=227444)
Dialog. Can this even be wrong? -
bartje01 - 17.02.2011
Hey guys. I'm working on a quest system but I have a problem. I want that if your quest1 variable is higher then 2 you can't do quest 1 anymore
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case 1997:
{
if(!response)
{
return 1;
}
switch(listitem)
{
case 0:
{
if(quest1[playerid] >=3) return SendClientMessage(playerid,COLOR_RED,"You can't do this quest anymore");
if(questprogress[playerid] >=1) return SendClientMessage(playerid,COLOR_RED,"You're already in a quest");
else
{
SetPlayerCheckpoint(playerid,1554.4966,-1675.5813,16.1953,3.0);
SendClientMessage(playerid,COLOR_YELLOW,"Deliver donuts at the Police Department (Located on map)");
questprogress[playerid] = 1;
questprog1[playerid] = 1;
}
}
case 1:
{
}
}
}
}
return 1;
}
But even when my quest1 variable is higher then 2 I can still do the quest.
What could be wrong?
Thanks
Re: Dialog. Can this even be wrong? -
Lorrden - 17.02.2011
This checks if "quest1" is greater than, or equal to three...
If I understand what You're saying just change it to 2 ?
Re: Dialog. Can this even be wrong? -
bartje01 - 17.02.2011
It works. Thanks. I tested it as a retard xD