09.09.2017, 00:49
Not sure, but Try this
Use Iter_Init(iterator_name) and see the results.
Source: https://sampforum.blast.hk/showthread.php?tid=570937
The first method is a little bit insufficient as it uses lots of slots,
try this method:
Код:
new Iterator:OwnedVehicle[MAX_PLAYERS]<MAX_VEHICLES>; Iter_Init(OwnedVehicle); // Add vehicles to players here... Iter_Add(OwnedVehicle[playerid], 42); Iter_Add(OwnedVehicle[playerid], 43); Iter_Add(OwnedVehicle[playerid], 44); // Other code... foreach (new vehicleid : OwnedVehicle[playerid]) { printf("Player %d owns vehicle %d", playerid, vehicleid). }
Source: https://sampforum.blast.hk/showthread.php?tid=570937
The first method is a little bit insufficient as it uses lots of slots,
try this method:
PHP код:
Iterator:OwnedVehicles<MAX_PLAYERS, MAX_VEHICLES>;
Iterator:InJob<MAX_PLAYERS, 16>;