11.07.2016, 22:29
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:
I should also loop through the categories again on the dialog response, i mean here:
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");
}
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;
}
}