09.12.2018, 18:28
(
Последний раз редактировалось Doddinger; 09.12.2018 в 19:58.
)
Hello,
I want to check if the player is on specific vehicles with the help of y_iterate.
I read this tutorial already: https://sampforum.blast.hk/showthread.php?tid=570937
I don't really know what I'm doing wrong.
First I declared the array and the elements of the array (global):
Then I wanted to iterate through the array.
Does anyone knows what I'm doing wrong?
I want to check if the player is on specific vehicles with the help of y_iterate.
I read this tutorial already: https://sampforum.blast.hk/showthread.php?tid=570937
I don't really know what I'm doing wrong.
First I declared the array and the elements of the array (global):
Код:
new Iterator:airveh<19>; Iter_Add(airveh, 417); //error 010: invalid function or declaration Iter_Add(airveh, 425); Iter_Add(airveh, 447); Iter_Add(airveh, 460); Iter_Add(airveh, 469); Iter_Add(airveh, 476); Iter_Add(airveh, 487); Iter_Add(airveh, 488); Iter_Add(airveh, 497); Iter_Add(airveh, 511); Iter_Add(airveh, 512); Iter_Add(airveh, 513); Iter_Add(airveh, 519); Iter_Add(airveh, 520); Iter_Add(airveh, 548); Iter_Add(airveh, 553); Iter_Add(airveh, 563); Iter_Add(airveh, 577); Iter_Add(airveh, 592); Iter_Add(airveh, 593);
Код:
new veh_e; (global) forward AirVehicleCheck(const playerid); public AirVehicleCheck(const playerid) { new veh_t = GetPlayerVehicleID(playerid); foreach(new i : airveh) { if(i == veh_t) { veh_e = i; } } return 1; }