Loop and dialog response
#3

Apply the same logic in dialog response.
pawn Код:
new counter;

for (new StadiumID = 1; StadiumID < MAX_STADIUMS; StadiumID++)
{
    if (AStadium[StadiumID][PickupID] != 0)
    {
        if (counter++ == listitem)
        {
            format(String, sizeof(String), "You're next to %s stadium", AStadium[StadiumID][StadiumLocation]);
            SendClientMessage(..);

            break;
        }
    }
}
For your information, array indexes start from 0.
Reply


Messages In This Thread
Loop and dialog response - by PPC23 - 10.02.2019, 19:04
Re: Loop and dialog response - by None1337 - 10.02.2019, 20:37
Re: Loop and dialog response - by Calisthenics - 10.02.2019, 20:52
Re: Loop and dialog response - by Pottus - 10.02.2019, 21:14
Re: Loop and dialog response - by Mugala - 10.02.2019, 21:37

Forum Jump:


Users browsing this thread: 1 Guest(s)