17.02.2011, 15:07
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
But even when my quest1 variable is higher then 2 I can still do the quest.
What could be wrong?
Thanks
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;
}
What could be wrong?
Thanks