Dialog. Can this even be wrong?
#1

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
Reply
#2

pawn Код:
quest1[playerid] >=3
This checks if "quest1" is greater than, or equal to three...
If I understand what You're saying just change it to 2 ?
Reply
#3

It works. Thanks. I tested it as a retard xD
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)