12.07.2016, 10:04
(
Последний раз редактировалось Konstantinos; 12.07.2016 в 11:48.
Причина: Problem solved. "id" was used instead of "i" in Teleport array.
)
Don't forget that listitem starts from 0 and you increase to 1 when it starts:
PHP код:
new id = -1;
for (new i = 0; i < sizeof(Teleport); i++)
{
if (Teleport[i][Kategorija] == 2 && ++id == listitem)
{
SetPlayerVehPos(playerid, Teleport[i][PozX], Teleport[i][PozY], Teleport[i][PozZ]);
new str[127];
format(str, sizeof(str), "Teleportovani ste do %s.", Teleport[i][tpIme]);
SCM(playerid, -1, str);
break;
}
}