Loop question/problem
#5

I may sound like a jerk but as I'm reading this it actually makes no sense to me.

So, what you're saying is that after i do this:

pawn Код:
case 1:
                    {
                        for(new i = 0; i < sizeof(Teleport); i++)
                        {
                            if(Teleport[i][Kategorija] == 2)
                            {
                                format(str, sizeof(str), "%s\n", Teleport[i][tpIme]);
                                strcat(info, str, sizeof(info));
                            }
                        }
                        SPD(playerid, DIALOG_KATE1PORT, DIALOG_STYLE_LIST, "Teleport Destinacije", info, "Odaberi", "Izlaz");
                    }
I should also loop through the categories again on the dialog response, i mean here:

pawn Код:
case DIALOG_KATE1PORT:
        {
            if(response)
            {
                new str[128];

                new id = listitem;
               
                if(IsPlayerInAnyVehicle(playerid))
                {
                    SetPlayerVehPos(GetPlayerVehicleID(playerid), Teleport[id][PozX],Teleport[id][PozY],Teleport[id][PozZ]);
                }
                else
                {
                    SetPlayerPos_H(playerid,Teleport[id][PozX],Teleport[id][PozY],Teleport[id][PozZ]);
                }
                format(str, sizeof(str), "You have been teleported to %s.", Teleport[id][tpIme]);
                SCM(playerid, -1, str);
               
                id = -1;
            }
        }
Reply


Messages In This Thread
Loop question/problem - by ShoortyFl - 11.07.2016, 22:02
Re: Loop question/problem - by Konstantinos - 11.07.2016, 22:10
Re: Loop question/problem - by ShoortyFl - 11.07.2016, 22:13
Re: Loop question/problem - by Konstantinos - 11.07.2016, 22:22
Re: Loop question/problem - by ShoortyFl - 11.07.2016, 22:29
Re: Loop question/problem - by ShoortyFl - 11.07.2016, 23:07
Re: Loop question/problem - by ShoortyFl - 12.07.2016, 09:16
Re: Loop question/problem - by Konstantinos - 12.07.2016, 10:04
Re: Loop question/problem - by ShoortyFl - 12.07.2016, 10:14
Re: Loop question/problem - by Konstantinos - 12.07.2016, 10:18

Forum Jump:


Users browsing this thread: 1 Guest(s)